Title: [future-0.18.0] test urllib2 failed with Python3.8 · Issue #508 · PythonCharmers/python-future · GitHub
Open Graph Title: [future-0.18.0] test urllib2 failed with Python3.8 · Issue #508 · PythonCharmers/python-future
X Title: [future-0.18.0] test urllib2 failed with Python3.8 · Issue #508 · PythonCharmers/python-future
Description: Hi all. I know that Python-3.8.0-rc1 is not supported yet but i wish to point out following error anyway: ____________________________ HandlerTests.test_ftp _____________________________ self = Open Graph Description: Hi all. I know that Python-3.8.0-rc1 is not supported yet but i wish to point out following error anyway: ____________________________ HandlerTests.test_ftp _____________________________ self = X Description: Hi all. I know that Python-3.8.0-rc1 is not supported yet but i wish to point out following error anyway: ____________________________ HandlerTests.test_ftp _____________________________ self = <...
Opengraph URL: https://github.com/PythonCharmers/python-future/issues/508
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[future-0.18.0] test urllib2 failed with Python3.8","articleBody":"Hi all.\r\n\r\nI know that Python-3.8.0-rc1 is not supported yet but i wish to point out following error anyway:\r\n\r\n```\r\n____________________________ HandlerTests.test_ftp _____________________________\r\nself = \u003ctest_future.test_urllib2.HandlerTests testMethod=test_ftp\u003e\r\n def test_ftp(self):\r\n class MockFTPWrapper(object):\r\n def __init__(self, data): self.data = data\r\n def retrfile(self, filename, filetype):\r\n self.filename, self.filetype = filename, filetype\r\n return io.StringIO(self.data), len(self.data)\r\n def close(self): pass\r\n \r\n class NullFTPHandler(urllib_request.FTPHandler):\r\n def __init__(self, data): self.data = data\r\n def connect_ftp(self, user, passwd, host, port, dirs,\r\n timeout=socket._GLOBAL_DEFAULT_TIMEOUT):\r\n self.user, self.passwd = user, passwd\r\n self.host, self.port = host, port\r\n self.dirs = dirs\r\n self.ftpwrapper = MockFTPWrapper(self.data)\r\n return self.ftpwrapper\r\n \r\n import ftplib\r\n data = \"rheum rhaponicum\"\r\n h = NullFTPHandler(data)\r\n h.parent = MockOpener()\r\n \r\n for url, host, port, user, passwd, type_, dirs, filename, mimetype in [\r\n (\"ftp://localhost/foo/bar/baz.html\",\r\n \"localhost\", ftplib.FTP_PORT, \"\", \"\", \"I\",\r\n [\"foo\", \"bar\"], \"baz.html\", \"text/html\"),\r\n (\"ftp://parrot@localhost/foo/bar/baz.html\",\r\n \"localhost\", ftplib.FTP_PORT, \"parrot\", \"\", \"I\",\r\n [\"foo\", \"bar\"], \"baz.html\", \"text/html\"),\r\n (\"ftp://%25parrot@localhost/foo/bar/baz.html\",\r\n \"localhost\", ftplib.FTP_PORT, \"%parrot\", \"\", \"I\",\r\n [\"foo\", \"bar\"], \"baz.html\", \"text/html\"),\r\n (\"ftp://%2542parrot@localhost/foo/bar/baz.html\",\r\n \"localhost\", ftplib.FTP_PORT, \"%42parrot\", \"\", \"I\",\r\n [\"foo\", \"bar\"], \"baz.html\", \"text/html\"),\r\n (\"ftp://localhost:80/foo/bar/\",\r\n \"localhost\", 80, \"\", \"\", \"D\",\r\n [\"foo\", \"bar\"], \"\", None),\r\n (\"ftp://localhost/baz.gif;type=a\",\r\n \"localhost\", ftplib.FTP_PORT, \"\", \"\", \"A\",\r\n [], \"baz.gif\", None), # XXX really this should guess image/gif\r\n ]:\r\n req = Request(url)\r\n req.timeout = None\r\n r = h.ftp_open(req)\r\n # ftp authentication not yet implemented by FTPHandler\r\n self.assertEqual(h.user, user)\r\n self.assertEqual(h.passwd, passwd)\r\n self.assertEqual(h.host, socket.gethostbyname(host))\r\n self.assertEqual(h.port, port)\r\n self.assertEqual(h.dirs, dirs)\r\n self.assertEqual(h.ftpwrapper.filename, filename)\r\n self.assertEqual(h.ftpwrapper.filetype, type_)\r\n headers = r.info()\r\n\u003e self.assertEqual(headers.get(\"Content-type\"), mimetype)\r\nE AssertionError: 'image/gif' != None\r\ntests/test_future/test_urllib2.py:726: AssertionError\r\n__________________________________ test_main ___________________________________\r\nverbose = None\r\n def test_main(verbose=None):\r\n # support.run_doctest(test_urllib2, verbose)\r\n # support.run_doctest(urllib_request, verbose)\r\n tests = (TrivialTests,\r\n OpenerDirectorTests,\r\n HandlerTests,\r\n MiscTests,\r\n RequestTests,\r\n RequestHdrsTests)\r\n\u003e support.run_unittest(*tests)\r\ntests/test_future/test_urllib2.py:1562: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \r\nbuild/lib/future/backports/test/support.py:1665: in run_unittest\r\n _run_suite(suite)\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \r\nsuite = \u003cunittest.suite.TestSuite tests=[None, None, None, None, None, None]\u003e\r\n def _run_suite(suite):\r\n \"\"\"Run tests from a unittest.TestSuite-derived class.\"\"\"\r\n if verbose:\r\n runner = unittest.TextTestRunner(sys.stdout, verbosity=2,\r\n failfast=failfast)\r\n else:\r\n runner = BasicTestRunner()\r\n \r\n result = runner.run(suite)\r\n if not result.wasSuccessful():\r\n if len(result.errors) == 1 and not result.failures:\r\n err = result.errors[0][1]\r\n elif len(result.failures) == 1 and not result.errors:\r\n err = result.failures[0][1]\r\n else:\r\n err = \"multiple errors occurred\"\r\n if not verbose: err += \"; run in verbose mode for details\"\r\n\u003e raise TestFailed(err)\r\nE future.backports.test.support.TestFailed: Traceback (most recent call last):\r\nE File \"/builddir/build/BUILD/python-future-23989c4d61a5e3b2308b107efc1402bc727e8fe6/python3/tests/test_future/test_urllib2.py\", line 726, in test_ftp\r\nE self.assertEqual(headers.get(\"Content-type\"), mimetype)\r\nE AssertionError: 'image/gif' != None\r\nbuild/lib/future/backports/test/support.py:1640: TestFailed\r\n----------------------------- Captured stdout call -----------------------------\r\n```","author":{"url":"https://github.com/sagitter","@type":"Person","name":"sagitter"},"datePublished":"2019-10-12T13:27:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/508/python-future/issues/508"}
route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:792920f9-8d95-4cbb-ccca-2916f2450f42 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id 9754:2839F:327427:437922:69697BA6 html-safe-nonce 84351b80b703b2404489022df850aae13abd8aa3361dcdb6c69fa022b6b2aad4 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzU0OjI4MzlGOjMyNzQyNzo0Mzc5MjI6Njk2OTdCQTYiLCJ2aXNpdG9yX2lkIjoiNjE3MzQ0MTA1MzgwOTM2NjE0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= visitor-hmac d53d7fb25a671ac02c064312fa0e1b46d138b135d7a1383c8139f7850ae4967e hovercard-subject-tag issue:506187033 github-keyboard-shortcuts repository,issues,copilot google-site-verification Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I octolytics-url https://collector.github.com/github/collect analytics-location / fb:app_id 1401488693436528 apple-itunes-app app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PythonCharmers/python-future/508/issue_layout twitter:image https://opengraph.githubassets.com/aa6f3d8ba2c2793ec20c90d90ececd28849e33c8c60e9f951bf9ab35dd125133/PythonCharmers/python-future/issues/508 twitter:card summary_large_image og:image https://opengraph.githubassets.com/aa6f3d8ba2c2793ec20c90d90ececd28849e33c8c60e9f951bf9ab35dd125133/PythonCharmers/python-future/issues/508 og:image:alt Hi all. I know that Python-3.8.0-rc1 is not supported yet but i wish to point out following error anyway: ____________________________ HandlerTests.test_ftp _____________________________ self = og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username sagitter hostname github.com expected-hostname github.com None f33e4b94c8824ab2b434d82a94139432fb5ebee9df4b75304140ad22508c4a77 turbo-cache-control no-preview go-import github.com/PythonCharmers/python-future git https://github.com/PythonCharmers/python-future.git octolytics-dimension-user_id 3365815 octolytics-dimension-user_login PythonCharmers octolytics-dimension-repository_id 11403699 octolytics-dimension-repository_nwo PythonCharmers/python-future octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 11403699 octolytics-dimension-repository_network_root_nwo PythonCharmers/python-future turbo-body-classes logged-out env-production page-responsive disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release 48f380098b30acbb700b04f1724481ca10d574fc ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.