diff --git a/src/doc/common/builder.py b/src/doc/common/builder.py index 41237bfe7..65179cfd9 100644 --- a/src/doc/common/builder.py +++ b/src/doc/common/builder.py @@ -499,7 +499,7 @@ def _wrapper(self, format, *args, **kwds): # the other documents. getattr(DocBuilder(self.name, lang), format)(*args, **kwds) - # PDF: we need to build master index file which lists all + # PDF: we need to build main index file which lists all # of the PDF file. So we create an html file, based on # the file index.html from the "website" target. if format == 'pdf': diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py index ff9efe3e6..f02d5e972 100644 --- a/src/doc/common/conf.py +++ b/src/doc/common/conf.py @@ -32,8 +32,8 @@ def get_doc_abspath(path): # The suffix of source filenames. source_suffix = '.rst' -# The master toctree document. -master_doc = 'index' +# The main toctree document. +main_doc = 'index' # General information about the project. project = u"" @@ -143,8 +143,8 @@ def add(subdoc=''): 'mathscinet': ('http://www.ams.org/mathscinet-getitem?mr=%s', 'MathSciNet ') } -# By default document are not master. -multidocs_is_master = True +# By default document are not main. +multidocs_is_main = True # Options for HTML output # ----------------------- diff --git a/src/doc/common/multidocs.py b/src/doc/common/multidocs.py index e37f94c2d..2a9985b15 100644 --- a/src/doc/common/multidocs.py +++ b/src/doc/common/multidocs.py @@ -8,7 +8,7 @@ The goal of this extension is to manage a multi documentation in Sphinx. To be able to compile Sage's huge documentation in parallel, the documentation is cut into a bunch of independent documentations called - "subdocs", which are compiled separately. There is a master document which + "subdocs", which are compiled separately. There is a main document which points to all the subdocs. The intersphinx extension ensures that the cross-link between the subdocs are correctly resolved. However some work is needed to build a global index. This is the goal of multidocs. @@ -237,15 +237,15 @@ def fetch_citation(app, env): def init_subdoc(app): """ - Init the merger depending on if we are compiling a subdoc or the master + Init the merger depending on if we are compiling a subdoc or the main doc itself. """ - if app.config.multidocs_is_master: - app.info(bold("Compiling the master document")) + if app.config.multidocs_is_main: + app.info(bold("Compiling the main document")) app.connect('env-updated', merge_environment) app.connect('html-collect-pages', merge_js_index) if app.config.multidocs_subdoc_list: - # Master file with indexes computed by merging indexes: + # Main file with indexes computed by merging indexes: # Monkey patch index fetching to silence warning about broken index def load_indexer(docnames): app.builder.info(bold('Skipping loading of indexes'), nonl=1) @@ -259,7 +259,7 @@ def load_indexer(docnames): # Monkey patch copy_static_files to make a symlink to "../" def link_static_files(): """ - Instead of copying static files, make a link to the master static file. + Instead of copying static files, make a link to the main static file. See sphinx/builder/html.py line 536:: class StandaloneHTMLBuilder(Builder): @@ -269,13 +269,13 @@ def copy_static_files(self): """ app.builder.info(bold('linking _static directory.')) static_dir = os.path.join(app.builder.outdir, '_static') - master_static_dir = os.path.join('..', '_static') + main_static_dir = os.path.join('..', '_static') if os.path.exists(static_dir): if os.path.isdir(static_dir) and not os.path.islink(static_dir): shutil.rmtree(static_dir) else: os.unlink(static_dir) - os.symlink(master_static_dir, static_dir) + os.symlink(main_static_dir, static_dir) app.builder.copy_static_files = link_static_files @@ -284,7 +284,7 @@ def copy_static_files(self): def setup(app): - app.add_config_value('multidocs_is_master', True, True) + app.add_config_value('multidocs_is_main', True, True) app.add_config_value('multidocs_subdoc_list', [], True) app.add_config_value('multidoc_first_pass', 0, False) # 1 = deactivate the loading of the inventory app.connect('builder-inited', init_subdoc) diff --git a/src/doc/en/reference/conf.py b/src/doc/en/reference/conf.py index 99bb847dd..c59640d8e 100644 --- a/src/doc/en/reference/conf.py +++ b/src/doc/en/reference/conf.py @@ -62,7 +62,7 @@ #Ignore all .rst in the _sage subdirectory exclude_trees = exclude_trees + ['_sage'] -multidocs_is_master = True +multidocs_is_main = True # Sorted list of subdocs. Include all subdirectories of ref_src except # for 'static' and 'templates', and to deal with upgrades: 'sage', diff --git a/src/doc/en/reference/quivers/conf.py b/src/doc/en/reference/quivers/conf.py index ae3b7eaf6..8c3022570 100644 --- a/src/doc/en/reference/quivers/conf.py +++ b/src/doc/en/reference/quivers/conf.py @@ -70,4 +70,4 @@ #Ignore all .rst in the _sage subdirectory exclude_trees = exclude_trees + ['_sage'] -multidocs_is_master = False +multidocs_is_main = False diff --git a/src/doc/en/reference/riemannian_geometry/conf.py b/src/doc/en/reference/riemannian_geometry/conf.py index ae3b7eaf6..8c3022570 100644 --- a/src/doc/en/reference/riemannian_geometry/conf.py +++ b/src/doc/en/reference/riemannian_geometry/conf.py @@ -70,4 +70,4 @@ #Ignore all .rst in the _sage subdirectory exclude_trees = exclude_trees + ['_sage'] -multidocs_is_master = False +multidocs_is_main = False diff --git a/src/sage/categories/category_with_axiom.py b/src/sage/categories/category_with_axiom.py index 42dbca4da..9beedafcb 100644 --- a/src/sage/categories/category_with_axiom.py +++ b/src/sage/categories/category_with_axiom.py @@ -1439,7 +1439,7 @@ class ``Sets.Finite``), or in a separate file (typically in a class does not use :meth:`Category._with_axiom` to add axioms, but its sister :meth:`Category._with_axiom_as_tuple`; the latter builds a tuple of categories that should be joined together but leaves the -computation of the join to its caller, the master join calculation. +computation of the join to its caller, the main join calculation. Adding an axiom ``A`` to a category ``Cs()`` implementing it ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/sage/combinat/sidon_sets.py b/src/sage/combinat/sidon_sets.py index 47a0055ec..aa7552980 100644 --- a/src/sage/combinat/sidon_sets.py +++ b/src/sage/combinat/sidon_sets.py @@ -104,7 +104,7 @@ def sidon_sets(N, g = 1): return sidon_sets_rec(N, g = g) -# This recursive and cached slave function is mainly here because +# This recursive and cached subordinate function is mainly here because # caching the user entry function 'sidon_sets' prevents it from # appearing in the built documentation. @cached_function diff --git a/src/sage/databases/sql_db.py b/src/sage/databases/sql_db.py index 47dfa14db..f8d22b0fa 100644 --- a/src/sage/databases/sql_db.py +++ b/src/sage/databases/sql_db.py @@ -252,7 +252,7 @@ def construct_skeleton(database): """ skeleton = {} cur = database.__connection__.cursor() - exe = cur.execute("SELECT name FROM sqlite_master WHERE TYPE='table'") + exe = cur.execute("SELECT name FROM sqlite_main WHERE TYPE='table'") from sage.misc.misc import SAGE_SHARE for table in exe.fetchall(): skeleton[table[0]] = {} diff --git a/src/sage/dev/git_interface.py b/src/sage/dev/git_interface.py index b4692ed44..306c95bef 100644 --- a/src/sage/dev/git_interface.py +++ b/src/sage/dev/git_interface.py @@ -106,7 +106,7 @@ def _run_git(self, cmd, args, git_kwds, popen_kwds=dict()): sage: git._run_git('status', (), {}) (0, - '# On branch master\n#\n# Initial commit\n#\nnothing to commit + '# On branch main\n#\n# Initial commit\n#\nnothing to commit (create/copy files and use "git add" to track)\n', '', 'git -c user.email=doc@test.test -c user.name=doctest status') @@ -204,7 +204,7 @@ def _execute(self, cmd, *args, **kwds): sage: os.chdir(config['git']['src']) sage: git._execute('status') - # On branch master + # On branch main # # Initial commit # @@ -317,7 +317,7 @@ def _read_output(self, cmd, *args, **kwds): sage: os.chdir(config['git']['src']) sage: git._read_output('status') - '# On branch master\n#\n# Initial commit\n#\nnothing to + '# On branch main\n#\n# Initial commit\n#\nnothing to commit (create/copy files and use "git add" to track)\n' sage: git._read_output('status',foo=True) # --foo is not a valid parameter Traceback (most recent call last): @@ -523,7 +523,7 @@ def get_state(self): sage: git.super_silent.checkout("-b","branch1") sage: with open("file","w") as f: f.write("version 1") sage: git.silent.commit("-am","second commit") - sage: git.super_silent.checkout("master") + sage: git.super_silent.checkout("main") sage: git.super_silent.checkout("-b","branch2") sage: with open("file","w") as f: f.write("version 2") sage: git.silent.commit("-am","conflicting commit") @@ -613,7 +613,7 @@ def reset_to_clean_state(self): sage: git.super_silent.checkout("-b","branch1") sage: with open("file","w") as f: f.write("version 1") sage: git.silent.commit("-am","second commit") - sage: git.super_silent.checkout("master") + sage: git.super_silent.checkout("main") sage: git.super_silent.checkout("-b","branch2") sage: with open("file","w") as f: f.write("version 2") sage: git.silent.commit("-am","conflicting commit") @@ -701,7 +701,7 @@ def clean_wrapper(self, remove_untracked_files=False, sage: open('ignored_dir/untracked','w').close() sage: with open('tracked','w') as f: f.write('version 0') sage: git.echo.status() - # On branch master + # On branch main # Changes not staged for commit: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) @@ -732,7 +732,7 @@ def clean_wrapper(self, remove_untracked_files=False, sage: git.clean_wrapper() sage: git.echo.status() - # On branch master + # On branch main # Untracked files: # (use "git add ..." to include in what will be committed) # @@ -792,18 +792,18 @@ def is_child_of(self, a, b): sage: git.super_silent.checkout("-b","branch1") sage: with open("file","w") as f: f.write("version 1") sage: git.silent.commit("-am","second commit") - sage: git.super_silent.checkout("master") + sage: git.super_silent.checkout("main") sage: git.super_silent.checkout("-b","branch2") sage: with open("file","w") as f: f.write("version 2") sage: git.silent.commit("-am","conflicting commit") - sage: git.is_child_of('master', 'branch2') + sage: git.is_child_of('main', 'branch2') False - sage: git.is_child_of('branch2', 'master') + sage: git.is_child_of('branch2', 'main') True sage: git.is_child_of('branch1', 'branch2') False - sage: git.is_child_of('master', 'master') + sage: git.is_child_of('main', 'main') True """ return self.is_ancestor_of(b, a) @@ -832,18 +832,18 @@ def is_ancestor_of(self, a, b): sage: git.super_silent.checkout("-b","branch1") sage: with open("file","w") as f: f.write("version 1") sage: git.silent.commit("-am","second commit") - sage: git.super_silent.checkout("master") + sage: git.super_silent.checkout("main") sage: git.super_silent.checkout("-b","branch2") sage: with open("file","w") as f: f.write("version 2") sage: git.silent.commit("-am","conflicting commit") - sage: git.is_ancestor_of('master', 'branch2') + sage: git.is_ancestor_of('main', 'branch2') True - sage: git.is_ancestor_of('branch2', 'master') + sage: git.is_ancestor_of('branch2', 'main') False sage: git.is_ancestor_of('branch1', 'branch2') False - sage: git.is_ancestor_of('master', 'master') + sage: git.is_ancestor_of('main', 'main') True """ return self.merge_base(a, b) == self.rev_parse(a) @@ -957,7 +957,7 @@ def local_branches(self): sage: git.super_silent.checkout('-b', 'branch') sage: env['GIT_COMMITTER_DATE'] = time.strftime("%Y-%m-%dT%H:%M:20") sage: git.silent.commit('-m','second commit','--allow-empty', env=env) - sage: git.super_silent.checkout('-b', 'other', 'master') + sage: git.super_silent.checkout('-b', 'other', 'main') sage: env['GIT_COMMITTER_DATE'] = time.strftime("%Y-%m-%dT%H:%M:30") sage: git.silent.commit('-m','third commit','--allow-empty', env=env) @@ -973,16 +973,16 @@ def local_branches(self): sage: git2.super_silent.checkout("branch") sage: git2.echo.branch("-a") * branch - master + main remotes/git/branch - remotes/git/master + remotes/git/main remotes/git/other sage: git2.local_branches() - ['master', 'branch'] + ['main', 'branch'] sage: os.chdir(config['git']['src']) sage: git.local_branches() - ['other', 'branch', 'master'] + ['other', 'branch', 'main'] """ result = self.for_each_ref('refs/heads/', sort='-committerdate', format="%(refname)") return [head[11:] for head in result.splitlines()] @@ -1011,14 +1011,14 @@ def current_branch(self): sage: git.silent.branch('branch2') sage: git.current_branch() - 'master' + 'main' sage: git.super_silent.checkout('branch1') sage: git.current_branch() 'branch1' If ``HEAD`` is detached:: - sage: git.super_silent.checkout('master~') + sage: git.super_silent.checkout('main~') sage: git.current_branch() Traceback (most recent call last): ... @@ -1188,7 +1188,7 @@ def create_wrapper(git_cmd__): sage: git = GitInterface(config["git"], DoctestUserInterface(config["UI"])) sage: os.chdir(config['git']['src']) sage: git.echo.status() # indirect doctest - # On branch master + # On branch main # # Initial commit # diff --git a/src/sage/dev/sagedev.py b/src/sage/dev/sagedev.py index ca6e8af43..4dc14437c 100644 --- a/src/sage/dev/sagedev.py +++ b/src/sage/dev/sagedev.py @@ -45,7 +45,7 @@ r'[^\040\177 ~^:?*[]+(? - # (use "sage --dev vanilla" to switch to the master branch) + # (use "sage --dev vanilla" to switch to the main branch) Now, the branch is abandoned:: @@ -2704,7 +2704,7 @@ def prune_tickets(self): Abandoning #1. Moved your branch "ticket/1" to "trash/ticket/1". sage: dev.tickets() - : master + : main sage: dev.prune_tickets() """ for branch in self.git.local_branches(): @@ -2762,19 +2762,19 @@ def abandon(self, ticket_or_branch, helpful=True): sage: dev.abandon(1) Cannot delete "ticket/1": is the current branch. - # (use "sage --dev vanilla" to switch to the master branch) + # (use "sage --dev vanilla" to switch to the main branch) sage: dev.vanilla() sage: dev.abandon(1) Moved your branch "ticket/1" to "trash/ticket/1". - # Use "sage --dev checkout --ticket=1 --base=master" to restart working on #1 with a clean copy of the master branch. + # Use "sage --dev checkout --ticket=1 --base=main" to restart working on #1 with a clean copy of the main branch. Start to work on a new branch for this ticket:: sage: from sage.dev.sagedev import MASTER_BRANCH sage: UI.append("y") sage: dev.checkout(ticket=1, base=MASTER_BRANCH) - About to create a new branch for #1 based on "master". However, the trac ticket + About to create a new branch for #1 based on "main". However, the trac ticket for #1 already refers to the branch "u/doctest/ticket/1". The new branch will not contain any work that has already been done on "u/doctest/ticket/1". Create fresh branch? [yes/No] y @@ -2808,14 +2808,14 @@ def abandon(self, ticket_or_branch, helpful=True): self._check_local_branch_name(branch, exists=True) if branch == MASTER_BRANCH: - self._UI.error("Cannot delete the master branch.") + self._UI.error("Cannot delete the main branch.") raise OperationCancelledError("protecting the user") from git_error import DetachedHeadError try: if self.git.current_branch() == branch: self._UI.error('Cannot delete "{0}": is the current branch.', branch) - self._UI.info(['', '(use "{0}" to switch to the master branch)'], + self._UI.info(['', '(use "{0}" to switch to the main branch)'], self._format_command("vanilla")) raise OperationCancelledError("can not delete current branch") except DetachedHeadError: @@ -2832,7 +2832,7 @@ def abandon(self, ticket_or_branch, helpful=True): self._set_dependencies_for_ticket(ticket, None) if helpful: self._UI.info(['', - 'Use "{0}" to restart working on #{1} with a clean copy of the master branch.'], + 'Use "{0}" to restart working on #{1} with a clean copy of the main branch.'], self._format_command("checkout", ticket=ticket, base=MASTER_BRANCH), ticket) def gather(self, branch, *tickets_or_branches): @@ -2971,7 +2971,7 @@ def merge(self, ticket_or_branch=MASTER_BRANCH, pull=None, create_dependency=Non INPUT: - ``ticket_or_branch`` -- an integer or strings (default: - ``'master'``); for an integer or string identifying a ticket, the + ``'main'``); for an integer or string identifying a ticket, the branch on the trac ticket gets merged (or the local branch for the ticket, if ``pull`` is ``False``), for the name of a local or remote branch, that branch gets merged. If ``'dependencies'``, the @@ -3336,7 +3336,7 @@ def tickets(self, include_abandoned=False, cached=True): Create some tickets:: sage: dev.tickets() - * : master + * : main sage: UI.append("Summary: summary\ndescription") sage: dev.create_ticket() @@ -3361,7 +3361,7 @@ def tickets(self, include_abandoned=False, cached=True): # Use "sage --dev merge" to include another ticket/branch. # Use "sage --dev commit" to save changes into a new commit. sage: dev.tickets() - : master + : main #1: ticket/1 summary * #2: ticket/2 summary """ @@ -3405,7 +3405,7 @@ def vanilla(self, release=MASTER_BRANCH): INPUT: - ``release`` -- a string or decimal giving the release name (default: - ``'master'``). In fact, any tag, commit or branch will work. If the + ``'main'``). In fact, any tag, commit or branch will work. If the tag does not exist locally an attempt to fetch it from the server will be made. @@ -3431,7 +3431,7 @@ def vanilla(self, release=MASTER_BRANCH): Go to a sage release:: sage: dev.git.current_branch() - 'master' + 'main' sage: dev.vanilla() sage: dev.git.current_branch() Traceback (most recent call last): @@ -3468,7 +3468,7 @@ def diff(self, base='commit'): INPUT: - ``base`` -- a string; show the differences against the latest - ``'commit'`` (the default), against the branch ``'master'`` (or any + ``'commit'`` (the default), against the branch ``'main'`` (or any other branch name), or the merge of the ``'dependencies'`` of the current ticket (if the dependencies merge cleanly) @@ -3712,7 +3712,7 @@ def diff(self, base='commit'): self._UI.error("Cannot create merge of dependencies because working directory is not clean.") raise - self._is_master_uptodate(action_if_not="warning") + self._is_main_uptodate(action_if_not="warning") branch = self.git.current_branch() merge_base = self.git.merge_base(branch, MASTER_BRANCH).splitlines()[0] @@ -3738,7 +3738,7 @@ def diff(self, base='commit'): self._UI.info(['Use "{2}" to merge latest version of Sage into your branch.', ''], remote_branch, branch, self._format_command("merge")) if self.git.is_child_of(merge_base, 'FETCH_HEAD'): - self._UI.debug('Dependency #{0} has already been merged into the master' + self._UI.debug('Dependency #{0} has already been merged into the main' ' branch of your version of sage.', dependency) else: if not self.git.is_child_of(branch, 'FETCH_HEAD'): @@ -3777,7 +3777,7 @@ def diff(self, base='commit'): pass else: self._check_remote_branch_name(base, exists=True) - self._is_master_uptodate(action_if_not="warning") + self._is_main_uptodate(action_if_not="warning") self.git.super_silent.fetch(self.git._repository_anonymous, base) base = 'FETCH_HEAD' @@ -4099,22 +4099,22 @@ def _upload_ssh_key(self): pass # do not bother the user again, probably the key has been uploaded manually already self.config['git']['ssh_key_set'] = "True" - def _is_master_uptodate(self, action_if_not=None): + def _is_main_uptodate(self, action_if_not=None): r""" - Check whether the master branch is up to date with respect to the - remote master branch. + Check whether the main branch is up to date with respect to the + remote main branch. INPUT: - ``action_if_not`` -- one of ``'error'``, ``'warning'``, or ``None`` - (default: ``None``), the action to perform if master is not up to + (default: ``None``), the action to perform if main is not up to date. If ``'error'``, then this raises a ``SageDevValueError``, otherwise return a boolean and print a warning if ``'warning'``. .. NOTE:: In the transitional period from hg to git, this is a nop. This will - change as soon as ``master`` is our actual master branch. + change as soon as ``main`` is our actual main branch. TESTS: @@ -4122,51 +4122,51 @@ def _is_master_uptodate(self, action_if_not=None): sage: from sage.dev.test.sagedev import single_user_setup sage: dev, config, UI, server = single_user_setup() - sage: dev._wrap("_is_master_uptodate") + sage: dev._wrap("_is_main_uptodate") - Initially ``master`` is up to date:: + Initially ``main`` is up to date:: - sage: dev._is_master_uptodate() + sage: dev._is_main_uptodate() True - When the remote ``master`` branches changes, this is not the case + When the remote ``main`` branches changes, this is not the case anymore:: sage: server.git.super_silent.commit(allow_empty=True, message="a commit") - sage: dev._is_master_uptodate() + sage: dev._is_main_uptodate() False - sage: dev._is_master_uptodate(action_if_not="warning") - Your version of sage, i.e., your "master" branch, is out of date. Your command might fail or produce unexpected results. + sage: dev._is_main_uptodate(action_if_not="warning") + Your version of sage, i.e., your "main" branch, is out of date. Your command might fail or produce unexpected results. False - sage: dev._is_master_uptodate(action_if_not="error") - Your version of sage, i.e., your "master" branch, is out of date. + sage: dev._is_main_uptodate(action_if_not="error") + Your version of sage, i.e., your "main" branch, is out of date. - We upgrade the local master:: + We upgrade the local main:: - sage: dev.pull(ticket_or_remote_branch="master") - Merging the remote branch "master" into the local branch "master". + sage: dev.pull(ticket_or_remote_branch="main") + Merging the remote branch "main" into the local branch "main". Automatic merge successful. # (use "sage --dev commit" to commit your merge) - sage: dev._is_master_uptodate() + sage: dev._is_main_uptodate() True - sage: dev._is_master_uptodate(action_if_not="warning") + sage: dev._is_main_uptodate(action_if_not="warning") True - sage: dev._is_master_uptodate(action_if_not="error") + sage: dev._is_main_uptodate(action_if_not="error") True """ - remote_master = self._remote_branch_for_branch(MASTER_BRANCH) - if remote_master is not None: - self.git.fetch(self.git._repository_anonymous, remote_master) + remote_main = self._remote_branch_for_branch(MASTER_BRANCH) + if remote_main is not None: + self.git.fetch(self.git._repository_anonymous, remote_main) # In the transition from hg to git we are using - # public/sage-git/master instead of master on the remote end. + # public/sage-git/main instead of main on the remote end. # This check makes sure that we are not printing any confusing - # messages unless master is actually the latest (development) + # messages unless main is actually the latest (development) # version of sage. if self.git.is_child_of('FETCH_HEAD', MASTER_BRANCH): if self.git.commit_for_ref('FETCH_HEAD') != self.git.commit_for_branch(MASTER_BRANCH): msg = ('To upgrade your "{0}" branch to the latest version, use "{1}".', - MASTER_BRANCH, self._format_command("pull", ticket_or_branch=remote_master, + MASTER_BRANCH, self._format_command("pull", ticket_or_branch=remote_main, branch=MASTER_BRANCH)) if action_if_not is None: pass @@ -4207,7 +4207,7 @@ def _is_ticket_name(self, name, exists=False): False sage: dev._is_ticket_name("#1000") True - sage: dev._is_ticket_name("master") + sage: dev._is_ticket_name("main") False sage: dev._is_ticket_name(1000, exists=True) # optional: internet True @@ -4258,10 +4258,10 @@ def _check_ticket_name(self, name, exists=False): ... SageDevValueError: Invalid ticket name "1 000". sage: dev._check_ticket_name("#1000") - sage: dev._check_ticket_name("master") + sage: dev._check_ticket_name("main") Traceback (most recent call last): ... - SageDevValueError: Invalid ticket name "master". + SageDevValueError: Invalid ticket name "main". sage: dev._check_ticket_name(1000, exists=True) # optional: internet sage: dev._check_ticket_name(2^30, exists=True) # optional: internet Traceback (most recent call last): @@ -4581,10 +4581,10 @@ def _remote_branch_for_ticket(self, ticket): 'u/doctest/ticket/1' sage: dev._remote_branch_for_ticket("1") 'u/doctest/ticket/1' - sage: dev._remote_branch_for_ticket("master") + sage: dev._remote_branch_for_ticket("main") Traceback (most recent call last): ... - SageDevValueError: "master" is not a valid ticket name. + SageDevValueError: "main" is not a valid ticket name. sage: UI.append("Summary: summary1\ndescription") sage: dev.create_ticket() diff --git a/src/sage/dev/sagedev_wrapper.py b/src/sage/dev/sagedev_wrapper.py index 8ea48c92f..75ef26cce 100644 --- a/src/sage/dev/sagedev_wrapper.py +++ b/src/sage/dev/sagedev_wrapper.py @@ -69,7 +69,7 @@ class SageDevWrapper(object): sage: config['trac']['password'] = 'secret' sage: dev = DoctestSageDevWrapper(config, server) sage: UI = dev._UI - sage: dev._pull_master_branch() + sage: dev._pull_main_branch() sage: dev._chdir() ``create_ticket`` silently fails for a wrapper:: @@ -213,7 +213,7 @@ def wrapped(*args, **kwargs): " detached head state. This is probably a bug in sagedev.") UI.info("Use {0} and {1} to restore your repository to a clean state.", self._sagedev._format_command("clean"), - self._sagedev._format_command("checkout", branch="master")) + self._sagedev._format_command("checkout", branch="main")) raise except InvalidStateError as e: UI.error("Unexpectedly your repository was found to be in a" diff --git a/src/sage/dev/test/sagedev.py b/src/sage/dev/test/sagedev.py index c4035c0fe..a3c62a4aa 100644 --- a/src/sage/dev/test/sagedev.py +++ b/src/sage/dev/test/sagedev.py @@ -54,7 +54,7 @@ def __init__(self, config, trac_server): self._UI = sagedev._UI self._wrap("_chdir") - self._wrap("_pull_master_branch") + self._wrap("_pull_main_branch") class DoctestSageDev(sage.dev.sagedev.SageDev): r""" @@ -98,9 +98,9 @@ def __init__(self, config, trac_server): sage.dev.sagedev.SageDev.__init__(self, config, UI, trac, git) - def _pull_master_branch(self): + def _pull_main_branch(self): r""" - Pull the master branch of the repository of the + Pull the main branch of the repository of the :class:`trac_server.DoctestTracServer` into the local repository. EXAMPLES:: @@ -109,14 +109,14 @@ def _pull_master_branch(self): sage: from sage.dev.test.config import DoctestConfig sage: from sage.dev.test.trac_server import DoctestTracServer sage: dev = DoctestSageDev(DoctestConfig(), DoctestTracServer()) - sage: dev._pull_master_branch() + sage: dev._pull_main_branch() """ import os old_cwd = os.getcwd() self._chdir() try: from sage.dev.sagedev import MASTER_BRANCH - if MASTER_BRANCH != "master": + if MASTER_BRANCH != "main": self.git.super_silent.chechkout("-b",MASTER_BRANCH) self.git.super_silent.checkout(MASTER_BRANCH) self.git.super_silent.pull(self._trac_server.git._config['src'], MASTER_BRANCH) @@ -154,7 +154,7 @@ def single_user_setup(): config = DoctestConfig() config['trac']['password'] = 'secret' dev = DoctestSageDevWrapper(config, server) - dev._pull_master_branch() + dev._pull_main_branch() dev._chdir() return dev, config, dev._UI, server @@ -195,11 +195,11 @@ def two_user_setup(): config_alice = DoctestConfig('alice') config_alice['trac']['password'] = 'secret' alice = DoctestSageDevWrapper(config_alice, server) - alice._pull_master_branch() + alice._pull_main_branch() config_bob = DoctestConfig('bob') config_bob['trac']['password'] = 'secret' bob = DoctestSageDevWrapper(config_bob, server) - bob._pull_master_branch() + bob._pull_main_branch() return alice, config_alice, bob, config_bob, server diff --git a/src/sage/dev/test/trac_server.py b/src/sage/dev/test/trac_server.py index 400ed5814..77acd1c4a 100644 --- a/src/sage/dev/test/trac_server.py +++ b/src/sage/dev/test/trac_server.py @@ -54,7 +54,7 @@ def __init__(self): os.chdir(config['git']['src']) try: self.git.super_silent.commit(allow_empty=True, message='initial commit') - if MASTER_BRANCH != "master": self.git.super_silent.checkout("-b", MASTER_BRANCH) + if MASTER_BRANCH != "main": self.git.super_silent.checkout("-b", MASTER_BRANCH) from sage.env import SAGE_VERSION self.git.super_silent.tag(SAGE_VERSION) finally: diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py index 2273d434a..76555dbb5 100644 --- a/src/sage/doctest/forker.py +++ b/src/sage/doctest/forker.py @@ -1110,7 +1110,7 @@ def report_failure(self, out, test, example, got, globs): shell(header='', stack_depth=2) except KeyboardInterrupt: # Assume this is a *real* interrupt. We need to - # escalate this to the master docbuilding process. + # escalate this to the main docbuilding process. if not self.options.serial: os.kill(os.getppid(), signal.SIGINT) raise @@ -1237,7 +1237,7 @@ def report_unexpected_exception(self, out, test, example, exc_info): self.debugger.interaction(None, exc_tb) except KeyboardInterrupt: # Assume this is a *real* interrupt. We need to - # escalate this to the master docbuilding process. + # escalate this to the main docbuilding process. if not self.options.serial: os.kill(os.getppid(), signal.SIGINT) raise @@ -1377,7 +1377,7 @@ def parallel_dispatch(self): """ Run the doctests from the controller's specified sources in parallel. - This creates :class:`DocTestWorker` subprocesses, while the master + This creates :class:`DocTestWorker` subprocesses, while the main process checks for timeouts and collects and displays the results. EXAMPLES:: @@ -1560,7 +1560,7 @@ def sel_exit(): assert len(finished) == 0 break - # The master pselect() call + # The main pselect() call rlist = [w.rmessages for w in workers if w.rmessages is not None] tmout = min(w.deadline for w in workers) - now if tmout > 5: # Wait at most 5 seconds @@ -1671,7 +1671,7 @@ class DocTestWorker(multiprocessing.Process): process group kills this process together with its child processes. The class has additional methods and attributes for bookkeeping - by the master process. Except in :meth:`run`, nothing from this + by the main process. Except in :meth:`run`, nothing from this class should be accessed by the child process. INPUT: @@ -1735,11 +1735,11 @@ def __init__(self, source, options, funclist=[]): self.result_queue = multiprocessing.Queue(1) # Temporary file for stdout/stderr of the child process. - # Normally, this isn't used in the master process except to + # Normally, this isn't used in the main process except to # debug timeouts/crashes. self.outtmpfile = os.tmpfile() - # Create string for the master process to store the messages + # Create string for the main process to store the messages # (usually these are the doctest failures) of the child. # These messages are read through the pipe created above. self.messages = "" @@ -1771,7 +1771,7 @@ def run(self): for f in self.funclist: f() - # Write one byte to the pipe to signal to the master process + # Write one byte to the pipe to signal to the main process # that we have started properly. os.write(self.wmessages, "X") @@ -1790,7 +1790,7 @@ def run(self): os.dup2(f.fileno(), 0) sys.stdin = os.fdopen(0, "r") - # Close the reading end of the pipe (only the master should + # Close the reading end of the pipe (only the main should # read from the pipe) and open the writing end. os.close(self.rmessages) msgpipe = os.fdopen(self.wmessages, "w") @@ -1843,7 +1843,7 @@ def start(self): def read_messages(self): """ - In the master process, read from the pipe and store the data + In the main process, read from the pipe and store the data read in the ``messages`` attribute. .. NOTE:: diff --git a/src/sage/doctest/test.py b/src/sage/doctest/test.py index 68a936d86..4405dfc39 100644 --- a/src/sage/doctest/test.py +++ b/src/sage/doctest/test.py @@ -148,7 +148,7 @@ ... 128 -Even though the doctester master process has exited, the child process +Even though the doctester main process has exited, the child process is still alive, but it should be killed automatically in max(20, 120 * 0.05) = 20 seconds:: diff --git a/src/sage/graphs/graph_database.py b/src/sage/graphs/graph_database.py index a2127c493..b16ef8b5c 100644 --- a/src/sage/graphs/graph_database.py +++ b/src/sage/graphs/graph_database.py @@ -390,7 +390,7 @@ def __init__(self, graph_db=None, query_dict=None, display_cols=None, **kwds): #if display_cols is None: # raise TypeError, 'Nonetype display_cols cannot retrieve data.' - master_join = {} + main_join = {} for key in kwds: # check validity @@ -431,7 +431,7 @@ def __init__(self, graph_db=None, query_dict=None, display_cols=None, **kwds): # include search params (keys) in join clause # again, we exclude graph_data because it is the base table if qdict['table_name'] != 'graph_data': - master_join[qdict['table_name']] = ('graph_id', 'graph_id') + main_join[qdict['table_name']] = ('graph_id', 'graph_id') # display columns from each table aut_grp_disp = ['aut_grp'] @@ -452,14 +452,14 @@ def __init__(self, graph_db=None, query_dict=None, display_cols=None, **kwds): elif col in misc: misc_disp.append(col) elif col in spectrum: spectrum_disp.append(col) - # finish filling master join with display tables + # finish filling main join with display tables for tab in disp_tables: if len(tab) > 1: - master_join[tab[0]] = ('graph_id', 'graph_id') + main_join[tab[0]] = ('graph_id', 'graph_id') # join clause for display tables join_str = 'FROM graph_data ' - for tab in master_join: + for tab in main_join: join_str += 'INNER JOIN %s ON graph_data.graph_id=%s.graph_id '%(tab, tab) # construct sql syntax substring for display cols diff --git a/src/sage/groups/perm_gps/cubegroup.py b/src/sage/groups/perm_gps/cubegroup.py index 16c03cc4b..30bd9e698 100644 --- a/src/sage/groups/perm_gps/cubegroup.py +++ b/src/sage/groups/perm_gps/cubegroup.py @@ -17,7 +17,7 @@ See ``CubeGroup.parse()`` for all possible input notations. -The "Singmaster notation": +The "Singmain notation": - moves: `U, D, R, L, F, B` as in the diagram below, @@ -286,7 +286,7 @@ def create_poly(face, color): #################################################### -singmaster_indices = { +singmain_indices = { 1: "ulb", 2: "ub", 3: "ubr", @@ -337,18 +337,18 @@ def create_poly(face, color): 32: "rbd", } -def index2singmaster(facet): +def index2singmain(facet): """ - Translate index used (eg, 43) to Singmaster facet notation (eg, + Translate index used (eg, 43) to Singmain facet notation (eg, fdr). EXAMPLES:: sage: from sage.groups.perm_gps.cubegroup import * - sage: index2singmaster(41) + sage: index2singmain(41) 'dlf' """ - return singmaster_indices[facet] + return singmain_indices[facet] def color_of_square(facet, colors=['lpurple', 'yellow', 'red', 'green', 'orange', 'blue']): """ @@ -581,7 +581,7 @@ def group(self): def B(self): """ - Return the generator `B` in Singmaster notation. + Return the generator `B` in Singmain notation. EXAMPLES:: @@ -593,7 +593,7 @@ def B(self): def D(self): """ - Return the generator `D` in Singmaster notation. + Return the generator `D` in Singmain notation. EXAMPLES:: @@ -605,7 +605,7 @@ def D(self): def F(self): """ - Return the generator `F` in Singmaster notation. + Return the generator `F` in Singmain notation. EXAMPLES:: @@ -617,7 +617,7 @@ def F(self): def L(self): """ - Return the generator `L` in Singmaster notation. + Return the generator `L` in Singmain notation. EXAMPLES:: @@ -629,7 +629,7 @@ def L(self): def R(self): """ - Return the generator `R` in Singmaster notation. + Return the generator `R` in Singmain notation. EXAMPLES:: @@ -641,7 +641,7 @@ def R(self): def U(self): """ - Return the generator `U` in Singmaster notation. + Return the generator `U` in Singmain notation. EXAMPLES:: @@ -667,7 +667,7 @@ def parse(self, mv, check=True): ``self.faces()``) - ``str`` - either cycle notation (passed to GAP) or - a product of generators or Singmaster notation + a product of generators or Singmain notation - ``perm_group element`` - returned as an element of ``self`` @@ -917,7 +917,7 @@ def repr2d(self, mv): def plot_cube(self, mv, title=True, colors = [lpurple, yellow, red, green, orange, blue]): r""" - Input the move mv, as a string in the Singmaster notation, and + Input the move mv, as a string in the Singmain notation, and output the 2D plot of the cube in that state. Type ``P.show()`` to display any of the plots below. @@ -935,7 +935,7 @@ def plot_cube(self, mv, title=True, colors = [lpurple, yellow, red, green, orang g = self.parse(mv) state = self.facets(g) #print state - cubies = [create_poly(index2singmaster(state[x]), color_of_square(x+1, colors)) for x in range(48)] + cubies = [create_poly(index2singmain(state[x]), color_of_square(x+1, colors)) for x in range(48)] centers = [create_poly('%s_center' % "ulfrbd"[i], colors[i]) for i in range(6)] clrs = sum(cubies) + sum(centers) clrs.axes(show=False) @@ -953,7 +953,7 @@ def plot3d_cube(self,mv,title=True): INPUT: - - ``mv`` -- A string in the Singmaster notation + - ``mv`` -- A string in the Singmain notation - ``title`` -- (Default: ``True``) Display the title information The first one below is "superflip+4 spot" (in 26q\* moves) and the diff --git a/src/sage/interfaces/expect.py b/src/sage/interfaces/expect.py index a4ddc514c..d7e32be00 100644 --- a/src/sage/interfaces/expect.py +++ b/src/sage/interfaces/expect.py @@ -302,7 +302,7 @@ def pid(self): def _install_hints(self): r""" - Hints for installing needed slave program on your computer. + Hints for installing needed subordinate program on your computer. There are no hints by default. """ @@ -315,17 +315,17 @@ def _install_hints_ssh(self): """ # Written by Paul-Olivier Dehaye 2007/08/23 return """ -In order for Sage (on "local") to launch a "slave" process on "remote", the following command needs to work from local's console, without the need to enter any password: +In order for Sage (on "local") to launch a "subordinate" process on "remote", the following command needs to work from local's console, without the need to enter any password: - "ssh -t remote slave", + "ssh -t remote subordinate", -where "slave" could be "math" (for text-mode Mathematica), "gap", "magma", "sage", "maple", etc. +where "subordinate" could be "math" (for text-mode Mathematica), "gap", "magma", "sage", "maple", etc. This thus requires passwordless authentication to be setup, which can be done with commands like these: cd; ssh-keygen -t rsa; scp .ssh/id_rsa.pub remote:.ssh/authorized_keys2\n (WARNING: this would overwrite your current list of authorized keys on "remote") -In many cases, the server that can actually run "slave" is not accessible from the internet directly, but you have to hop through an intermediate trusted server, say "gate". +In many cases, the server that can actually run "subordinate" is not accessible from the internet directly, but you have to hop through an intermediate trusted server, say "gate". If that is your case, get help with _install_hints_ssh_through_gate(). """ @@ -337,9 +337,9 @@ def _install_hints_ssh_through_gate(self): # Written by Paul-Olivier Dehaye 2007/08/23 return """ - We assume you would like to run a "slave" process on a machine called "remote" from a machine running Sage called "local". We also assume "remote" can only be accessed from "local" by ssh'ing first to "gate" (this is a fairly common setup). Sometimes, "gate" and "remote" have a shared filesystem, and this helps a bit. + We assume you would like to run a "subordinate" process on a machine called "remote" from a machine running Sage called "local". We also assume "remote" can only be accessed from "local" by ssh'ing first to "gate" (this is a fairly common setup). Sometimes, "gate" and "remote" have a shared filesystem, and this helps a bit. - Note: You cannot just create shell scripts on "local" and "gate" that would use two successive SSH connections to "remote" in order to simulate running "slave" locally. This is because Sage will sometimes use files (and scp) to communicate with "remote", which shell scripts would not take care of. + Note: You cannot just create shell scripts on "local" and "gate" that would use two successive SSH connections to "remote" in order to simulate running "subordinate" locally. This is because Sage will sometimes use files (and scp) to communicate with "remote", which shell scripts would not take care of. You need to setup: * passwordless authentication to "gate" from "local" diff --git a/src/sage/interfaces/rubik.py b/src/sage/interfaces/rubik.py index b7e3f1f2d..123aa84f8 100644 --- a/src/sage/interfaces/rubik.py +++ b/src/sage/interfaces/rubik.py @@ -61,7 +61,7 @@ class SingNot: """ - This class is to resolve difference between various Singmaster notation. + This class is to resolve difference between various Singmain notation. Case is ignored, and the second and third letters may be swapped. EXAMPLE: @@ -82,7 +82,7 @@ def __hash__(self): return hash(self.canonical) # This is our list -singmaster_list = [''] + [SingNot(index2singmaster(i+1)) for i in range(48)]; singmaster_list +singmain_list = [''] + [SingNot(index2singmain(i+1)) for i in range(48)]; singmain_list class OptimalSolver: """ @@ -152,8 +152,8 @@ def format_cube(self, facets): L = [] optimal_solver_list = [SingNot(x) for x in optimal_solver_tokens] for f in optimal_solver_format.split(" "): - ix = facets[singmaster_list.index(SingNot(f))-1] - facet = singmaster_list[ix] + ix = facets[singmain_list.index(SingNot(f))-1] + facet = singmain_list[ix] L.append(optimal_solver_list[optimal_solver_list.index(facet)]) return " ".join([str(f) for f in L]) diff --git a/src/sage/misc/sage_input.py b/src/sage/misc/sage_input.py index 52733790c..74034f2ea 100644 --- a/src/sage/misc/sage_input.py +++ b/src/sage/misc/sage_input.py @@ -2198,8 +2198,8 @@ def __repr__(self): sage: from sage.misc.sage_input import SageInputBuilder sage: sib = SageInputBuilder() - sage: sib.dict({'keaton':'general', 'chan':'master'}) - {dict: {{atomic:'keaton'}:{atomic:'general'}, {atomic:'chan'}:{atomic:'master'}}} + sage: sib.dict({'keaton':'general', 'chan':'main'}) + {dict: {{atomic:'keaton'}:{atomic:'general'}, {atomic:'chan'}:{atomic:'main'}}} """ return "{dict: {%s}}" % \ ', '.join([repr(key) + ':' + repr(val) diff --git a/src/sage/parallel/use_fork.py b/src/sage/parallel/use_fork.py index f54faa7ac..0125eb218 100644 --- a/src/sage/parallel/use_fork.py +++ b/src/sage/parallel/use_fork.py @@ -127,10 +127,10 @@ def __call__(self, f, inputs): pid = os.fork() # The way fork works is that pid returns the - # nonzero pid of the subprocess for the master + # nonzero pid of the subprocess for the main # process and returns 0 for the subprocess. if pid: - # This is the parent master process. + # This is the parent main process. workers[pid] = [v[0], walltime(), ''] del v[0] else: