Compare commits
4 Commits
e11639880a
...
741f22df24
Author | SHA1 | Date |
---|---|---|
Miss Islington (bot) | 741f22df24 | |
Miss Islington (bot) | 70ced2dd27 | |
Miss Islington (bot) | 8f9313c83f | |
Miss Islington (bot) | 323cbb5531 |
|
@ -1215,7 +1215,7 @@ Instance methods:
|
||||||
|
|
||||||
.. method:: datetime.replace(year=self.year, month=self.month, day=self.day, \
|
.. method:: datetime.replace(year=self.year, month=self.month, day=self.day, \
|
||||||
hour=self.hour, minute=self.minute, second=self.second, microsecond=self.microsecond, \
|
hour=self.hour, minute=self.minute, second=self.second, microsecond=self.microsecond, \
|
||||||
tzinfo=self.tzinfo, * fold=0)
|
tzinfo=self.tzinfo, *, fold=0)
|
||||||
|
|
||||||
Return a datetime with the same attributes, except for those attributes given
|
Return a datetime with the same attributes, except for those attributes given
|
||||||
new values by whichever keyword arguments are specified. Note that
|
new values by whichever keyword arguments are specified. Note that
|
||||||
|
@ -1779,7 +1779,7 @@ Other constructor:
|
||||||
Instance methods:
|
Instance methods:
|
||||||
|
|
||||||
.. method:: time.replace(hour=self.hour, minute=self.minute, second=self.second, \
|
.. method:: time.replace(hour=self.hour, minute=self.minute, second=self.second, \
|
||||||
microsecond=self.microsecond, tzinfo=self.tzinfo, * fold=0)
|
microsecond=self.microsecond, tzinfo=self.tzinfo, *, fold=0)
|
||||||
|
|
||||||
Return a :class:`.time` with the same value, except for those attributes given
|
Return a :class:`.time` with the same value, except for those attributes given
|
||||||
new values by whichever keyword arguments are specified. Note that
|
new values by whichever keyword arguments are specified. Note that
|
||||||
|
|
|
@ -116,7 +116,7 @@ Currently the email package provides only one concrete content manager,
|
||||||
decoding the payload to unicode. The default error handler is
|
decoding the payload to unicode. The default error handler is
|
||||||
``replace``.
|
``replace``.
|
||||||
|
|
||||||
.. method:: set_content(msg, <'str'>, subtype="plain", charset='utf-8' \
|
.. method:: set_content(msg, <'str'>, subtype="plain", charset='utf-8', \
|
||||||
cte=None, \
|
cte=None, \
|
||||||
disposition=None, filename=None, cid=None, \
|
disposition=None, filename=None, cid=None, \
|
||||||
params=None, headers=None)
|
params=None, headers=None)
|
||||||
|
|
|
@ -665,14 +665,14 @@ The ``errors`` module has the following attributes:
|
||||||
|
|
||||||
.. data:: codes
|
.. data:: codes
|
||||||
|
|
||||||
A dictionary mapping numeric error codes to their string descriptions.
|
A dictionary mapping string descriptions to their error codes.
|
||||||
|
|
||||||
.. versionadded:: 3.2
|
.. versionadded:: 3.2
|
||||||
|
|
||||||
|
|
||||||
.. data:: messages
|
.. data:: messages
|
||||||
|
|
||||||
A dictionary mapping string descriptions to their error codes.
|
A dictionary mapping numeric error codes to their string descriptions.
|
||||||
|
|
||||||
.. versionadded:: 3.2
|
.. versionadded:: 3.2
|
||||||
|
|
||||||
|
|
|
@ -446,7 +446,7 @@ class TclTest(unittest.TestCase):
|
||||||
else:
|
else:
|
||||||
self.assertEqual(result, str(i))
|
self.assertEqual(result, str(i))
|
||||||
self.assertIsInstance(result, str)
|
self.assertIsInstance(result, str)
|
||||||
if tcl_version < (8, 5): # bignum was added in Tcl 8.5
|
if get_tk_patchlevel() < (8, 5): # bignum was added in Tcl 8.5
|
||||||
self.assertRaises(TclError, tcl.call, 'expr', str(2**1000))
|
self.assertRaises(TclError, tcl.call, 'expr', str(2**1000))
|
||||||
|
|
||||||
def test_passing_values(self):
|
def test_passing_values(self):
|
||||||
|
|
|
@ -1846,9 +1846,17 @@ class MiscTests(unittest.TestCase):
|
||||||
('ftp', 'joe', 'password', 'proxy.example.com')),
|
('ftp', 'joe', 'password', 'proxy.example.com')),
|
||||||
# Test for no trailing '/' case
|
# Test for no trailing '/' case
|
||||||
('http://joe:password@proxy.example.com',
|
('http://joe:password@proxy.example.com',
|
||||||
('http', 'joe', 'password', 'proxy.example.com'))
|
('http', 'joe', 'password', 'proxy.example.com')),
|
||||||
|
# Testcases with '/' character in username, password
|
||||||
|
('http://user/name:password@localhost:22',
|
||||||
|
('http', 'user/name', 'password', 'localhost:22')),
|
||||||
|
('http://username:pass/word@localhost:22',
|
||||||
|
('http', 'username', 'pass/word', 'localhost:22')),
|
||||||
|
('http://user/name:pass/word@localhost:22',
|
||||||
|
('http', 'user/name', 'pass/word', 'localhost:22')),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
for tc, expected in parse_proxy_test_cases:
|
for tc, expected in parse_proxy_test_cases:
|
||||||
self.assertEqual(_parse_proxy(tc), expected)
|
self.assertEqual(_parse_proxy(tc), expected)
|
||||||
|
|
||||||
|
|
|
@ -779,7 +779,11 @@ def _parse_proxy(proxy):
|
||||||
raise ValueError("proxy URL with no authority: %r" % proxy)
|
raise ValueError("proxy URL with no authority: %r" % proxy)
|
||||||
# We have an authority, so for RFC 3986-compliant URLs (by ss 3.
|
# We have an authority, so for RFC 3986-compliant URLs (by ss 3.
|
||||||
# and 3.3.), path is empty or starts with '/'
|
# and 3.3.), path is empty or starts with '/'
|
||||||
end = r_scheme.find("/", 2)
|
if '@' in r_scheme:
|
||||||
|
host_separator = r_scheme.find('@')
|
||||||
|
end = r_scheme.find("/", host_separator)
|
||||||
|
else:
|
||||||
|
end = r_scheme.find("/", 2)
|
||||||
if end == -1:
|
if end == -1:
|
||||||
end = None
|
end = None
|
||||||
authority = r_scheme[2:end]
|
authority = r_scheme[2:end]
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Allow / character in username, password fields on _PROXY envars.
|
Loading…
Reference in New Issue