python-libnacl fails to build with Python 3.9.0a3. ERROR: test_save_load (unit.test_save.TestSave) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/libnacl-1.7.1/tests/unit/test_save.py", line 32, in test_save_load bob_load = libnacl.utils.load_key(bob_path) File "/builddir/build/BUILD/libnacl-1.7.1/libnacl/utils.py", line 34, in load_key key_data = json.loads(stream.read(), encoding='UTF-8') File "/usr/lib64/python3.9/json/__init__.py", line 359, in loads return cls(**kw).decode(s) TypeError: __init__() got an unexpected keyword argument 'encoding' ====================================================================== ERROR: test_save_load_secret (unit.test_save.TestSave) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/libnacl-1.7.1/tests/unit/test_save.py", line 63, in test_save_load_secret lbox = libnacl.utils.load_key(box_path) File "/builddir/build/BUILD/libnacl-1.7.1/libnacl/utils.py", line 34, in load_key key_data = json.loads(stream.read(), encoding='UTF-8') File "/usr/lib64/python3.9/json/__init__.py", line 359, in loads return cls(**kw).decode(s) TypeError: __init__() got an unexpected keyword argument 'encoding' ====================================================================== ERROR: test_save_load_sign (unit.test_save.TestSave) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/libnacl-1.7.1/tests/unit/test_save.py", line 74, in test_save_load_sign signer_load = libnacl.utils.load_key(sign_path) File "/builddir/build/BUILD/libnacl-1.7.1/libnacl/utils.py", line 34, in load_key key_data = json.loads(stream.read(), encoding='UTF-8') File "/usr/lib64/python3.9/json/__init__.py", line 359, in loads return cls(**kw).decode(s) TypeError: __init__() got an unexpected keyword argument 'encoding' See https://docs.python.org/3.9/whatsnew/3.9.html#removed "The encoding parameter of json.loads() has been removed. As of Python 3.1, it was deprecated and ignored; using it has emitted a DeprecationWarning since Python 3.8." For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01198911-python-libnacl/ For all our attempts to build python-libnacl with Python 3.9, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-libnacl/ 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.9: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/ Let us know here if you have any questions. Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9. 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.
Upstream issue : https://github.com/saltstack/libnacl/issues/120 . I will raise a PR .
please send me a PR via https://src.fedoraproject.org/rpms/python-libnacl/pull-requests
Upstream PR : https://github.com/saltstack/libnacl/pull/121 . Sorry, is there documentation on how to send PRs to fedora? I couldn't see the source or where to patch/test it.
That requires knowledge of packaging. Patches are usually added like this: https://src.fedoraproject.org/rpms/pytest/c/df813420f685f37e472f5ee1a0f0f3e560004613?branch=master PRs can be done wither via https://src.fedoraproject.org forks or via a "third party PR" pagure feature from any external git repo with public URL and shared history.
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle. Changing version to 32.
Karthikeyan, how can I help with that PR?
Sorry, I didn't have the time to make a PR to fedora package. The upstream PR is merged and is simple feel free to backport as needed.
https://src.fedoraproject.org/rpms/python-libnacl/pull-request/1
(In reply to Petr Viktorin from comment #8) > https://src.fedoraproject.org/rpms/python-libnacl/pull-request/1 Pull request have been merged. Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=42953205
Thank you all.
(In reply to Miro Hrončok from comment #10) > Thank you all. The build failed on Koji, but worked on in my local mock build. Not sure... maybe another bug?
There is a segfault. I think it depends on architecture. I assume your mock is x86_64, the build was on armv7.
(In reply to Miro Hrončok from comment #12) > There is a segfault. I think it depends on architecture. I assume your mock > is x86_64, the build was on armv7. Yes, fedora-rawhide-x86_64
You can try to build until it hits an architecture that passes. I also suggest to file another bug fro you package that it fails to build on arch.
This is actually a subtle upstream bug: https://github.com/saltstack/libnacl/issues/123
Closing this because the "encoding parameter of json.loads() has been removed" part is fixed. Having this bug closed allows us to track more potential Python 3.9 failures. I opened https://bugzilla.redhat.com/show_bug.cgi?id=1820150 for the ARM FTBFS.