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

Fixed deprecation warnings #3749

Merged
merged 1 commit into from
Mar 26, 2019
Merged

Fixed deprecation warnings #3749

merged 1 commit into from
Mar 26, 2019

Conversation

radarhere
Copy link
Member

The Python 3.8 Travis job has started failing. A test for no unclosed file warning is failing on a deprecation warning that was recently added - python/cpython@0895793

This PR fixes the situation.

@hugovk
Copy link
Member

hugovk commented Mar 26, 2019

Thanks! Good to see the 3.8-dev build has saved us surprises later!

@QuLogic
Copy link
Contributor

QuLogic commented May 31, 2019

Some of these look a bit suspicious to me. The types were changed from int to Py_ssize_t, but the PyArg_ParseTuple calls still specify i.

@radarhere
Copy link
Member Author

@QuLogic isn't that the change of behaviour that the deprecation warning is describing though?

@QuLogic
Copy link
Contributor

QuLogic commented May 31, 2019

No, the #define only affects types that are # (e.g., y#); it does not affect i (which remains an int).

@QuLogic
Copy link
Contributor

QuLogic commented May 31, 2019

I've written a patch to change the PyArg_ParseTuple calls to n where necessary, but I see that only src/encode.c was really changed. Seemingly-equivalent variables in src/decode.c were not changed, e.g. GIF bits encode vs. decode. I'm fairly certain it will fix #3841, but I need to do more tests.

So would it be better to move to the n type specifier or revert some of these to int?

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.

3 participants