aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2022-03-26 20:36:11 +0300
committerMatti Picus <matti.picus@gmail.com>2022-03-26 20:36:11 +0300
commit43bc316793001055e1a1bb041cbe99f9db9d3636 (patch)
treeff8ff3a1857dd76b31590956e5dfcbdf38d39925
parentuse __index__ to test for int-ness in ctypes.array (issue 3712) (diff)
downloadpypy-43bc316793001055e1a1bb041cbe99f9db9d3636.tar.gz
pypy-43bc316793001055e1a1bb041cbe99f9db9d3636.tar.bz2
pypy-43bc316793001055e1a1bb041cbe99f9db9d3636.zip
update to v3.7.13
-rw-r--r--lib-python/3/ensurepip/__init__.py9
-rw-r--r--lib-python/3/ensurepip/_bundled/pip-22.0.4-py3-none-any.whlbin0 -> 2123599 bytes
-rw-r--r--lib-python/3/pydoc_data/topics.py2
-rw-r--r--lib-python/3/test/test_minidom.py17
-rw-r--r--lib-python/3/test/test_urllib2.py25
-rw-r--r--lib-python/3/test/test_xml_etree.py6
-rw-r--r--lib-python/3/urllib/request.py8
7 files changed, 44 insertions, 23 deletions
diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py
index 94d40b0c8d..8289c495d3 100644
--- a/lib-python/3/ensurepip/__init__.py
+++ b/lib-python/3/ensurepip/__init__.py
@@ -7,15 +7,12 @@ import tempfile
__all__ = ["version", "bootstrap"]
-
-
+_PACKAGE_NAMES = ('setuptools', 'pip')
_SETUPTOOLS_VERSION = "47.1.0"
-
-_PIP_VERSION = "20.1.1"
-
+_PIP_VERSION = "22.0.4"
_PROJECTS = [
("setuptools", _SETUPTOOLS_VERSION, "py3"),
- ("pip", _PIP_VERSION, "py2.py3"),
+ ("pip", _PIP_VERSION, "py3"),
]
diff --git a/lib-python/3/ensurepip/_bundled/pip-22.0.4-py3-none-any.whl b/lib-python/3/ensurepip/_bundled/pip-22.0.4-py3-none-any.whl
new file mode 100644
index 0000000000..7ba048e245
--- /dev/null
+++ b/lib-python/3/ensurepip/_bundled/pip-22.0.4-py3-none-any.whl
Binary files differ
diff --git a/lib-python/3/pydoc_data/topics.py b/lib-python/3/pydoc_data/topics.py
index f0e0f6db6e..b532fec0d1 100644
--- a/lib-python/3/pydoc_data/topics.py
+++ b/lib-python/3/pydoc_data/topics.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Autogenerated by Sphinx on Fri Sep 3 23:33:01 2021
+# Autogenerated by Sphinx on Wed Mar 16 09:24:05 2022
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
diff --git a/lib-python/3/test/test_minidom.py b/lib-python/3/test/test_minidom.py
index 041a415113..0b76f6e87b 100644
--- a/lib-python/3/test/test_minidom.py
+++ b/lib-python/3/test/test_minidom.py
@@ -5,10 +5,12 @@ import pickle
from test import support
import unittest
+import pyexpat
import xml.dom.minidom
from xml.dom.minidom import parse, Node, Document, parseString
from xml.dom.minidom import getDOMImplementation
+from xml.parsers.expat import ExpatError
tstfile = support.findfile("test.xml", subdir="xmltestdata")
@@ -1146,7 +1148,13 @@ class MinidomTest(unittest.TestCase):
# Verify that character decoding errors raise exceptions instead
# of crashing
- self.assertRaises(UnicodeDecodeError, parseString,
+ if pyexpat.version_info >= (2, 4, 5):
+ self.assertRaises(ExpatError, parseString,
+ b'<fran\xe7ais></fran\xe7ais>')
+ self.assertRaises(ExpatError, parseString,
+ b'<franais>Comment \xe7a va ? Tr\xe8s bien ?</franais>')
+ else:
+ self.assertRaises(UnicodeDecodeError, parseString,
b'<fran\xe7ais>Comment \xe7a va ? Tr\xe8s bien ?</fran\xe7ais>')
doc.unlink()
@@ -1592,7 +1600,12 @@ class MinidomTest(unittest.TestCase):
self.confirm(doc2.namespaceURI == xml.dom.EMPTY_NAMESPACE)
def testExceptionOnSpacesInXMLNSValue(self):
- with self.assertRaisesRegex(ValueError, 'Unsupported syntax'):
+ if pyexpat.version_info >= (2, 4, 5):
+ context = self.assertRaisesRegex(ExpatError, 'syntax error')
+ else:
+ context = self.assertRaisesRegex(ValueError, 'Unsupported syntax')
+
+ with context:
parseString('<element xmlns:abc="http:abc.com/de f g/hi/j k"><abc:foo /></element>')
def testDocRemoveChild(self):
diff --git a/lib-python/3/test/test_urllib2.py b/lib-python/3/test/test_urllib2.py
index fe9a32bfda..3bb4a12e86 100644
--- a/lib-python/3/test/test_urllib2.py
+++ b/lib-python/3/test/test_urllib2.py
@@ -160,7 +160,6 @@ class RequestHdrsTests(unittest.TestCase):
self.assertEqual(find_user_pass("Some Realm",
"http://example.com/spam"),
('joe', 'password'))
-
self.assertEqual(find_user_pass("Some Realm",
"http://example.com/spam/spam"),
('joe', 'password'))
@@ -169,12 +168,29 @@ class RequestHdrsTests(unittest.TestCase):
add("c", "http://example.com/foo", "foo", "ni")
add("c", "http://example.com/bar", "bar", "nini")
+ add("c", "http://example.com/foo/bar", "foobar", "nibar")
self.assertEqual(find_user_pass("c", "http://example.com/foo"),
('foo', 'ni'))
-
self.assertEqual(find_user_pass("c", "http://example.com/bar"),
('bar', 'nini'))
+ self.assertEqual(find_user_pass("c", "http://example.com/foo/"),
+ ('foo', 'ni'))
+ self.assertEqual(find_user_pass("c", "http://example.com/foo/bar"),
+ ('foo', 'ni'))
+ self.assertEqual(find_user_pass("c", "http://example.com/foo/baz"),
+ ('foo', 'ni'))
+ self.assertEqual(find_user_pass("c", "http://example.com/foobar"),
+ (None, None))
+
+ add("c", "http://example.com/baz/", "baz", "ninini")
+
+ self.assertEqual(find_user_pass("c", "http://example.com/baz"),
+ (None, None))
+ self.assertEqual(find_user_pass("c", "http://example.com/baz/"),
+ ('baz', 'ninini'))
+ self.assertEqual(find_user_pass("c", "http://example.com/baz/bar"),
+ ('baz', 'ninini'))
# For the same path, newer password should be considered.
@@ -1642,8 +1658,9 @@ class HandlerTests(unittest.TestCase):
auth_prior_handler.add_password(
None, request_url, user, password, is_authenticated=True)
- is_auth = pwd_manager.is_authenticated(request_url)
- self.assertTrue(is_auth)
+ self.assertTrue(pwd_manager.is_authenticated(request_url))
+ self.assertTrue(pwd_manager.is_authenticated(request_url + '/nested'))
+ self.assertFalse(pwd_manager.is_authenticated(request_url + 'plain'))
opener = OpenerDirector()
opener.add_handler(auth_prior_handler)
diff --git a/lib-python/3/test/test_xml_etree.py b/lib-python/3/test/test_xml_etree.py
index d0c11023e9..92acd991bd 100644
--- a/lib-python/3/test/test_xml_etree.py
+++ b/lib-python/3/test/test_xml_etree.py
@@ -1708,12 +1708,6 @@ class BugsTest(unittest.TestCase):
b"<?xml version='1.0' encoding='ascii'?>\n"
b'<body>t&#227;g</body>')
- def test_issue3151(self):
- e = ET.XML('<prefix:localname xmlns:prefix="${stuff}"/>')
- self.assertEqual(e.tag, '{${stuff}}localname')
- t = ET.ElementTree(e)
- self.assertEqual(ET.tostring(e), b'<ns0:localname xmlns:ns0="${stuff}" />')
-
def test_issue6565(self):
elem = ET.XML("<body><tag/></body>")
self.assertEqual(summarize_list(elem), ['tag'])
diff --git a/lib-python/3/urllib/request.py b/lib-python/3/urllib/request.py
index 16b7e1c509..993fde87b9 100644
--- a/lib-python/3/urllib/request.py
+++ b/lib-python/3/urllib/request.py
@@ -890,10 +890,10 @@ class HTTPPasswordMgr:
return True
if base[0] != test[0]:
return False
- common = posixpath.commonprefix((base[1], test[1]))
- if len(common) == len(base[1]):
- return True
- return False
+ prefix = base[1]
+ if prefix[-1:] != '/':
+ prefix += '/'
+ return test[1].startswith(prefix)
class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr):