Skip to content

FIX: const-correctness in numpy helpers #19749

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

Merged
merged 1 commit into from
Feb 18, 2018

Conversation

tacaswell
Copy link
Contributor

In python 3.7 the return type of PyUnicode_AsUTF8 changed
from (char *) to (const char *).

PyUnicode_FromString also takes (const char *) as input, also be
explicit about that.

https://bugs.python.org/issue28769
commit 2a404b63d48d73bbaa007d89efb7a01048475acd in cpython

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

In python 3.7 the return type of PyUnicode_AsUTF8 changed
from (char *) to (const char *).

PyUnicode_FromString also takes (const char *) as input, also be
explicit about that.

https://bugs.python.org/issue28769
commit 2a404b63d48d73bbaa007d89efb7a01048475acd in cpython
@jreback jreback added the Compat pandas objects compatability with Numpy or Python functions label Feb 18, 2018
@jreback
Copy link
Contributor

jreback commented Feb 18, 2018

thanks @tacaswell

haven't touched 3.7 yet!!!

@jreback jreback added this to the 0.23.0 milestone Feb 18, 2018
@jreback
Copy link
Contributor

jreback commented Feb 18, 2018

ping on green.

@jreback
Copy link
Contributor

jreback commented Feb 18, 2018

@tcaswell do you have a 3.7 going on CI?

@tacaswell
Copy link
Contributor Author

my day-to-day enviroment at home is cpython master + master branch of most of the scipy stack 😈 .

@codecov
Copy link

codecov bot commented Feb 18, 2018

Codecov Report

Merging #19749 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19749      +/-   ##
==========================================
- Coverage    91.6%    91.6%   -0.01%     
==========================================
  Files         150      150              
  Lines       48864    48864              
==========================================
- Hits        44763    44761       -2     
- Misses       4101     4103       +2
Flag Coverage Δ
#multiple 89.97% <ø> (-0.01%) ⬇️
#single 41.75% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/util/testing.py 83.64% <0%> (-0.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c086a51...f97a40c. Read the comment docs.

@jreback jreback merged commit 9df5ab7 into pandas-dev:master Feb 18, 2018
@jreback
Copy link
Contributor

jreback commented Feb 18, 2018

thanks @tacaswell happy to have these

@tacaswell tacaswell deleted the fix_const_correctness branch February 19, 2018 01:34
harisbal pushed a commit to harisbal/pandas that referenced this pull request Feb 28, 2018
In python 3.7 the return type of PyUnicode_AsUTF8 changed
from (char *) to (const char *).

PyUnicode_FromString also takes (const char *) as input, also be
explicit about that.

https://bugs.python.org/issue28769
commit 2a404b63d48d73bbaa007d89efb7a01048475acd in cpython
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants