Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Python 3.9 #161

Merged
merged 1 commit into from Apr 22, 2020
Merged

Port to Python 3.9 #161

merged 1 commit into from Apr 22, 2020

Conversation

vstinner
Copy link
Contributor

On Python 3.9, define _Py_DEC_REFTOTAL which has been removed by:
python/cpython@49932fe

Replace also PyEval_CallObjectWithKeywords() with PyObject_Call(),
since PyEval_CallObjectWithKeywords() has been deprecated in
Python 3.9 and PyObject_Call() has the same behavior. The only
difference is that PyEval_CallObjectWithKeywords() can be called with
args=NULL, but g_initialstub() ensures that args is not NULL.

On Python 3.9, define _Py_DEC_REFTOTAL which has been removed by:
python/cpython@49932fe

Replace also PyEval_CallObjectWithKeywords() with PyObject_Call(),
since PyEval_CallObjectWithKeywords() has been deprecated in
Python 3.9 and PyObject_Call() has the same behavior. The only
difference is that PyEval_CallObjectWithKeywords() can be called with
args=NULL, but g_initialstub() ensures that args is not NULL.
@vstinner
Copy link
Contributor Author

I tested manually that tests pass on Python 3.9 on Fedora 31:

$ git clean -fdx
$ tox -e py39
(...)
Ran 63 tests in 0.464s
(...)
  py39: commands succeeded
  congratulations :)

@snaury
Copy link
Contributor

snaury commented Apr 22, 2020

Thank you!

@snaury snaury merged commit c644ca6 into python-greenlet:master Apr 22, 2020
@vstinner vstinner deleted the py39 branch April 22, 2020 12:13
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Jun 3, 2020
* Update magnum from branch 'master'
  - Merge "[hca] Pin fedora to 32 until new greenlet release"
  - [hca] Pin fedora to 32 until new greenlet release
    
    Eventlet used by many openstack packages depends on greenlet which does
    not have a pip release supported by Python 3.9 (default Python version
    on Fedora 33). Therefore, pin Fedora to version 32 until new greenlet
    release is cut which includes the required fix [0].
    
    Also update default heat_container_agent_tag to victoria-dev.
    
    [0] python-greenlet/greenlet#161
    
    Change-Id: Ice75ae880925cd15c096eb6d1cdabf7f802bccde
    Story: 2007264
    Task: 39941
openstack-mirroring pushed a commit to openstack/magnum that referenced this pull request Jun 3, 2020
Eventlet used by many openstack packages depends on greenlet which does
not have a pip release supported by Python 3.9 (default Python version
on Fedora 33). Therefore, pin Fedora to version 32 until new greenlet
release is cut which includes the required fix [0].

Also update default heat_container_agent_tag to victoria-dev.

[0] python-greenlet/greenlet#161

Change-Id: Ice75ae880925cd15c096eb6d1cdabf7f802bccde
Story: 2007264
Task: 39941
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants