Bug 1716342 - python-parallel-ssh fails to build with Python 3.8 (python-gevent needs to update the CodeType call)
Summary: python-parallel-ssh fails to build with Python 3.8 (python-gevent needs to up...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-gevent
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Dan Callaghan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1716514 (view as bug list)
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-06-03 09:26 UTC by Miro Hrončok
Modified: 2019-06-12 08:35 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-12 06:58:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Full log from Copr (178.00 KB, text/plain)
2019-06-03 09:26 UTC, Miro Hrončok
no flags Details

Description Miro Hrončok 2019-06-03 09:26:09 UTC
Created attachment 1576546 [details]
Full log from Copr

python-parallel-ssh 0.91.2-10.fc30 fails to build with Python 3.8.0a4+:


======================================================================
ERROR: test_pssh_client_auth_failure (test_pssh_client.ParallelSSHClientTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/parallel-ssh-0.91.2/tests/test_pssh_client.py", line 183, in test_pssh_client_auth_failure
    cmd.get()
  File "src/gevent/greenlet.py", line 659, in gevent._greenlet.Greenlet.get
  File "src/gevent/greenlet.py", line 312, in gevent._greenlet.Greenlet._raise_exception
  File "src/gevent/greenlet.py", line 484, in gevent._greenlet.Greenlet.exc_info.__get__
  File "/usr/lib64/python3.8/site-packages/gevent/_tblib.py", line 371, in g
    return f(a)
  File "/usr/lib64/python3.8/site-packages/gevent/_tblib.py", line 432, in load_traceback
    return loads(s)
  File "/usr/lib64/python3.8/site-packages/gevent/_tblib.py", line 337, in unpickle_traceback
    return ret.as_traceback()
  File "/usr/lib64/python3.8/site-packages/gevent/_tblib.py", line 202, in as_traceback
    code = CodeType(
TypeError: an integer is required (got type bytes)
...

Full log attached. The code comes from gevent.

For fix, see https://docs.python.org/3.8/whatsnew/3.8.html and search for CodeType.

Comment 1 Miro Hrončok 2019-06-03 15:18:59 UTC
*** Bug 1716514 has been marked as a duplicate of this bug. ***

Comment 2 Miro Hrončok 2019-06-10 16:41:56 UTC
This issue is blocking the Python 3.8 rebuilds. If a package won't build with 3.8, it won't be installable, along with all its dependent packages, after the side tag is merged.
Furthermore, as it fails to install, its dependent packages will fail to install and/or build as well. The fix should be pushed on the master branch and no release bump is required.

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.8: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

This issue needs to be resolved by next week, if other rebuilds of Python 3.8 beta 1 go well. If this is unrealistic for you, let us know how much time you need.

If you don't have free cycles to dedicate fixing your package, notify us and we'll try to provide some pointers. Let us know if we can push a fix directly without a pull request, in the case we happen to have one before you do.

We recommend always consulting with upstream, chances are this is already fixed there.

Comment 3 Dan Callaghan 2019-06-10 21:39:19 UTC
Sorry I didn't pay proper attention to this bug, perhaps because the description mentions the wrong package.

At this point I can't find any upstream issue or patch so I may not have time to urgently dig into this. Any help is appreciated.

From a very quick glance, it's possible this is a change to some stdlib internals which needs to be reflected in gevent. Generally gevent (for better or worse) tends to replicate a lot of stdlib APIs in order to replace them with monkey-patched greenlet-aware versions.

Comment 4 Miro Hrončok 2019-06-10 21:45:21 UTC
The CodeType signature has changed.

https://docs.python.org/3.8/whatsnew/3.8.html

"types.CodeType has a new parameter in the second position of the constructor (posonlyargcount) to support positional-only arguments defined in PEP 570. The first argument (argcount) now represents the total number of positional arguments (including positional-only arguments). A new replace() method of types.CodeType can be used to make the code future-proof."

Comment 5 Victor Stinner 2019-06-11 14:43:07 UTC
I proposed a fix upstream to gevent:
https://github.com/gevent/gevent/pull/1429

Comment 6 Victor Stinner 2019-06-11 15:29:42 UTC
> https://github.com/gevent/gevent/pull/1429

Nice, it's already merged upstream!
https://github.com/gevent/gevent/commit/806713333afa9d490d31c0f9b534031c07467fc7

Here is a PR to backport the change to Fedora Rawhide:
https://src.fedoraproject.org/rpms/python-gevent/pull-request/3

Comment 7 Dan Callaghan 2019-06-12 06:58:56 UTC
This is built for rawhide now: https://koji.fedoraproject.org/koji/buildinfo?buildID=1286208

I'm assuming we don't need an update for any stable releases since they still have Python 3.7.

Comment 8 Miro Hrončok 2019-06-12 08:35:13 UTC
(In reply to Dan Callaghan from comment #7)
> This is built for rawhide now:
> https://koji.fedoraproject.org/koji/buildinfo?buildID=1286208

That was no needed, but doesn't hurt. Thanks.

> I'm assuming we don't need an update for any stable releases since they
> still have Python 3.7.

So does rawhide.


Note You need to log in before you can comment on or make changes to this bug.