python-mechanize fails to build with Python 3.10.0a2. ====================================================================== ERROR: test_mozilla_cookiejar (test.test_cookies.CookieJarPersistenceTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/mechanize-0.4.5/test/test_cookies.py", line 1266, in test_mozilla_cookiejar new_c = save_and_restore(c, True) File "/builddir/build/BUILD/mechanize-0.4.5/test/test_cookies.py", line 1258, in save_and_restore new_c.load(ignore_discard=ignore_discard) File "/usr/lib64/python3.10/http/cookiejar.py", line 1807, in load self._really_load(f, filename, ignore_discard, ignore_expires) File "/builddir/build/BUILD/mechanize-0.4.5/mechanize/_clientcookie.py", line 199, in _really_load raise LoadError( http.cookiejar.LoadError: '/tmp/tmp7x4y1z7e' does not look like a Netscape format cookies file ====================================================================== ERROR: test_mozilla_cookiejar_embedded_tab (test.test_cookies.CookieJarPersistenceTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/mechanize-0.4.5/test/test_cookies.py", line 1285, in test_mozilla_cookiejar_embedded_tab fh.write(MozillaCookieJar.header + "\n" + AttributeError: type object 'MozillaCookieJar' has no attribute 'header' ====================================================================== ERROR: test_mozilla_cookiejar_initial_dot_violation (test.test_cookies.CookieJarPersistenceTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/mechanize-0.4.5/test/test_cookies.py", line 1306, in test_mozilla_cookiejar_initial_dot_violation fh.write(MozillaCookieJar.header + "\n" + AttributeError: type object 'MozillaCookieJar' has no attribute 'header' ====================================================================== ERROR: test_missing_name (test.test_cookies.CookieTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/mechanize-0.4.5/test/test_cookies.py", line 342, in test_missing_name c.revert(ignore_expires=True, ignore_discard=True) File "/usr/lib64/python3.10/http/cookiejar.py", line 1827, in revert self.load(filename, ignore_discard, ignore_expires) File "/usr/lib64/python3.10/http/cookiejar.py", line 1807, in load self._really_load(f, filename, ignore_discard, ignore_expires) File "/builddir/build/BUILD/mechanize-0.4.5/mechanize/_clientcookie.py", line 199, in _really_load raise LoadError( http.cookiejar.LoadError: '/tmp/tmp7opv565o' does not look like a Netscape format cookies file ====================================================================== ERROR: test_mozilla_cookiejar (test.test_functional.CookieJarTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/mechanize-0.4.5/test/test_functional.py", line 684, in test_mozilla_cookiejar self._test_cookiejar(make_cookiejar, commit) File "/builddir/build/BUILD/mechanize-0.4.5/test/test_functional.py", line 664, in _test_cookiejar cookiejar = make_cookiejar() File "/builddir/build/BUILD/mechanize-0.4.5/test/test_functional.py", line 676, in make_cookiejar cj.revert() File "/usr/lib64/python3.10/http/cookiejar.py", line 1827, in revert self.load(filename, ignore_discard, ignore_expires) File "/usr/lib64/python3.10/http/cookiejar.py", line 1807, in load self._really_load(f, filename, ignore_discard, ignore_expires) File "/builddir/build/BUILD/mechanize-0.4.5/mechanize/_clientcookie.py", line 199, in _really_load raise LoadError( http.cookiejar.LoadError: '/tmp/tmp-TempDirMaker-ztyxts3v/cookies.txt' does not look like a Netscape format cookies file ---------------------------------------------------------------------- Ran 304 tests in 6.257s FAILED (errors=5) sys:1: ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 46807)> sys:1: ResourceWarning: unclosed <socket.socket fd=19, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 38751)> sys:1: ResourceWarning: unclosed <socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 46165)> For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01773231-python-mechanize/ For all our attempts to build python-mechanize with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-mechanize/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/ Let us know here if you have any questions. Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla. The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide. You can either build the package in the side tag, with: $ fedpkg build --target=f35-python Or you can the build and we will eventually build it for you. Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away. Thanks. See also https://fedoraproject.org/wiki/Changes/Python3.10 If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.
*** Bug 1969027 has been marked as a duplicate of this bug. ***
https://src.fedoraproject.org/rpms/python-mechanize/pull-request/3