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

ctypes: Fix ctypesgencore for Python 3 #379

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

wenzeslaus
Copy link
Member

Python 3 sort says 'must use keyword argument for key function'
(Python 2 accepts this new syntax).

The parameter of Signature.update() is used as a hash, so any encoding will do,
but using UTF-8 always for consistency.

Python 3 sort says 'must use keyword argument for key function'
(Python 2 accepts this new syntax).

The parameter of Signature.update() is used as a hash, so any encoding will do,
but using UTF-8 always for consistency.
@wenzeslaus wenzeslaus self-assigned this Feb 26, 2020
@wenzeslaus
Copy link
Member Author

The issue emerged on Ubuntu 18.04 when I was testing CMake build from #348 and it turned out it is the same fix as in #357 with an encoding change (which should be minor in this case). So this replaces #357 which cannot be merged as is.

This may trigger update of lib/python/ctypes/ctypesgencore/parser/parsetab.py on some systems. It did for me on Ubuntu 18.04, but not on Ubuntu 16.04. I also don't understand when these changes should be committed if at all (some local developer's paths are in parsetab.py). So, I'm not including any of these changes and I'm suggesting to see what happens when they land in master, unless somebody has a different suggestion.

(For the review, I'm just asking for feedback the changes I made, not this broader parsetab.py issue.)

@rkanavath
Copy link

As I had already tested this change on a ubuntu and windows msvc, I think it can be merged :)

@wenzeslaus
Copy link
Member Author

Thank you both for the reviews!

@wenzeslaus wenzeslaus merged commit 0736980 into OSGeo:master Feb 26, 2020
@wenzeslaus wenzeslaus deleted the ctypesgencore-python3 branch February 26, 2020 17:47
@neteler
Copy link
Member

neteler commented Feb 27, 2020

@wenzeslaus should this (not) be backported?

@wenzeslaus
Copy link
Member Author

Backport? Maybe, it is probably really needed only for CMake since macOS seems to have similar but different issues. I would suggest to wait couple days if we see people having problems with changes that parsetab.py file.

@neteler
Copy link
Member

neteler commented Feb 28, 2020

ok, I leave it to you then.

@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
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.

4 participants