Giter VIP home page Giter VIP logo

Comments (6)

mattip avatar mattip commented on July 17, 2024

Could you give a little more syntax? Where did you see this failure? I am still working according to this game plan but I am seeing a different failure, something around DateTimeIndex, when I try to "turn on" pypy testing in upstream pandas in a PR to my fork, here is the error I am seeing.

I know what is happening: somehow the creation of a _Timestamp is not correctly filling in the C side of the "PyPy object + C object" pair, so obj.tzinfo returns a value but this cython macro fails:

((((PyDateTime_DateTime*)o)->hastzinfo) ? ((PyDateTime_DateTime*)o)->tzinfo : Py_None)

I need to whittle that failure down to a smaller reproducer so I can figure out why it happens.

from pandas-feedstock.

lithomas1 avatar lithomas1 commented on July 17, 2024

Sorry for the lack of info.

I'm getting this failure when I import pandas. Maybe this is something conda-forge specific since it doesn't happen in your testing?

(You are also compiling with Cython 3.0 there, I'll give that a shot here)

from pandas-feedstock.

rcurtin avatar rcurtin commented on July 17, 2024

This can be reproduced with the condaforge/miniforge-pypy3:latest Docker container... I did it like this:

$ docker run -it condaforge/miniforge-pypy3:latest /bin/bash
...
# conda install pandas
...
# python3
Python 3.9.17 | packaged by conda-forge | (3f3f2298, Sep 03 2023, 20:18:49)
[PyPy 7.3.12 with GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>> import pandas as pd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/pypy3.9/site-packages/pandas/__init__.py", line 22, in <module>
    from pandas.compat import is_numpy_dev as _is_numpy_dev  # pyright: ignore # noqa:F401
  File "/opt/conda/lib/pypy3.9/site-packages/pandas/compat/__init__.py", line 25, in <module>
    from pandas.compat.numpy import (
  File "/opt/conda/lib/pypy3.9/site-packages/pandas/compat/numpy/__init__.py", line 4, in <module>
    from pandas.util.version import Version
  File "/opt/conda/lib/pypy3.9/site-packages/pandas/util/__init__.py", line 2, in <module>
    from pandas.util._decorators import (  # noqa:F401
  File "/opt/conda/lib/pypy3.9/site-packages/pandas/util/_decorators.py", line 14, in <module>
    from pandas._libs.properties import cache_readonly
  File "/opt/conda/lib/pypy3.9/site-packages/pandas/_libs/__init__.py", line 13, in <module>
    from pandas._libs.interval import Interval
TypeError: type 'cython_function_or_method' is not an acceptable base type

We're encountering this downstream in conda-forge/mlpack-feedstock#48; would be happy to put some workaround in place, but I'm not quite sure what to do.

Thanks!

from pandas-feedstock.

lithomas1 avatar lithomas1 commented on July 17, 2024

To give an update, this looks like a PyPy bug
conda-forge/pypy3.6-feedstock#109

from pandas-feedstock.

bashtage avatar bashtage commented on July 17, 2024

It is not pypy specific. Also gappend with CPython. See the log in #180.

from pandas-feedstock.

lithomas1 avatar lithomas1 commented on July 17, 2024

I see a PyPy log. It shows as PyPy 3.9 for me.

from pandas-feedstock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.