Skip to content

CI/COMPAT: PyUnicode_FromUnicode is deprecated failure on 3.9 CI #34881

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

Closed
jorisvandenbossche opened this issue Jun 20, 2020 · 8 comments
Closed
Labels
CI Continuous Integration Closing Candidate May be closeable, needs more eyeballs Compat pandas objects compatability with Numpy or Python functions

Comments

@jorisvandenbossche
Copy link
Member

The 3.9-dev build started failing (eg https://travis-ci.org/github/pandas-dev/pandas/jobs/700233890):

    pandas/_libs/parsers.c: In function ‘__Pyx_decode_c_string’:
    pandas/_libs/parsers.c:56645:9: error: ‘PyUnicode_FromUnicode’ is deprecated [-Werror=deprecated-declarations]
             return PyUnicode_FromUnicode(NULL, 0);
             ^~~~~~
    In file included from /opt/python/3.9-dev/include/python3.9/unicodeobject.h:1026:0,
                     from /opt/python/3.9-dev/include/python3.9/Python.h:97,
                     from pandas/_libs/parsers.c:57:
    /opt/python/3.9-dev/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
     Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
                                              ^~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

See https://docs.python.org/3.9/c-api/unicode.html#c.PyUnicode_FromUnicode

@jorisvandenbossche jorisvandenbossche added CI Continuous Integration Compat pandas objects compatability with Numpy or Python functions labels Jun 20, 2020
@jorisvandenbossche jorisvandenbossche added this to the 1.1 milestone Jun 20, 2020
@jorisvandenbossche
Copy link
Member Author

It doesn't seem we are using this method directly ourselves. Might be coming from cython: cython/cython#3678

@alimcmaster1
Copy link
Member

I also get this on 3.8 locally when building C extentions. (Also see the same on a few jobs)

ImportError while loading conftest '/home/travis/build/pandas-dev/pandas/pandas/conftest.py'.
pandas/__init__.py:34: in <module>
    raise ImportError(
E   ImportError: C extension: 'dtypes' from partially initialized module 'pandas._libs.tslibs' (most likely due to a circular import) (/home/travis/build/pandas-dev/pandas/pandas/_libs/tslibs/__init__.py) not built.

@jreback
Copy link
Contributor

jreback commented Jun 20, 2020

moving the 3.9 build for now to allowed failures in #34894 (actually was in there but incorrectly so didn't work)

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jul 7, 2020

It doesn't seem we are using this method directly ourselves. Might be coming from cython: cython/cython#3678

It looks like we're using it at https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/parsers.pyx#L28-L29.

Edit: Sorry that's PyUnicode_FromString which is not deprecated.

@jreback jreback modified the milestones: 1.1, 1.1.1 Jul 10, 2020
@simonjayhawkins simonjayhawkins modified the milestones: 1.1.1, 1.2 Aug 18, 2020
@simonjayhawkins
Copy link
Member

moved off 1.1.1 milestone (scheduled for this week) as no PRs to fix in the pipeline

@simonjayhawkins
Copy link
Member

removing milestone

@simonjayhawkins simonjayhawkins removed this from the 1.3 milestone Jun 11, 2021
@jbrockmendel
Copy link
Member

How do we check if this is resolved?

@jbrockmendel jbrockmendel added the Closing Candidate May be closeable, needs more eyeballs label Dec 8, 2021
@mroeschke
Copy link
Member

Hmm appears that we aren't seeing this on our 3.9 builds in Github Actions anymore. I'm assuming this has been resolved so closing, but we can reopen if this reappears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Closing Candidate May be closeable, needs more eyeballs Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

No branches or pull requests

7 participants