Skip to content
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

Remove -Werror from setup.py #33315

Closed
xhochy opened this issue Apr 6, 2020 · 26 comments · Fixed by #38087
Closed

Remove -Werror from setup.py #33315

xhochy opened this issue Apr 6, 2020 · 26 comments · Fixed by #38087
Labels
Build Library building on various platforms CI Continuous Integration
Milestone

Comments

@xhochy
Copy link
Contributor

xhochy commented Apr 6, 2020

It seems nice to have -Werror in CI but as a conda-forge maintainer I quite often have to write patches to remove -Werror from releases as the system distributions build packages on are not identical to the ones CI of upstream runs on. There is a large variety of compiler warnings and some may only show up when other C-defines are set. Also many new warning appear when you build with a newer compiler or different versions of the dependencies used.

My suggestion would be:

  • Remove -Werror from setup.py.
  • Add -Werror to CFLAGS on CI to have the same result for pandas-dev as it is currently.

Original PR: #32163

Related issues: #33314, #33224

@xhochy xhochy added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 6, 2020
@simonjayhawkins simonjayhawkins added Build Library building on various platforms CI Continuous Integration and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 6, 2020
@TomAugspurger
Copy link
Contributor

cc @WillAyd @jbrockmendel

@jbrockmendel
Copy link
Member

Works for me

@WillAyd
Copy link
Member

WillAyd commented Apr 6, 2020

Unless there is an urgent need for this I would prefer not to. Haven't looked into the latest issue you have opened, but of anything else to date they are upstream bugs that we have since raised back with those projects; we wouldn't have visibility to those otherwise

@TomAugspurger
Copy link
Contributor

we wouldn't have visibility to those otherwise

We would still catch these on CI by setting CFLAGS. This would just remove the issue for contributors and packagers (whose environments are out of our control).

@WillAyd
Copy link
Member

WillAyd commented Apr 6, 2020

We would still catch these on CI by setting CFLAGS. This would just remove the issue for contributors and packagers (whose environments are out of our control).

Those issues weren't discovered by CI but rather by contributors, so if we do what I think is suggested here we won't discover those issues.

Understood on packaging but is there not a concrete set of warnings we can ignore via -Wno-error switches instead of globally disabling?

@TomAugspurger
Copy link
Contributor

OK. I haven't followed the issues too closely.

While I'm here, I'm trying to run ASV on a branch but I'm seeing

   gcc -bundle -undefined dynamic_lookup -L/Users/taugspurger/sandbox/pandas-asv/asv_bench/env/40d026129f63c107b1ac48bf9ad6964c/lib -arch x86_64 -L/Users/taugspurger/sandbox/pandas-asv/asv_bench/env/40d026129f63c107b1ac48bf9ad6964c/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.9-x86_64-3.6/pandas/_libs/join.o -o build/lib.macosx-10.9-x86_64-3.6/pandas/_libs/join.cpython-36m-darwin.so
   STDERR -------->
   warning: pandas/_libs/groupby.pyx:1097:26: Unreachable code

How would I debug that?

@WillAyd
Copy link
Member

WillAyd commented Apr 7, 2020 via email

@TomAugspurger
Copy link
Contributor

Ah gotcha. So even though that's warning it's not causing the failure. My failure seems to come from the use of a deprecated macro

create environment

conda create -n tmp-pandas-dev python=3.8 cython python-dateutil pytz numpy -y --quiet
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /Users/taugspurger/miniconda3/envs/tmp-pandas-dev

  added / updated specs:
    - cython
    - numpy
    - python-dateutil
    - python=3.8
    - pytz


The following NEW packages will be INSTALLED:

  blas               pkgs/main/osx-64::blas-1.0-mkl
  ca-certificates    pkgs/main/osx-64::ca-certificates-2020.1.1-0
  certifi            pkgs/main/osx-64::certifi-2020.4.5.1-py38_0
  cython             pkgs/main/osx-64::cython-0.29.15-py38h0a44026_0
  intel-openmp       pkgs/main/osx-64::intel-openmp-2019.4-233
  libcxx             pkgs/main/osx-64::libcxx-4.0.1-hcfea43d_1
  libcxxabi          pkgs/main/osx-64::libcxxabi-4.0.1-hcfea43d_1
  libedit            pkgs/main/osx-64::libedit-3.1.20181209-hb402a30_0
  libffi             pkgs/main/osx-64::libffi-3.2.1-h475c297_4
  libgfortran        pkgs/main/osx-64::libgfortran-3.0.1-h93005f0_2
  mkl                pkgs/main/osx-64::mkl-2019.4-233
  mkl-service        pkgs/main/osx-64::mkl-service-2.3.0-py38hfbe908c_0
  mkl_fft            pkgs/main/osx-64::mkl_fft-1.0.15-py38h5e564d8_0
  mkl_random         pkgs/main/osx-64::mkl_random-1.1.0-py38h6440ff4_0
  ncurses            pkgs/main/osx-64::ncurses-6.2-h0a44026_0
  numpy              pkgs/main/osx-64::numpy-1.18.1-py38h7241aed_0
  numpy-base         pkgs/main/osx-64::numpy-base-1.18.1-py38h6575580_1
  openssl            pkgs/main/osx-64::openssl-1.1.1f-h1de35cc_0
  pip                pkgs/main/osx-64::pip-20.0.2-py38_1
  python             pkgs/main/osx-64::python-3.8.2-hc70fcce_0
  python-dateutil    pkgs/main/noarch::python-dateutil-2.8.1-py_0
  pytz               pkgs/main/noarch::pytz-2019.3-py_0
  readline           pkgs/main/osx-64::readline-8.0-h1de35cc_0
  setuptools         pkgs/main/osx-64::setuptools-46.1.3-py38_0
  six                pkgs/main/osx-64::six-1.14.0-py38_0
  sqlite             pkgs/main/osx-64::sqlite-3.31.1-ha441bb4_0
  tk                 pkgs/main/osx-64::tk-8.6.8-ha441bb4_0
  wheel              pkgs/main/osx-64::wheel-0.34.2-py38_0
  xz                 pkgs/main/osx-64::xz-5.2.4-h1de35cc_4
  zlib               pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3


Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
$ conda activate tmp-pandas-dev

build

$ python setup.py build_ext -i
Compiling pandas/_libs/algos.pyx because it changed.
Compiling pandas/_libs/groupby.pyx because it changed.
Compiling pandas/_libs/hashing.pyx because it changed.
Compiling pandas/_libs/hashtable.pyx because it changed.
Compiling pandas/_libs/index.pyx because it changed.
Compiling pandas/_libs/indexing.pyx because it changed.
Compiling pandas/_libs/internals.pyx because it changed.
Compiling pandas/_libs/interval.pyx because it changed.
Compiling pandas/_libs/join.pyx because it changed.
Compiling pandas/_libs/lib.pyx because it changed.
Compiling pandas/_libs/missing.pyx because it changed.
Compiling pandas/_libs/parsers.pyx because it changed.
Compiling pandas/_libs/reduction.pyx because it changed.
Compiling pandas/_libs/ops.pyx because it changed.
Compiling pandas/_libs/ops_dispatch.pyx because it changed.
Compiling pandas/_libs/properties.pyx because it changed.
Compiling pandas/_libs/reshape.pyx because it changed.
Compiling pandas/_libs/sparse.pyx because it changed.
Compiling pandas/_libs/tslib.pyx because it changed.
Compiling pandas/_libs/tslibs/c_timestamp.pyx because it changed.
Compiling pandas/_libs/tslibs/ccalendar.pyx because it changed.
Compiling pandas/_libs/tslibs/conversion.pyx because it changed.
Compiling pandas/_libs/tslibs/fields.pyx because it changed.
Compiling pandas/_libs/tslibs/frequencies.pyx because it changed.
Compiling pandas/_libs/tslibs/nattype.pyx because it changed.
Compiling pandas/_libs/tslibs/np_datetime.pyx because it changed.
Compiling pandas/_libs/tslibs/offsets.pyx because it changed.
Compiling pandas/_libs/tslibs/parsing.pyx because it changed.
Compiling pandas/_libs/tslibs/period.pyx because it changed.
Compiling pandas/_libs/tslibs/resolution.pyx because it changed.
Compiling pandas/_libs/tslibs/strptime.pyx because it changed.
Compiling pandas/_libs/tslibs/timedeltas.pyx because it changed.
Compiling pandas/_libs/tslibs/timestamps.pyx because it changed.
Compiling pandas/_libs/tslibs/timezones.pyx because it changed.
Compiling pandas/_libs/tslibs/tzconversion.pyx because it changed.
Compiling pandas/_libs/testing.pyx because it changed.
Compiling pandas/_libs/window/aggregations.pyx because it changed.
Compiling pandas/_libs/window/indexers.pyx because it changed.
Compiling pandas/_libs/writers.pyx because it changed.
Compiling pandas/io/sas/sas.pyx because it changed.
[ 1/40] Cythonizing pandas/_libs/algos.pyx
[ 2/40] Cythonizing pandas/_libs/groupby.pyx
warning: pandas/_libs/groupby.pyx:1097:26: Unreachable code
[ 3/40] Cythonizing pandas/_libs/hashing.pyx
[ 4/40] Cythonizing pandas/_libs/hashtable.pyx
[ 5/40] Cythonizing pandas/_libs/index.pyx
[ 6/40] Cythonizing pandas/_libs/indexing.pyx
[ 7/40] Cythonizing pandas/_libs/internals.pyx
[ 8/40] Cythonizing pandas/_libs/interval.pyx
[ 9/40] Cythonizing pandas/_libs/join.pyx
[10/40] Cythonizing pandas/_libs/lib.pyx
[11/40] Cythonizing pandas/_libs/missing.pyx
[12/40] Cythonizing pandas/_libs/ops.pyx
[13/40] Cythonizing pandas/_libs/ops_dispatch.pyx
[14/40] Cythonizing pandas/_libs/parsers.pyx
[15/40] Cythonizing pandas/_libs/properties.pyx
[16/40] Cythonizing pandas/_libs/reduction.pyx
[17/40] Cythonizing pandas/_libs/reshape.pyx
[18/40] Cythonizing pandas/_libs/sparse.pyx
[19/40] Cythonizing pandas/_libs/testing.pyx
[20/40] Cythonizing pandas/_libs/tslib.pyx
[21/40] Cythonizing pandas/_libs/tslibs/c_timestamp.pyx
[22/40] Cythonizing pandas/_libs/tslibs/ccalendar.pyx
[23/40] Cythonizing pandas/_libs/tslibs/conversion.pyx
[24/40] Cythonizing pandas/_libs/tslibs/fields.pyx
[25/40] Cythonizing pandas/_libs/tslibs/frequencies.pyx
[26/40] Cythonizing pandas/_libs/tslibs/nattype.pyx
[27/40] Cythonizing pandas/_libs/tslibs/np_datetime.pyx
[28/40] Cythonizing pandas/_libs/tslibs/offsets.pyx
[29/40] Cythonizing pandas/_libs/tslibs/parsing.pyx
[30/40] Cythonizing pandas/_libs/tslibs/period.pyx
[31/40] Cythonizing pandas/_libs/tslibs/resolution.pyx
[32/40] Cythonizing pandas/_libs/tslibs/strptime.pyx
[33/40] Cythonizing pandas/_libs/tslibs/timedeltas.pyx
[34/40] Cythonizing pandas/_libs/tslibs/timestamps.pyx
[35/40] Cythonizing pandas/_libs/tslibs/timezones.pyx
[36/40] Cythonizing pandas/_libs/tslibs/tzconversion.pyx
[37/40] Cythonizing pandas/_libs/window/aggregations.pyx
[38/40] Cythonizing pandas/_libs/window/indexers.pyx
[39/40] Cythonizing pandas/_libs/writers.pyx
[40/40] Cythonizing pandas/io/sas/sas.pyx
running build_ext
building 'pandas._libs.algos' extension
creating build
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/pandas
creating build/temp.macosx-10.9-x86_64-3.8/pandas/_libs
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include -arch x86_64 -I/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include -arch x86_64 -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs -Ipandas/_libs/src/klib -I/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/lib/python3.8/site-packages/numpy/core/include -I/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8 -c pandas/_libs/algos.c -o build/temp.macosx-10.9-x86_64-3.8/pandas/_libs/algos.o -Werror
pandas/_libs/algos.c:132772:3: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
pandas/_libs/algos.c:132891:3: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
pandas/_libs/algos.c:133152:3: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
pandas/_libs/algos.c:133298:3: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
pandas/_libs/algos.c:144067:5: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
    0,
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
pandas/_libs/algos.c:144533:5: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
    0,
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
6 errors generated.
error: command 'gcc' failed with exit status 1

There is a warning while cythonizing

[ 2/40] Cythonizing pandas/_libs/groupby.pyx
warning: pandas/_libs/groupby.pyx:1097:26: Unreachable code

The errors

gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include -arch x86_64 -I/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include -arch x86_64 -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs -Ipandas/_libs/src/klib -I/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/lib/python3.8/site-packages/numpy/core/include -I/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8 -c pandas/_libs/algos.c -o build/temp.macosx-10.9-x86_64-3.8/pandas/_libs/algos.o -Werror
pandas/_libs/algos.c:132772:3: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
pandas/_libs/algos.c:132891:3: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
pandas/_libs/algos.c:133152:3: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
pandas/_libs/algos.c:133298:3: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
pandas/_libs/algos.c:144067:5: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
    0,
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
pandas/_libs/algos.c:144533:5: error: 'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]
    0,
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Users/taugspurger/miniconda3/envs/tmp-pandas-dev/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
6 errors generated.
error: command 'gcc' failed with exit status 1

@TomAugspurger
Copy link
Contributor

My workaround for now is to set CFLAGS=-Wno-error=deprecated-declarations prior to building extensions.

Is it clear to anyone else who's using tp_print? Us (in algos.pyx)? Cython? Python?

@WillAyd
Copy link
Member

WillAyd commented Apr 7, 2020 via email

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Apr 7, 2020

Yeah, on a mac. #33239 is the issue you were thinking of.

In our setup.py we currently skip -Werror for windows. Perhaps we add -Wno-error=deprecated-declarations for MacOS, while we work out issues with -Werror? (Oh, you suggested that in #33239. I'll make a PR.)

@WillAyd
Copy link
Member

WillAyd commented Apr 7, 2020 via email

@TomAugspurger
Copy link
Contributor

FWIW, I think my struggles in MacPython/pandas-wheels#85 are a preview of what downstream packagers will face with this. Presumably those packagers are more familiar with building C/C++ code than I am, but I suspect it will still cause issues.

@TomAugspurger
Copy link
Contributor

Maybe having issues with this for the 1.1.0rc0: conda-forge/pandas-feedstock#84 (comment). Trying to patch around it for now but we should revisit before the final.

@mgorny
Copy link
Contributor

mgorny commented Jul 29, 2020

There's also a bunch of new deprecations in Python 3.9: _PyUnicode_get_wstr_length, PyUnicode_AsUnicode...

@dschwoerer
Copy link

-Werror essentially breaks the concept of deprecation, as rather warning and giving time to adjust, it breaks immediately.
At least -Wno-error=deprecated-declarations should be added as mentioned before.

I am trying to use pandas with python3.9, and noticed this issue:
#34881 which has been detected by CI before. Until this warning is resolved and updates are shipped, it makes it unnecessarily hard to test the code with py3.9 and notice real issues.

With over 3k open issues, I am not sure trying to find every possible warning of every possible compiler out there is a good idea. The general idea of warnings is that the compiler isn't sure the code is wrong - but only if it is certain the code is wrong it will raise an error.

@jorisvandenbossche
Copy link
Member

@WillAyd are you still against removing the hardcoded -Wno-error from our setup.py? (while keeping it in CI) Or is the conclusion to use -Wno-error=deprecated-declarations ? (looking at #33315 (comment))

(I don't have this problem myself, but it seems lots of people run into it (including ourselves when building wheels/conda packages), so it would be nice to make this a better experience)

@WillAyd
Copy link
Member

WillAyd commented Nov 13, 2020 via email

@xhochy
Copy link
Contributor Author

xhochy commented Nov 16, 2020

For me this is a really big annoyance that I always need to remove it when I work on pandas but I guess new contributors will just be discouraged to even look into contributing when they don't get it to build locally. Removing -Werror requires the knowledge from the contributor that this flag actually exists and you can workaround that. Without this flag, contributors are faced with errors about linker flags, that is even far more complicated to understand.

Also from the packager side: It is always a big annoyance when you need a patch to build a package that upstream doesn't accept. Especially as it seems that this patch is applied in any pandas distribution.

@jbrockmendel
Copy link
Member

@xhochy has convinced me, largely based on the "new contributors will just be discouraged" point.

@WillAyd could we remove -Werror and then check an env flag to potentially restore it? Then could suggest to experienced contributors that they should enable that flag.

@WillAyd
Copy link
Member

WillAyd commented Nov 16, 2020 via email

@TomAugspurger
Copy link
Contributor

If you're using the conda compilers on OS X, you'd see something like: conda-forge/pandas-feedstock#84 (comment)

@jorisvandenbossche
Copy link
Member

On most platforms there are no issues

Because we already skip it on Windows as well ...

and we’ve fixed a good deal of bugs along the way with it.

We can keep it o CI to catch regressions related to this.

we’ve been doing a lot of work elsewhere to make local development and CI match so would like to maintain that

The issue is actually because it inherently doesn't always match (locally you can have different OS version, compiler toolchain, etc), so that you run into different issues locally. It's impossible to make the two match exactly.

Yes, it can be annoying that you locally don't get an error, while then CI gives errors. But at least that situation is clearer: CI is showing a compilation issue, that's something I need to solve / can ask help about on the PR (compared to always getting build errors when simply trying to build pandas locally before even starting to contribute).

@WillAyd
Copy link
Member

WillAyd commented Nov 17, 2020 via email

@jreback
Copy link
Contributor

jreback commented Nov 26, 2020

@xhochy would u push a PR to remove the flag but keep on CI; would do for 1.2 and 1.1.5

@xhochy
Copy link
Contributor Author

xhochy commented Nov 26, 2020

@xhochy would u push a PR to remove the flag but keep on CI; would do for 1.2 and 1.1.5

Already on it this minute!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms CI Continuous Integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants