From 32a674befd94b5e67067d57bd5d607c8afde5787 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 16 Aug 2022 14:49:07 +0300 Subject: [PATCH 1/8] DEP: drop support for msvc<=1900 and Interix --- numpy/core/include/numpy/npy_math.h | 12 ++---------- numpy/core/setup.py | 8 -------- numpy/core/src/common/npy_config.h | 6 +++--- numpy/random/src/pcg64/pcg64.h | 8 ++++---- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/numpy/core/include/numpy/npy_math.h b/numpy/core/include/numpy/npy_math.h index 954c3d0e9e44..1f4cea613e46 100644 --- a/numpy/core/include/numpy/npy_math.h +++ b/numpy/core/include/numpy/npy_math.h @@ -219,11 +219,7 @@ double npy_spacing(double x); #ifndef NPY_HAVE_DECL_ISNAN #define npy_isnan(x) ((x) != (x)) #else - #if defined(_MSC_VER) && (_MSC_VER < 1900) - #define npy_isnan(x) _isnan((x)) - #else - #define npy_isnan(x) isnan(x) - #endif + #define npy_isnan(x) isnan(x) #endif #endif @@ -250,11 +246,7 @@ double npy_spacing(double x); #ifndef NPY_HAVE_DECL_ISINF #define npy_isinf(x) (!npy_isfinite(x) && !npy_isnan(x)) #else - #if defined(_MSC_VER) && (_MSC_VER < 1900) - #define npy_isinf(x) (!_finite((x)) && !_isnan((x))) - #else - #define npy_isinf(x) isinf((x)) - #endif + #define npy_isinf(x) isinf((x)) #endif #endif diff --git a/numpy/core/setup.py b/numpy/core/setup.py index cdf6117e66c1..9e05aded0a9c 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -257,14 +257,6 @@ def check_complex(config, mathlibs): priv = [] pub = [] - try: - if os.uname()[0] == "Interix": - warnings.warn("Disabling broken complex support. See #1365", stacklevel=2) - return priv, pub - except Exception: - # os.uname not available on all platforms. blanket except ugly but safe - pass - # Check for complex support st = config.check_header('complex.h') if st: diff --git a/numpy/core/src/common/npy_config.h b/numpy/core/src/common/npy_config.h index b01eca5abc15..b1bcfb3a4e7d 100644 --- a/numpy/core/src/common/npy_config.h +++ b/numpy/core/src/common/npy_config.h @@ -29,7 +29,7 @@ #endif /* Disable broken MS math functions */ -#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__MINGW32_VERSION) +#if defined(__MINGW32_VERSION) #undef HAVE_ATAN2 #undef HAVE_ATAN2F @@ -41,7 +41,7 @@ #endif -#if defined(_MSC_VER) && (_MSC_VER >= 1900) +#if defined(_MSC_VER) #undef HAVE_CASIN #undef HAVE_CASINF @@ -71,7 +71,7 @@ #endif /* MSVC _hypot messes with fp precision mode on 32-bit, see gh-9567 */ -#if defined(_MSC_VER) && (_MSC_VER >= 1900) && !defined(_WIN64) +#if defined(_MSC_VER) !defined(_WIN64) #undef HAVE_CABS #undef HAVE_CABSF diff --git a/numpy/random/src/pcg64/pcg64.h b/numpy/random/src/pcg64/pcg64.h index fb8281201b08..96ee7af85181 100644 --- a/numpy/random/src/pcg64/pcg64.h +++ b/numpy/random/src/pcg64/pcg64.h @@ -128,7 +128,7 @@ static inline pcg128_t pcg128_add(pcg128_t a, pcg128_t b) { static inline void _pcg_mult64(uint64_t x, uint64_t y, uint64_t *z1, uint64_t *z0) { -#if defined _WIN32 && _MSC_VER >= 1900 && _M_AMD64 +#if defined _WIN32 && _M_AMD64 z0[0] = _umul128(x, y, z1); #else uint64_t x0, x1, y0, y1; @@ -182,7 +182,7 @@ static inline void pcg_setseq_128_srandom_r(pcg_state_setseq_128 *rng, static inline uint64_t pcg_setseq_128_xsl_rr_64_random_r(pcg_state_setseq_128 *rng) { -#if defined _WIN32 && _MSC_VER >= 1900 && _M_AMD64 +#if defined _WIN32 && _M_AMD64 uint64_t h1; pcg128_t product; @@ -212,7 +212,7 @@ static inline pcg128_t pcg128_mult_64(pcg128_t a, uint64_t b) { } static inline void pcg_cm_step_r(pcg_state_setseq_128 *rng) { -#if defined _WIN32 && _MSC_VER >= 1900 && _M_AMD64 +#if defined _WIN32 && _M_AMD64 uint64_t h1; pcg128_t product; @@ -255,7 +255,7 @@ static inline uint64_t pcg_cm_random_r(pcg_state_setseq_128* rng) hi *= lo; /* Run the CM step. */ -#if defined _WIN32 && _MSC_VER >= 1900 && _M_AMD64 +#if defined _WIN32 && _M_AMD64 uint64_t h1; pcg128_t product; From 91ebcc8b541eac6da32c4e2aaaf1c9235b9be4c9 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 16 Aug 2022 14:56:25 +0300 Subject: [PATCH 2/8] DOC: add a release note --- doc/release/upcoming_changes/22139.expired.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/release/upcoming_changes/22139.expired.rst diff --git a/doc/release/upcoming_changes/22139.expired.rst b/doc/release/upcoming_changes/22139.expired.rst new file mode 100644 index 000000000000..d909060194c4 --- /dev/null +++ b/doc/release/upcoming_changes/22139.expired.rst @@ -0,0 +1,4 @@ +* Support for Visual Studio 2015 has been removed. Please update to at least +Visual Studio 2109. + +* Support for the Windows Interix POSIX interop layer has been removed. From a0f30a77477a2dd251d91aa60ce0b7aaa5593f98 Mon Sep 17 00:00:00 2001 From: Matti Picus Date: Tue, 16 Aug 2022 15:03:59 +0300 Subject: [PATCH 3/8] Update doc/release/upcoming_changes/22139.expired.rst Co-authored-by: h-vetinari --- doc/release/upcoming_changes/22139.expired.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release/upcoming_changes/22139.expired.rst b/doc/release/upcoming_changes/22139.expired.rst index d909060194c4..1ac480f50d20 100644 --- a/doc/release/upcoming_changes/22139.expired.rst +++ b/doc/release/upcoming_changes/22139.expired.rst @@ -1,4 +1,4 @@ * Support for Visual Studio 2015 has been removed. Please update to at least -Visual Studio 2109. +Visual Studio 2019. * Support for the Windows Interix POSIX interop layer has been removed. From 9067259f15496bbf28ba2976a5b3cb8695839cc1 Mon Sep 17 00:00:00 2001 From: Matti Picus Date: Tue, 16 Aug 2022 15:06:03 +0300 Subject: [PATCH 4/8] BUG: fix typo --- numpy/core/src/common/npy_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/core/src/common/npy_config.h b/numpy/core/src/common/npy_config.h index b1bcfb3a4e7d..7457cc1b31d6 100644 --- a/numpy/core/src/common/npy_config.h +++ b/numpy/core/src/common/npy_config.h @@ -71,7 +71,7 @@ #endif /* MSVC _hypot messes with fp precision mode on 32-bit, see gh-9567 */ -#if defined(_MSC_VER) !defined(_WIN64) +#if defined(_MSC_VER) && !defined(_WIN64) #undef HAVE_CABS #undef HAVE_CABSF From cabc8ff709c171aaf64e3350475c810888bc8a79 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 16 Aug 2022 17:42:13 +0300 Subject: [PATCH 5/8] DOC: add blank line --- doc/release/upcoming_changes/22139.expired.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release/upcoming_changes/22139.expired.rst b/doc/release/upcoming_changes/22139.expired.rst index 1ac480f50d20..423488f037a8 100644 --- a/doc/release/upcoming_changes/22139.expired.rst +++ b/doc/release/upcoming_changes/22139.expired.rst @@ -2,3 +2,4 @@ Visual Studio 2019. * Support for the Windows Interix POSIX interop layer has been removed. + From 63e7a009f96b9809b29f251111b0eb32215be51d Mon Sep 17 00:00:00 2001 From: Matti Picus Date: Tue, 16 Aug 2022 19:25:37 +0300 Subject: [PATCH 6/8] DOC: fix formatting --- doc/release/upcoming_changes/22139.expired.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release/upcoming_changes/22139.expired.rst b/doc/release/upcoming_changes/22139.expired.rst index 423488f037a8..9ae3a0610681 100644 --- a/doc/release/upcoming_changes/22139.expired.rst +++ b/doc/release/upcoming_changes/22139.expired.rst @@ -1,5 +1,5 @@ * Support for Visual Studio 2015 has been removed. Please update to at least -Visual Studio 2019. + Visual Studio 2019. * Support for the Windows Interix POSIX interop layer has been removed. From b5ca909f673bf2200a4921cdd7985f4a51a17f44 Mon Sep 17 00:00:00 2001 From: Matti Picus Date: Fri, 19 Aug 2022 16:54:55 +0300 Subject: [PATCH 7/8] DOC: remove recommendation --- doc/release/upcoming_changes/22139.expired.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/release/upcoming_changes/22139.expired.rst b/doc/release/upcoming_changes/22139.expired.rst index 9ae3a0610681..b527686a5dfe 100644 --- a/doc/release/upcoming_changes/22139.expired.rst +++ b/doc/release/upcoming_changes/22139.expired.rst @@ -1,5 +1,4 @@ -* Support for Visual Studio 2015 has been removed. Please update to at least - Visual Studio 2019. +* Support for Visual Studio 2015 has been removed. * Support for the Windows Interix POSIX interop layer has been removed. From 3adab5eb2b358cde7dde29c9740e91a42eb0d3d8 Mon Sep 17 00:00:00 2001 From: mattip Date: Fri, 19 Aug 2022 17:08:17 +0300 Subject: [PATCH 8/8] DOC: be more exact which versions are dropped --- doc/release/upcoming_changes/22139.expired.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release/upcoming_changes/22139.expired.rst b/doc/release/upcoming_changes/22139.expired.rst index b527686a5dfe..baf19a0b2424 100644 --- a/doc/release/upcoming_changes/22139.expired.rst +++ b/doc/release/upcoming_changes/22139.expired.rst @@ -1,4 +1,4 @@ -* Support for Visual Studio 2015 has been removed. +* Support for Visual Studio 2015 and earlier has been removed. * Support for the Windows Interix POSIX interop layer has been removed.