forked from pool/python314
- Tools/Demos
- gh-134215: REPL import autocomplete only suggests private
modules when explicitly specified.
- Tests
- gh-133744: Fix multiprocessing interrupt test. Add an event
to synchronize the parent process with the child process:
wait until the child process starts sleeping. Patch by
Victor Stinner.
- gh-133682: Fixed test case
test.test_annotationlib.TestStringFormat.test_displays
which ensures proper handling of complex data structures
(lists, sets, dictionaries, and tuples) in string
annotations.
- gh-133639: Fix
TestPyReplAutoindent.test_auto_indent_default() doesn’t run
input_code.
- Security
- gh-133767: Fix use-after-free in the “unicode-escape”
decoder with a non-“strict” error handler (CVE-2025-4516
bsc#1243273).
- gh-128840: Short-circuit the processing of long IPv6
addresses early in ipaddress to prevent excessive memory
consumption and a minor denial-of-service.
- Library
- gh-132710: If possible, ensure that uuid.getnode()
returns the same result even across different
processes. Previously, the result was constant only within
the same process. Patch by Bénédikt Tran.
- gh-80334: multiprocessing.freeze_support() now checks for
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=71
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):
|