Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions env/lib/python3.7/site-packages/django/apps/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Apps:
"""

def __init__(self, installed_apps=()):
# installed_apps is set to None when creating the master registry
# installed_apps is set to None when creating the main registry
# because it cannot be populated at that point. Other registries must
# provide a list of installed apps and are populated immediately.
if installed_apps is None and hasattr(sys.modules[__name__], 'apps'):
Expand Down Expand Up @@ -54,7 +54,7 @@ def __init__(self, installed_apps=()):
# `lazy_model_operation()` and `do_pending_operations()` methods.
self._pending_operations = defaultdict(list)

# Populate apps and models, unless it's the master registry.
# Populate apps and models, unless it's the main registry.
if installed_apps is not None:
self.populate(installed_apps)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def gettext_noop(s):

# Default email address to use for various automated correspondence from
# the site managers.
DEFAULT_FROM_EMAIL = 'webmaster@localhost'
DEFAULT_FROM_EMAIL = 'webmain@localhost'

# Subject-line prefix for email messages send with django.core.mail.mail_admins
# or ...mail_managers. Make sure to include the trailing space.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def get_table_list(self, cursor):
# Skip the sqlite_sequence system table used for autoincrement key
# generation.
cursor.execute("""
SELECT name, type FROM sqlite_master
SELECT name, type FROM sqlite_main
WHERE type in ('table', 'view') AND NOT name='sqlite_sequence'
ORDER BY name""")
return [TableInfo(row[0], row[1][0]) for row in cursor.fetchall()]
Expand Down Expand Up @@ -101,7 +101,7 @@ def get_relations(self, cursor, table_name):

# Schema for this table
cursor.execute(
"SELECT sql, type FROM sqlite_master "
"SELECT sql, type FROM sqlite_main "
"WHERE tbl_name = %s AND type IN ('table', 'view')",
[table_name]
)
Expand Down Expand Up @@ -131,7 +131,7 @@ def get_relations(self, cursor, table_name):
else:
field_name = field_desc.split()[0].strip('"')

cursor.execute("SELECT sql FROM sqlite_master WHERE tbl_name = %s", [table])
cursor.execute("SELECT sql FROM sqlite_main WHERE tbl_name = %s", [table])
result = cursor.fetchall()[0]
other_table_results = result[0].strip()
li, ri = other_table_results.index('('), other_table_results.rindex(')')
Expand All @@ -157,7 +157,7 @@ def get_key_columns(self, cursor, table_name):
key_columns = []

# Schema for this table
cursor.execute("SELECT sql FROM sqlite_master WHERE tbl_name = %s AND type = %s", [table_name, "table"])
cursor.execute("SELECT sql FROM sqlite_main WHERE tbl_name = %s AND type = %s", [table_name, "table"])
results = cursor.fetchone()[0].strip()
results = results[results.index('(') + 1:results.rindex(')')]

Expand All @@ -182,7 +182,7 @@ def get_primary_key_column(self, cursor, table_name):
"""Return the column name of the primary key for the given table."""
# Don't use PRAGMA because that causes issues with some transactions
cursor.execute(
"SELECT sql, type FROM sqlite_master "
"SELECT sql, type FROM sqlite_main "
"WHERE tbl_name = %s AND type IN ('table', 'view')",
[table_name]
)
Expand Down Expand Up @@ -346,7 +346,7 @@ def get_constraints(self, cursor, table_name):
# Find inline check constraints.
try:
table_schema = cursor.execute(
"SELECT sql FROM sqlite_master WHERE type='table' and name=%s" % (
"SELECT sql FROM sqlite_main WHERE type='table' and name=%s" % (
self.connection.ops.quote_name(table_name),
)
).fetchone()[0]
Expand All @@ -364,7 +364,7 @@ def get_constraints(self, cursor, table_name):
# columns. Discard last 2 columns if there.
number, index, unique = row[:3]
cursor.execute(
"SELECT sql FROM sqlite_master "
"SELECT sql FROM sqlite_main "
"WHERE type='index' AND name=%s" % self.connection.ops.quote_name(index)
)
# There's at most one row.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ def __references_graph(self, table_name):
WITH tables AS (
SELECT %s name
UNION
SELECT sqlite_master.name
FROM sqlite_master
SELECT sqlite_main.name
FROM sqlite_main
JOIN tables ON (sql REGEXP %s || tables.name || %s)
) SELECT name FROM tables;
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ def alter_field(self, model, old_field, new_field, strict=False):
new_column_name = new_field.get_attname_column()[1]
search = references_template % old_column_name
replacement = references_template % new_column_name
cursor.execute('UPDATE sqlite_master SET sql = replace(sql, %s, %s)', (search, replacement))
cursor.execute('UPDATE sqlite_main SET sql = replace(sql, %s, %s)', (search, replacement))
cursor.execute('PRAGMA schema_version = %d' % (schema_version + 1))
cursor.execute('PRAGMA writable_schema = 0')
# The integrity check will raise an exception and rollback
# the transaction if the sqlite_master updates corrupt the
# the transaction if the sqlite_main updates corrupt the
# database.
cursor.execute('PRAGMA integrity_check')
# Perform a VACUUM to refresh the database representation from
# the sqlite_master table.
# the sqlite_main table.
with self.connection.cursor() as cursor:
cursor.execute('VACUUM')
else:
Expand Down
2 changes: 1 addition & 1 deletion env/lib/python3.7/site-packages/django/test/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def session(self):

def request(self, **request):
"""
The master request method. Compose the environment dictionary and pass
The main request method. Compose the environment dictionary and pass
to the handler, return the result of the handler. Assume defaults for
the query environment, which can be overridden using the arguments to
the request.
Expand Down
2 changes: 1 addition & 1 deletion env/lib/python3.7/site-packages/django/test/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class RemoteTestResult:
Record information about which tests have succeeded and which have failed.

The sole purpose of this class is to record events in the child processes
so they can be replayed in the master process. As a consequence it doesn't
so they can be replayed in the main process. As a consequence it doesn't
inherit unittest.TestResult and doesn't attempt to implement all its API.

The implementation matches the unpythonic coding style of unittest2.
Expand Down
2 changes: 1 addition & 1 deletion env/lib/python3.7/site-packages/dns/rdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __ne__(self, other):

def to_text(self, name=None, origin=None, relativize=True,
override_rdclass=None, **kw):
"""Convert the rdataset into DNS master file format.
"""Convert the rdataset into DNS main file format.

See ``dns.name.Name.choose_relativity`` for more information
on how *origin* and *relativize* determine the way names
Expand Down
2 changes: 1 addition & 1 deletion env/lib/python3.7/site-packages/dns/rdtypes/ANY/SOA.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SOA(dns.rdata.Rdata):

"""SOA record

@ivar mname: the SOA MNAME (master name) field
@ivar mname: the SOA MNAME (main name) field
@type mname: dns.name.Name object
@ivar rname: the SOA RNAME (responsible name) field
@type rname: dns.name.Name object
Expand Down
2 changes: 1 addition & 1 deletion env/lib/python3.7/site-packages/dns/rrset.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def match(self, name, rdclass, rdtype, covers, deleting=None):
return True

def to_text(self, origin=None, relativize=True, **kw):
"""Convert the RRset into DNS master file format.
"""Convert the RRset into DNS main file format.

See ``dns.name.Name.choose_relativity`` for more information
on how *origin* and *relativize* determine the way names
Expand Down
6 changes: 3 additions & 3 deletions env/lib/python3.7/site-packages/dns/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

"""Tokenize DNS master file format"""
"""Tokenize DNS main file format"""

from io import StringIO
import sys
Expand Down Expand Up @@ -50,7 +50,7 @@ class UngetBufferFull(dns.exception.DNSException):


class Token(object):
"""A DNS master file format token.
"""A DNS main file format token.

ttype: The token type
value: The token value
Expand Down Expand Up @@ -150,7 +150,7 @@ def __getitem__(self, i):


class Tokenizer(object):
"""A DNS master file format tokenizer.
"""A DNS main file format tokenizer.

A token object is basically a (type, value) tuple. The valid
types are EOF, EOL, WHITESPACE, IDENTIFIER, QUOTED_STRING,
Expand Down
24 changes: 12 additions & 12 deletions env/lib/python3.7/site-packages/dns/zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@ def check_origin(self):
raise NoNS


class _MasterReader(object):
class _MainReader(object):

"""Read a DNS master file
"""Read a DNS main file

@ivar tok: The tokenizer
@type tok: dns.tokenizer.Tokenizer object
Expand Down Expand Up @@ -642,7 +642,7 @@ def _eat_line(self):
break

def _rr_line(self):
"""Process one line from a DNS master file."""
"""Process one line from a DNS main file."""
# Name
if self.current_origin is None:
raise UnknownOrigin
Expand Down Expand Up @@ -775,7 +775,7 @@ def _parse_modify(self, side):
def _generate_line(self):
# range lhs [ttl] [class] type rhs [ comment ]
"""Process one line containing the GENERATE statement from a DNS
master file."""
main file."""
if self.current_origin is None:
raise UnknownOrigin

Expand Down Expand Up @@ -897,7 +897,7 @@ def _generate_line(self):
rds.add(rd, ttl)

def read(self):
"""Read a DNS master file and build a zone object.
"""Read a DNS main file and build a zone object.

@raises dns.zone.NoSOA: No SOA RR was found at the zone origin
@raises dns.zone.NoNS: No NS RRset was found at the zone origin
Expand Down Expand Up @@ -969,7 +969,7 @@ def read(self):
self._generate_line()
else:
raise dns.exception.SyntaxError(
"Unknown master file directive '" + c + "'")
"Unknown main file directive '" + c + "'")
continue
self.tok.unget(token)
self._rr_line()
Expand All @@ -988,12 +988,12 @@ def read(self):
def from_text(text, origin=None, rdclass=dns.rdataclass.IN,
relativize=True, zone_factory=Zone, filename=None,
allow_include=False, check_origin=True):
"""Build a zone object from a master file format string.
"""Build a zone object from a main file format string.

@param text: the master file format input
@param text: the main file format input
@type text: string.
@param origin: The origin of the zone; if not specified, the first
$ORIGIN statement in the master file will determine the origin of the
$ORIGIN statement in the main file will determine the origin of the
zone.
@type origin: dns.name.Name object or string
@param rdclass: The zone's rdata class; the default is class IN.
Expand Down Expand Up @@ -1022,7 +1022,7 @@ def from_text(text, origin=None, rdclass=dns.rdataclass.IN,
if filename is None:
filename = '<string>'
tok = dns.tokenizer.Tokenizer(text, filename)
reader = _MasterReader(tok, origin, rdclass, relativize, zone_factory,
reader = _MainReader(tok, origin, rdclass, relativize, zone_factory,
allow_include=allow_include,
check_origin=check_origin)
reader.read()
Expand All @@ -1032,12 +1032,12 @@ def from_text(text, origin=None, rdclass=dns.rdataclass.IN,
def from_file(f, origin=None, rdclass=dns.rdataclass.IN,
relativize=True, zone_factory=Zone, filename=None,
allow_include=True, check_origin=True):
"""Read a master file and build a zone object.
"""Read a main file and build a zone object.

@param f: file or string. If I{f} is a string, it is treated
as the name of a file to open.
@param origin: The origin of the zone; if not specified, the first
$ORIGIN statement in the master file will determine the origin of the
$ORIGIN statement in the main file will determine the origin of the
zone.
@type origin: dns.name.Name object or string
@param rdclass: The zone's rdata class; the default is class IN.
Expand Down
Loading