Skip to content

pandas.__version__ is 2.3.0+4.g1dfc98e16a in pandas 2.3.0 and python 3.9, not 2.3.0 #61579

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

Open
harupy opened this issue Jun 6, 2025 · 8 comments
Labels

Comments

@harupy
Copy link
Contributor

harupy commented Jun 6, 2025

How to reproduce:

docker run --rm python:3.9 bash -c "pip install pandas && python -c 'import pandas; print(pandas.__version__)'"

Output:

% docker run --rm python:3.9 bash -c "pip install pandas && python -c 'import pandas; print(pandas.__version__)'"

... # pip install logs

2.3.0+4.g1dfc98e16a

Seems related to #61563 (comment)

@harupy harupy changed the title pandas.__version__ is 2.3.0+4.g1dfc98e16a in pandas 2.3.0 pandas.__version__ is 2.3.0+4.g1dfc98e16a in pandas 2.3.0, not 2.3.0 Jun 6, 2025
@harupy harupy changed the title pandas.__version__ is 2.3.0+4.g1dfc98e16a in pandas 2.3.0, not 2.3.0 pandas.__version__ is 2.3.0+4.g1dfc98e16a in pandas 2.3.0 and python 3.9, not 2.3.0 Jun 6, 2025
@harupy
Copy link
Contributor Author

harupy commented Jun 6, 2025

@mroeschke Is this expected?

@shinny-taojiachun
Copy link

I can confirm this.
This breaks our pandas version check function in our sdk
https://github.com/shinnytech/tqsdk-ci/actions/runs/15481907073/job/43589180749

Image

@harupy
Copy link
Contributor Author

harupy commented Jun 6, 2025

@shinny-taojiachun importlib.metadata.version should work as a workaround.

@shinny-taojiachun
Copy link

@harupy Thank you for your assistant. We are aware what we use in the past may not be the best practice.
Newer release of our sdk should change to better version check. But releasing newer version takes a lot of time.

Meanwhile, this issue is blocking our users from using our sdk, especially new installation and upgrading of our sdk.

@datapythonista
Copy link
Member

I can confirm this happens to me, only for 3.9 and pandas installed via pip (installed via conda-forge has the right version)

@alexkuzmik
Copy link

Same problem.

@yaricom
Copy link

yaricom commented Jun 6, 2025

Broken ydata-profiling integration due to this error.

../../../venv3.9/lib/python3.9/site-packages/ydata_profiling/__init__.py:10: in <module>
    from ydata_profiling.compare_reports import compare  # isort:skip # noqa
../../../venv3.9/lib/python3.9/site-packages/ydata_profiling/compare_reports.py:12: in <module>
    from ydata_profiling.profile_report import ProfileReport
../../../venv3.9/lib/python3.9/site-packages/ydata_profiling/profile_report.py:26: in <module>
    from visions import VisionsTypeset
../../../venv3.9/lib/python3.9/site-packages/visions/__init__.py:4: in <module>
    from visions.backends import *
../../../venv3.9/lib/python3.9/site-packages/visions/backends/__init__.py:9: in <module>
    import visions.backends.pandas
../../../venv3.9/lib/python3.9/site-packages/visions/backends/pandas/__init__.py:2: in <module>
    import visions.backends.pandas.types
../../../venv3.9/lib/python3.9/site-packages/visions/backends/pandas/types/__init__.py:1: in <module>
    import visions.backends.pandas.types.boolean
../../../venv3.9/lib/python3.9/site-packages/visions/backends/pandas/types/boolean.py:11: in <module>
    from visions.backends.pandas.test_utils import (
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
../../../venv3.9/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:184: in exec_module
    exec(co, module.__dict__)
../../../venv3.9/lib/python3.9/site-packages/visions/backends/pandas/test_utils.py:12: in <module>
    pandas_version = tuple(int(i) for i in pd.__version__.split("."))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <list_iterator object at 0x10eb67400>

>   pandas_version = tuple(int(i) for i in pd.__version__.split("."))
E   ValueError: invalid literal for int() with base 10: '0+4'

../../../venv3.9/lib/python3.9/site-packages/visions/backends/pandas/test_utils.py:12: ValueError

@mroeschke
Copy link
Member

Apologies, yes this is unexpected. This was due to having to release 3.9 wheels in an unorthodox way #61569 with context in #61563 (comment)

(Removing the good first issue since the fix just involves releasing pandas though our normal mechanisms)

@mroeschke mroeschke mentioned this issue Jun 6, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants