Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add support Python 3.9 #578

Merged
edschofield merged 7 commits into
PythonCharmers:masterPythonCharmers/python-future:masterfrom
shadchin:fix_39shadchin/python-future:fix_39Copy head branch name to clipboard
Feb 21, 2024
Merged

Add support Python 3.9 #578
edschofield merged 7 commits into
PythonCharmers:masterPythonCharmers/python-future:masterfrom
shadchin:fix_39shadchin/python-future:fix_39Copy head branch name to clipboard

Conversation

@shadchin

@shadchin shadchin commented Nov 15, 2020

Copy link
Copy Markdown
Contributor

Fixes #540
Fixes #541
Fixes #474

Rework #544

@sfdye

sfdye commented Nov 24, 2020

Copy link
Copy Markdown
Collaborator

Looks like travis is still failing

@shadchin

Copy link
Copy Markdown
Contributor Author

Yes, urlopen_FileTests.* of tests is falling for Python 3.9, but I don't know how to fix it properly :-(

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Mar 17, 2021
@mgorny

mgorny commented Jun 10, 2021

Copy link
Copy Markdown
Contributor

@shadchin, I think you need to quote non-ASCII characters in URLs, i.e.:

diff --git a/tests/test_future/test_urllib_toplevel.py b/tests/test_future/test_urllib_toplevel.py
index 68bc4c9..923b2e8 100644
--- a/tests/test_future/test_urllib_toplevel.py
+++ b/tests/test_future/test_urllib_toplevel.py
@@ -120,7 +120,7 @@ class urlopen_FileTests(unittest.TestCase):
         finally:
             f.close()
         self.pathname = support.TESTFN
-        self.returned_obj = urlopen("file:%s" % self.pathname)
+        self.returned_obj = urlopen("file:%s" % urllib_parse.quote(self.pathname))
 
     def tearDown(self):
         """Shut down the open object"""
@@ -167,7 +167,7 @@ class urlopen_FileTests(unittest.TestCase):
         self.assertIsInstance(self.returned_obj.info(), email_message.Message)
 
     def test_geturl(self):
-        self.assertEqual(self.returned_obj.geturl(), self.pathname)
+        self.assertEqual(self.returned_obj.geturl(), urllib_parse.quote(self.pathname))
 
     def test_getcode(self):
         self.assertIsNone(self.returned_obj.getcode())

With this change, the tests pass for me.

@edschofield edschofield merged commit 7f494f8 into PythonCharmers:master Feb 21, 2024
@shadchin shadchin deleted the fix_39 branch February 28, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.