From 9dacc706c5a7c0ea847281039f90d4722d0d8a00 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Thu, 26 Nov 2020 14:32:48 +0100 Subject: [PATCH 1/4] Only enable -Werror in the CI jobs --- ci/setup_env.sh | 6 ++++++ setup.py | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ci/setup_env.sh b/ci/setup_env.sh index 78951c9def7cb..c36422884f2ec 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -108,6 +108,12 @@ fi echo "activate pandas-dev" source activate pandas-dev +# Explicitly set an environment variable indicating that this is pandas' CI environment. +# +# This allows us to enable things like -Werror that shouldn't be activated in +# downstream CI jobs that may also build pandas from source. +export PANDAS_CI=1 + echo echo "remove any installed pandas package" echo "w/o removing anything else" diff --git a/setup.py b/setup.py index 9f33c045df6ed..1be71f4bffa05 100755 --- a/setup.py +++ b/setup.py @@ -409,15 +409,15 @@ def run(self): endian_macro = [("__LITTLE_ENDIAN__", "1")] +extra_compile_args = [] +extra_link_args = [] if is_platform_windows(): - extra_compile_args = [] - extra_link_args = [] if debugging_symbols_requested: extra_compile_args.append("/Z7") extra_link_args.append("/DEBUG") else: - extra_compile_args = ["-Werror"] - extra_link_args = [] + if os.environ.get("PANDAS_CI", "0") == "1": + extra_compile_args.append("-Werror") if debugging_symbols_requested: extra_compile_args.append("-g") From 2237d65ccbd0338cb4e869949f6c3da7cd093047 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Thu, 26 Nov 2020 16:58:15 +0100 Subject: [PATCH 2/4] whatsnew --- doc/source/whatsnew/v1.2.0.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst index 6f046d3a9379d..088aec19987c4 100644 --- a/doc/source/whatsnew/v1.2.0.rst +++ b/doc/source/whatsnew/v1.2.0.rst @@ -766,6 +766,7 @@ Other - Bug in :meth:`Index.union` behaving differently depending on whether operand is an :class:`Index` or other list-like (:issue:`36384`) - Passing an array with 2 or more dimensions to the :class:`Series` constructor now raises the more specific ``ValueError`` rather than a bare ``Exception`` (:issue:`35744`) - Bug in ``dir`` where ``dir(obj)`` wouldn't show attributes defined on the instance for pandas objects (:issue:`37173`) +- Only set ``-Werror`` as a compiler flag in the CI jobs (:issue:`33315`, :issue:`33314`) .. --------------------------------------------------------------------------- From d41de83dc07d1887aa4767719b6cd8341933efa2 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Thu, 26 Nov 2020 16:58:41 +0100 Subject: [PATCH 3/4] Add comment where `PANDAS_CI` is set --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 1be71f4bffa05..0b1007794bbdb 100755 --- a/setup.py +++ b/setup.py @@ -416,6 +416,7 @@ def run(self): extra_compile_args.append("/Z7") extra_link_args.append("/DEBUG") else: + # PANDAS_CI=1 is set by ci/setup_env.sh if os.environ.get("PANDAS_CI", "0") == "1": extra_compile_args.append("-Werror") if debugging_symbols_requested: From 057a570c7a8e52f26804f87e77d15e78dbd91236 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Fri, 27 Nov 2020 15:14:36 +0000 Subject: [PATCH 4/4] move release note --- doc/source/whatsnew/v1.1.5.rst | 8 ++++++++ doc/source/whatsnew/v1.2.0.rst | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v1.1.5.rst b/doc/source/whatsnew/v1.1.5.rst index a8bbf692a72e5..4e708c32b8684 100644 --- a/doc/source/whatsnew/v1.1.5.rst +++ b/doc/source/whatsnew/v1.1.5.rst @@ -32,6 +32,14 @@ Bug fixes .. --------------------------------------------------------------------------- +.. _whatsnew_115.other: + +Other +~~~~~ +- Only set ``-Werror`` as a compiler flag in the CI jobs (:issue:`33315`, :issue:`33314`) + +.. --------------------------------------------------------------------------- + .. _whatsnew_115.contributors: Contributors diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst index 088aec19987c4..6f046d3a9379d 100644 --- a/doc/source/whatsnew/v1.2.0.rst +++ b/doc/source/whatsnew/v1.2.0.rst @@ -766,7 +766,6 @@ Other - Bug in :meth:`Index.union` behaving differently depending on whether operand is an :class:`Index` or other list-like (:issue:`36384`) - Passing an array with 2 or more dimensions to the :class:`Series` constructor now raises the more specific ``ValueError`` rather than a bare ``Exception`` (:issue:`35744`) - Bug in ``dir`` where ``dir(obj)`` wouldn't show attributes defined on the instance for pandas objects (:issue:`37173`) -- Only set ``-Werror`` as a compiler flag in the CI jobs (:issue:`33315`, :issue:`33314`) .. ---------------------------------------------------------------------------