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
8 changes: 4 additions & 4 deletions venv/lib/python3.7/site-packages/OpenSSL/SSL.py
Original file line number Diff line number Diff line change
Expand Up @@ -2127,20 +2127,20 @@ def client_random(self):
_lib.SSL_get_client_random(self._ssl, outp, length)
return _ffi.buffer(outp, length)[:]

def master_key(self):
def main_key(self):
"""
Retrieve the value of the master key for this session.
Retrieve the value of the main key for this session.

:return: A string representing the state
"""
session = _lib.SSL_get_session(self._ssl)
if session == _ffi.NULL:
return None

length = _lib.SSL_SESSION_get_master_key(session, _ffi.NULL, 0)
length = _lib.SSL_SESSION_get_main_key(session, _ffi.NULL, 0)
assert length > 0
outp = _no_zero_allocator("unsigned char[]", length)
_lib.SSL_SESSION_get_master_key(session, outp, length)
_lib.SSL_SESSION_get_main_key(session, outp, length)
return _ffi.buffer(outp, length)[:]

def export_keying_material(self, label, olen, context=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def undo():

def pytest_collection(session):
# this hook is only called when test modules are collected
# so for example not in the master process of pytest-xdist
# so for example not in the main process of pytest-xdist
# (which does not collect test modules)
assertstate = getattr(session.config, "_assertstate", None)
if assertstate:
Expand Down
4 changes: 2 additions & 2 deletions venv/lib/python3.7/site-packages/_pytest/cacheprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def pytest_collection_modifyitems(self, session, config, items):

def pytest_sessionfinish(self, session):
config = self.config
if config.getoption("cacheshow") or hasattr(config, "slaveinput"):
if config.getoption("cacheshow") or hasattr(config, "subordinateinput"):
return

saved_lastfailed = config.cache.get("cache/lastfailed", {})
Expand Down Expand Up @@ -251,7 +251,7 @@ def _get_increasing_order(self, items):

def pytest_sessionfinish(self, session):
config = self.config
if config.getoption("cacheshow") or hasattr(config, "slaveinput"):
if config.getoption("cacheshow") or hasattr(config, "subordinateinput"):
return

config.cache.set("cache/nodeids", self.cached_nodeids)
Expand Down
12 changes: 6 additions & 6 deletions venv/lib/python3.7/site-packages/_pytest/junitxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ def pytest_addoption(parser):

def pytest_configure(config):
xmlpath = config.option.xmlpath
# prevent opening xmllog on slave nodes (xdist)
if xmlpath and not hasattr(config, "slaveinput"):
# prevent opening xmllog on subordinate nodes (xdist)
if xmlpath and not hasattr(config, "subordinateinput"):
config._xml = LogXML(
xmlpath,
config.option.junitprefix,
Expand Down Expand Up @@ -435,17 +435,17 @@ def __init__(
def finalize(self, report):
nodeid = getattr(report, "nodeid", report)
# local hack to handle xdist report order
slavenode = getattr(report, "node", None)
reporter = self.node_reporters.pop((nodeid, slavenode))
subordinatenode = getattr(report, "node", None)
reporter = self.node_reporters.pop((nodeid, subordinatenode))
if reporter is not None:
reporter.finalize()

def node_reporter(self, report):
nodeid = getattr(report, "nodeid", report)
# local hack to handle xdist report order
slavenode = getattr(report, "node", None)
subordinatenode = getattr(report, "node", None)

key = nodeid, slavenode
key = nodeid, subordinatenode

if key in self.node_reporters:
# TODO: breasks for --dist=each
Expand Down
2 changes: 1 addition & 1 deletion venv/lib/python3.7/site-packages/_pytest/pastebin.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def pytest_configure(config):
if config.option.pastebin == "all":
tr = config.pluginmanager.getplugin("terminalreporter")
# if no terminal reporter plugin is present, nothing we can do here;
# this can happen when this function executes in a slave node
# this can happen when this function executes in a subordinate node
# when using pytest-xdist, for example
if tr is not None:
# pastebin file will be utf-8 encoded binary file
Expand Down
10 changes: 5 additions & 5 deletions venv/lib/python3.7/site-packages/_pytest/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
from _pytest._code.code import TerminalRepr


def getslaveinfoline(node):
def getsubordinateinfoline(node):
try:
return node._slaveinfocache
return node._subordinateinfocache
except AttributeError:
d = node.slaveinfo
d = node.subordinateinfo
ver = "%s.%s.%s" % d["version_info"][:3]
node._slaveinfocache = s = "[%s] %s -- Python %s %s" % (
node._subordinateinfocache = s = "[%s] %s -- Python %s %s" % (
d["id"],
d["sysplatform"],
ver,
Expand All @@ -26,7 +26,7 @@ def __init__(self, **kw):

def toterminal(self, out):
if hasattr(self, "node"):
out.line(getslaveinfoline(self.node))
out.line(getsubordinateinfoline(self.node))

longrepr = self.longrepr
if longrepr is None:
Expand Down
4 changes: 2 additions & 2 deletions venv/lib/python3.7/site-packages/_pytest/resultlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def pytest_addoption(parser):

def pytest_configure(config):
resultlog = config.option.resultlog
# prevent opening resultlog on slave nodes (xdist)
if resultlog and not hasattr(config, "slaveinput"):
# prevent opening resultlog on subordinate nodes (xdist)
if resultlog and not hasattr(config, "subordinateinput"):
dirname = os.path.dirname(os.path.abspath(resultlog))
if not os.path.isdir(dirname):
os.makedirs(dirname)
Expand Down
10 changes: 5 additions & 5 deletions venv/lib/python3.7/site-packages/execnet/gateway_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ def readline(self):
class BaseGateway(object):
exc_info = sys.exc_info
_sysex = sysex
id = "<slave>"
id = "<subordinate>"

def __init__(self, io, id, _startcount=2):
self.execmodel = io.execmodel
Expand Down Expand Up @@ -1007,7 +1007,7 @@ def join(self, timeout=None):
self._receivepool.waitall()


class SlaveGateway(BaseGateway):
class SubordinateGateway(BaseGateway):

def _local_schedulexec(self, channel, sourcetask):
sourcetask = loads_internal(sourcetask)
Expand Down Expand Up @@ -1048,7 +1048,7 @@ def trace(msg):
trace("joining receiver thread")
self.join()
except KeyboardInterrupt:
# in the slave we can't really do anything sensible
# in the subordinate we can't really do anything sensible
trace("swallowing keyboardinterrupt, serve finished")

def executetask(self, item):
Expand Down Expand Up @@ -1530,5 +1530,5 @@ def init_popen_io(execmodel):


def serve(io, id):
trace("creating slavegateway on %r" % (io,))
SlaveGateway(io=io, id=id, _startcount=2).serve()
trace("creating subordinategateway on %r" % (io,))
SubordinateGateway(io=io, id=id, _startcount=2).serve()
6 changes: 3 additions & 3 deletions venv/lib/python3.7/site-packages/execnet/gateway_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def bootstrap_import(io, spec):
"sys.stdout.write('1')",
"sys.stdout.flush()",
"execmodel = get_execmodel(%r)" % spec.execmodel,
"serve(init_popen_io(execmodel), id='%s-slave')" % spec.id,
"serve(init_popen_io(execmodel), id='%s-subordinate')" % spec.id,
)
s = io.read(1)
assert s == "1".encode('ascii'), repr(s)
Expand All @@ -40,7 +40,7 @@ def bootstrap_exec(io, spec):
"execmodel = get_execmodel(%r)" % spec.execmodel,
'io = init_popen_io(execmodel)',
"io.write('1'.encode('ascii'))",
"serve(io, id='%s-slave')" % spec.id,
"serve(io, id='%s-subordinate')" % spec.id,
)
s = io.read(1)
assert s == "1".encode('ascii')
Expand All @@ -64,7 +64,7 @@ def bootstrap_socket(io, id):
" execmodel = get_execmodel('thread')",
"io = SocketIO(clientsock, execmodel)",
"io.write('1'.encode('ascii'))",
"serve(io, id='%s-slave')" % id,
"serve(io, id='%s-subordinate')" % id,
)
s = io.read(1)
assert s == "1".encode('ascii')
Expand Down
28 changes: 14 additions & 14 deletions venv/lib/python3.7/site-packages/execnet/gateway_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from functools import partial


class Popen2IOMaster(Popen2IO):
class Popen2IOMain(Popen2IO):
def __init__(self, args, execmodel):
self.popen = p = execmodel.PopenPiped(args)
Popen2IO.__init__(self, p.stdin, p.stdout, execmodel=execmodel)
Expand Down Expand Up @@ -123,23 +123,23 @@ def vagrant_ssh_args(spec):
def create_io(spec, execmodel):
if spec.popen:
args = popen_args(spec)
return Popen2IOMaster(args, execmodel)
return Popen2IOMain(args, execmodel)
if spec.ssh:
args = ssh_args(spec)
io = Popen2IOMaster(args, execmodel)
io = Popen2IOMain(args, execmodel)
io.remoteaddress = spec.ssh
return io
if spec.vagrant_ssh:
args = vagrant_ssh_args(spec)
io = Popen2IOMaster(args, execmodel)
io = Popen2IOMain(args, execmodel)
io.remoteaddress = spec.vagrant_ssh
return io

#
# Proxy Gateway handling code
#
# master: proxy initiator
# forwarder: forwards between master and sub
# main: proxy initiator
# forwarder: forwards between main and sub
# sub: sub process that is proxied to the initiator

RIO_KILL = 1
Expand All @@ -150,9 +150,9 @@ def create_io(spec, execmodel):

class ProxyIO(object):
""" A Proxy IO object allows to instantiate a Gateway
through another "via" gateway. A master:ProxyIO object
through another "via" gateway. A main:ProxyIO object
provides an IO object effectively connected to the sub
via the forwarder. To achieve this, master:ProxyIO interacts
via the forwarder. To achieve this, main:ProxyIO interacts
with forwarder:serve_proxy_io() which itself
instantiates and interacts with the sub.
"""
Expand Down Expand Up @@ -211,7 +211,7 @@ def serve_proxy_io(proxy_channelX):
control_chan = proxy_channelX.receive()
log("got control chan", control_chan)

# read data from master, forward it to the sub
# read data from main, forward it to the sub
# XXX writing might block, thus blocking the receiver thread
def forward_to_sub(data):
log("forward data to sub, size %s" % len(data))
Expand All @@ -229,15 +229,15 @@ def controll(data):
control_chan.send(sub_io.close_write())
control_chan.setcallback(controll)

# write data to the master coming from the sub
forward_to_master_file = proxy_channelX.makefile("w")
# write data to the main coming from the sub
forward_to_main_file = proxy_channelX.makefile("w")

# read bootstrap byte from sub, send it on to master
# read bootstrap byte from sub, send it on to main
log('reading bootstrap byte from sub', spec.id)
initial = sub_io.read(1)
assert initial == '1'.encode('ascii'), initial
log('forwarding bootstrap byte from sub', spec.id)
forward_to_master_file.write(initial)
forward_to_main_file.write(initial)

# enter message forwarding loop
while True:
Expand All @@ -246,7 +246,7 @@ def controll(data):
except EOFError:
log('EOF from sub, terminating proxying loop', spec.id)
break
message.to_io(forward_to_master_file)
message.to_io(forward_to_main_file)
# proxy_channelX will be closed from remote_exec's finalization code

if __name__ == "__channelexec__":
Expand Down
8 changes: 4 additions & 4 deletions venv/lib/python3.7/site-packages/execnet/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ def makegateway(self, spec=None):
spec.execmodel = self.remote_execmodel.backend
if spec.via:
assert not spec.socket
master = self[spec.via]
proxy_channel = master.remote_exec(gateway_io)
main = self[spec.via]
proxy_channel = main.remote_exec(gateway_io)
proxy_channel.send(vars(spec))
proxy_io_master = gateway_io.ProxyIO(proxy_channel, self.execmodel)
gw = gateway_bootstrap.bootstrap(proxy_io_master, spec)
proxy_io_main = gateway_io.ProxyIO(proxy_channel, self.execmodel)
gw = gateway_bootstrap.bootstrap(proxy_io_main, spec)
elif spec.popen or spec.ssh or spec.vagrant_ssh:
io = gateway_io.create_io(spec, execmodel=self.execmodel)
gw = gateway_bootstrap.bootstrap(io, spec)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ class RefreshOption(_Constants):
'HOSTS': (1 << 3, 'Flush host cache'),
'STATUS': (1 << 4, 'Flush status variables'),
'THREADS': (1 << 5, 'Flush thread cache'),
'SLAVE': (1 << 6, 'Reset master info and restart slave thread'),
'SLAVE': (1 << 6, 'Reset main info and restart subordinate thread'),
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
CR_EMBEDDED_CONNECTION = u"Embedded server"
CR_PROBE_SLAVE_STATUS = u"Error on SHOW SLAVE STATUS:"
CR_PROBE_SLAVE_HOSTS = u"Error on SHOW SLAVE HOSTS:"
CR_PROBE_SLAVE_CONNECT = u"Error connecting to slave:"
CR_PROBE_MASTER_CONNECT = u"Error connecting to master:"
CR_PROBE_SLAVE_CONNECT = u"Error connecting to subordinate:"
CR_PROBE_MASTER_CONNECT = u"Error connecting to main:"
CR_SSL_CONNECTION_ERROR = u"SSL connection error: %-.100s"
CR_MALFORMED_PACKET = u"Malformed packet"
CR_WRONG_LICENSE = u"This client library is licensed only for use with MySQL servers having '%s' license"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

Authors:
Pearu Peterson <pearu@cens.ioc.ee>, February 2002
David M. Cooke <cookedm@physics.mcmaster.ca>, April 2002
David M. Cooke <cookedm@physics.mcmain.ca>, April 2002

Copyright 2002 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def test(self, label='fast', verbose=1, extra_argv=None,

# reset doctest state on every run
import doctest
doctest.master = None
doctest.main = None

if raise_warnings is None:
raise_warnings = self.raise_warnings
Expand Down
2 changes: 1 addition & 1 deletion venv/lib/python3.7/site-packages/pip/_internal/vcs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def update(self, dest, url, rev_options):
self.run_command(['fetch', '-q', '--tags'], cwd=dest)
else:
self.run_command(['fetch', '-q'], cwd=dest)
# Then reset to wanted revision (maybe even origin/master)
# Then reset to wanted revision (maybe even origin/main)
rev_options = self.resolve_revision(dest, url, rev_options)
cmd_args = ['reset', '--hard', '-q'] + rev_options.to_args()
self.run_command(cmd_args, cwd=dest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,9 @@ def __init__(self, entries=None):
self.add_entry(entry)

@classmethod
def _build_master(cls):
def _build_main(cls):
"""
Prepare the master working set.
Prepare the main working set.
"""
ws = cls()
try:
Expand Down Expand Up @@ -3239,9 +3239,9 @@ def _initialize(g=globals()):


@_call_aside
def _initialize_master_working_set():
def _initialize_main_working_set():
"""
Prepare the master working set and make the ``require()``
Prepare the main working set and make the ``require()``
API available.

This function has explicit effects on the global state
Expand All @@ -3251,7 +3251,7 @@ def _initialize_master_working_set():
Invocation by other packages is unsupported and done
at their own risk.
"""
working_set = WorkingSet._build_master()
working_set = WorkingSet._build_main()
_declare_state('object', working_set=working_set)

require = working_set.require
Expand Down
4 changes: 2 additions & 2 deletions venv/lib/python3.7/site-packages/pycares/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,12 +645,12 @@ def __init__(self, hostent, ttl, aliases):


class ares_query_soa_result(AresResult):
__slots__ = ('nsname', 'hostmaster', 'serial', 'refresh', 'retry', 'expires', 'minttl', 'ttl')
__slots__ = ('nsname', 'hostmain', 'serial', 'refresh', 'retry', 'expires', 'minttl', 'ttl')
type = 'SOA'

def __init__(self, soa):
self.nsname = maybe_str(_ffi.string(soa.nsname))
self.hostmaster = maybe_str(_ffi.string(soa.hostmaster))
self.hostmain = maybe_str(_ffi.string(soa.hostmain))
self.serial = soa.serial
self.refresh = soa.refresh
self.retry = soa.retry
Expand Down
Loading