-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
pandas is no longer importable with -OO optimization #21071
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
Comments
Hmm OK. Just running locally it looks like it could be fixed adding a condition in 3 places that assume we have a docstring, but don't if you run with those flags. Just out of curiosity do you only have this in your travis configuration or have you placed it somewhere in your unit testing? Think it would be easier to track if we had the latter but off the top of my head not sure how to do that - curious if you have any insight |
You could probably test this with a Python subprocess, but I didn’t bother for xarray so it’s just in our Travis config. |
FWIW in case it's helpful: Bokeh had to define a https://github.com/bokeh/bokeh/blob/master/bokeh/util/string.py#L84-L100 and added a test to maintain working imports with https://github.com/bokeh/bokeh/blob/master/tests/test_python_execution_with_OO.py |
I ran into this bug when packaging an application with cx_Freeze. I have reverted to |
@stonebig you removed your comment, does that mean it was false alarm? |
my problem is still there, but I'm not so sure if this is THIS root cause. I can leave it again : holoviz/holoviews#2738 uploading typical problem in 40' at https://sourceforge.net/projects/winpython/files/WinPython_3.7/3.7.0.1/betas/WinPython64-3.7.0.1rc.exe |
living outside miniconda brings original issues, sorry. |
How is the issue that you posted above related to this one? You don't get the error as in the top post? |
the relationship is that I followed the cause of bokeh not being tested against pandas-0.23.x. |
Code Sample, a copy-pastable example if possible
In your shell:
Problem description
-OO
optimization strips out docstrings, which may give a minor performance boost (I honestly don't know). Nonetheless, users requested that xarray import properly properly with the-OO
flag (pydata/xarray#1706), so we added a regression test that caught this in the latest pandas release (pydata/xarray#1708).Expected Output
Pandas should be imported without any errors.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Darwin
OS-release: 17.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.22.0
pytest: 3.5.0
pip: 9.0.1
setuptools: 39.0.1
Cython: None
numpy: 1.14.2
scipy: None
pyarrow: None
xarray: None
IPython: 6.3.0
sphinx: None
patsy: None
dateutil: 2.7.2
pytz: 2018.3
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: