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 #31292 -- Fixed django.contrib.gis.gdal.gdal_full_version() crash. #12467

Merged
merged 2 commits into from
Feb 24, 2020

Conversation

vdboor
Copy link
Contributor

@vdboor vdboor commented Feb 18, 2020

The ctypes signature uses a 'c_char_p' type. The gdal_version() was updated in 5330cd5 to reflect that, but gdal_full_version() wasn't updated. It currently raises:

ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type

@hramezani
Copy link
Member

hramezani commented Feb 20, 2020

@vdboor Thanks for the patch.
I think it would be good to open a ticket for this and assign it to yourself.
Please Add a test to prove your fix.

@vdboor
Copy link
Contributor Author

vdboor commented Feb 20, 2020

Thanks, reading the contributing guide I wondered whether that was needed for such small fix.
I've created a ticket in trac: https://code.djangoproject.com/ticket/31292

@hramezani
Copy link
Member

hramezani commented Feb 21, 2020

Thanks for the ticket. the ticket is already accepted.
Please add tests for your patch and assign the ticket to yourself.
When you added the tests, please uncheck the Needs tests flag.

@taylorjohnwood
Copy link

I accepted the ticket and will write tests for this patch this week, sorry @vdboor if you have already started I cant tell because no one has accepted the ticket.

@hramezani
Copy link
Member

Please fix the isort error and then uncheck the Patch needs improvement on the ticket.

@vdboor
Copy link
Contributor Author

vdboor commented Feb 24, 2020

ok, done!

@felixxm felixxm self-assigned this Feb 24, 2020
@felixxm felixxm changed the title Fix calling gdal_full_version() on Python 3 Fixed #31292 -- Fixed django.contrib.gis.gdal.gdal_full_version() crash. Feb 24, 2020
@felixxm
Copy link
Member

felixxm commented Feb 24, 2020

@vdboor Thanks 👍 I moved tests to a separate file, pushed minor edits, and moved a new test for gdal_version() to a separate commit.

@felixxm felixxm merged commit 84e35f4 into django:master Feb 24, 2020
@vdboor vdboor deleted the issue_gdal_version branch February 24, 2020 14:06
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