Skip to content

Fixed deprecation warnings#3749

Merged
hugovk merged 1 commit intopython-pillow:masterfrom
radarhere:python38
Mar 26, 2019
Merged

Fixed deprecation warnings#3749
hugovk merged 1 commit intopython-pillow:masterfrom
radarhere:python38

Conversation

@radarhere
Copy link
Copy Markdown
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
Copy Markdown
Member

hugovk commented Mar 26, 2019

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

@QuLogic
Copy link
Copy Markdown
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
Copy Markdown
Member Author

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

@QuLogic
Copy link
Copy Markdown
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
Copy Markdown
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