forked from pool/python314
- Library
- gh-137426: Remove the code deprecation of
importlib.abc.ResourceLoader. It is documented as
deprecated, but left for backwards compatibility with other
classes in importlib.abc.
- gh-137282: Fix tab completion and dir() on
concurrent.futures.
- gh-137257: Bump the version of pip bundled in ensurepip to
version 25.2
- gh-137226: Fix behavior of
annotationlib.ForwardRef.evaluate() when the type_params
parameter is passed and the name of a type param is also
present in an enclosing scope.
- gh-130522: Fix unraisable TypeError raised during
interpreter shutdown in the threading module.
- gh-137059: Fix handling of file URLs with a
Windows drive letter in the URL authority by
urllib.request.url2pathname(). This fixes a regression in
earlier pre-releases of Python 3.14.
- gh-130577: tarfile now validates archives to ensure member
offsets are non-negative. (Contributed by Alexander Enrique
Urieles Nieto in gh-130577; CVE-2025-8194, bsc#1247249).
- gh-135228: When dataclasses replaces a class with a slotted
dataclass, the original class can now be garbage collected
again. Earlier changes in Python 3.14 caused this class to
always remain in existence together with the replacement
class synthesized by dataclasses.
- Documentation
- gh-136155: We are now checking for fatal errors in EPUB
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=91
41 lines
1.2 KiB
Diff
41 lines
1.2 KiB
Diff
---
|
|
Lib/test/test_urllib2.py | 9 +++++++++
|
|
1 file changed, 9 insertions(+)
|
|
|
|
--- a/Lib/test/test_urllib2.py
|
|
+++ b/Lib/test/test_urllib2.py
|
|
@@ -1,3 +1,4 @@
|
|
+import logging
|
|
import unittest
|
|
from test import support
|
|
from test.support import os_helper
|
|
@@ -29,6 +30,10 @@ import http.client
|
|
|
|
support.requires_working_socket(module=True)
|
|
|
|
+logging.basicConfig(format='%(levelname)s:%(funcName)s:%(message)s',
|
|
+ level=logging.DEBUG)
|
|
+log = logging.getLogger()
|
|
+
|
|
# XXX
|
|
# Request
|
|
# CacheFTPHandler (hard to write)
|
|
@@ -731,6 +736,9 @@ def sanepathname2url(path):
|
|
|
|
class HandlerTests(unittest.TestCase):
|
|
|
|
+ def setUp(self):
|
|
+ log.debug('Is network available: {}'.format(support.is_resource_enabled('network')))
|
|
+
|
|
def test_ftp(self):
|
|
class MockFTPWrapper:
|
|
def __init__(self, data):
|
|
@@ -794,6 +802,7 @@ class HandlerTests(unittest.TestCase):
|
|
self.assertEqual(headers.get("Content-type"), mimetype)
|
|
self.assertEqual(int(headers["Content-length"]), len(data))
|
|
|
|
+ @support.requires_resource('network')
|
|
def test_ftp_error(self):
|
|
class ErrorFTPHandler(urllib.request.FTPHandler):
|
|
def __init__(self, exception):
|