From 7386535c59f96af95c109c9e44f6e48900a909b9 Mon Sep 17 00:00:00 2001 From: "Korn, Uwe" Date: Fri, 8 Feb 2019 10:39:37 +0100 Subject: [PATCH 1/9] Specify build requirements in pyproject.toml (PEP 517) --- MANIFEST.in | 1 + doc/source/whatsnew/v0.25.0.rst | 2 +- pyproject.toml | 3 +++ setup.py | 10 ++++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 pyproject.toml diff --git a/MANIFEST.in b/MANIFEST.in index b417b8890fa24..d82e64d0a68b8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,6 +3,7 @@ include LICENSE include RELEASE.md include README.md include setup.py +include pyproject.toml graft doc prune doc/build diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 95362521f3b9f..f27f7e18ca738 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -196,7 +196,7 @@ Sparse Other ^^^^^ -- +- Specify build-time requirement in ``pyproject.toml`` (:issue:`25193`) - - diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000000..17cf9573ba16c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +# When changing the version numbers here, also adjust them in `setup.py` +[build-system] +requires = ["setuptools", "wheel", "cython >= 0.28.2", "numpy >= 1.12.0"] diff --git a/setup.py b/setup.py index c8d29a2e4be5a..eb5b666187112 100755 --- a/setup.py +++ b/setup.py @@ -17,6 +17,15 @@ from distutils.version import LooseVersion from setuptools import setup, Command, find_packages +# Taken from https://github.com/jupyterhub/traefik-proxy/ +# commit: 0f16dc307b72e613e71067b6498f82728461434a +# +# ensure cwd is on sys.path +# workaround bug in pip 19.0 +here = os.path.dirname(__file__) +if here not in sys.path: + sys.path.insert(0, here) + # versioning import versioneer cmdclass = versioneer.get_cmdclass() @@ -30,6 +39,7 @@ def is_platform_mac(): return sys.platform == 'darwin' +# When changing the version numbers here, also adjust them in `pyproject.toml` min_numpy_ver = '1.12.0' setuptools_kwargs = { 'install_requires': [ From 68eb18aab208c18c15dcb861864565c4686aca1a Mon Sep 17 00:00:00 2001 From: "Korn, Uwe" Date: Fri, 8 Feb 2019 15:57:40 +0100 Subject: [PATCH 2/9] Mention that workaround is needed for versioneer --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index eb5b666187112..4ca6387026ef7 100755 --- a/setup.py +++ b/setup.py @@ -22,6 +22,7 @@ # # ensure cwd is on sys.path # workaround bug in pip 19.0 +# This is needed to load versioneer that lies alongside the setup.py here = os.path.dirname(__file__) if here not in sys.path: sys.path.insert(0, here) From faf7df7ed5e9526905357fafff4d0f7ca23fac20 Mon Sep 17 00:00:00 2001 From: "Korn, Uwe" Date: Thu, 14 Feb 2019 10:31:50 +0100 Subject: [PATCH 3/9] Remove workaround used for old pip versions --- setup.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/setup.py b/setup.py index 4ca6387026ef7..cf9d3f8c01d0f 100755 --- a/setup.py +++ b/setup.py @@ -17,16 +17,6 @@ from distutils.version import LooseVersion from setuptools import setup, Command, find_packages -# Taken from https://github.com/jupyterhub/traefik-proxy/ -# commit: 0f16dc307b72e613e71067b6498f82728461434a -# -# ensure cwd is on sys.path -# workaround bug in pip 19.0 -# This is needed to load versioneer that lies alongside the setup.py -here = os.path.dirname(__file__) -if here not in sys.path: - sys.path.insert(0, here) - # versioning import versioneer cmdclass = versioneer.get_cmdclass() From 88e05449959beb11f0d5e104377fd5051b69de31 Mon Sep 17 00:00:00 2001 From: "Korn, Uwe" Date: Thu, 14 Feb 2019 10:32:07 +0100 Subject: [PATCH 4/9] Pin numpy versions in build-system --- pyproject.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 17cf9573ba16c..800c0669de64a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,14 @@ # When changing the version numbers here, also adjust them in `setup.py` [build-system] -requires = ["setuptools", "wheel", "cython >= 0.28.2", "numpy >= 1.12.0"] +requires = [ + "setuptools", + "wheel", + "Cython >= 0.28.2", # required for VCS build, optional for released source + "numpy==1.9.3; python_version=='2.7'", + "numpy==1.9.3; python_version=='3.5'", + # We pin to numpy==1.13.1 as numpy==1.12.1 has build issues on distributions + # like Alpine Linux (which are the most common place where these source + # builds happen). + "numpy==1.13.1; python_version=='3.6'", + "numpy==1.13.1; python_version>='3.7'", +] From 5fe770d73974e217dd377f5c87859ed07ac2d388 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Sun, 17 Feb 2019 19:18:50 +0100 Subject: [PATCH 5/9] Raise minimal NumPy version to 1.13 --- README.md | 2 +- ci/deps/azure-27-compat.yaml | 2 +- ci/deps/azure-27-locale.yaml | 2 +- ci/deps/azure-macos-35.yaml | 2 +- doc/source/install.rst | 2 +- doc/source/whatsnew/v0.25.0.rst | 1 + pandas/compat/numpy/__init__.py | 6 +++--- pyproject.toml | 9 ++------- setup.py | 10 ++++++---- 9 files changed, 17 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index ce22818705865..a024be75b5d76 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ pip install pandas ``` ## Dependencies -- [NumPy](https://www.numpy.org): 1.12.0 or higher +- [NumPy](https://www.numpy.org): 1.13.0 or higher - [python-dateutil](https://labix.org/python-dateutil): 2.5.0 or higher - [pytz](https://pythonhosted.org/pytz): 2011k or higher diff --git a/ci/deps/azure-27-compat.yaml b/ci/deps/azure-27-compat.yaml index 8899e22bdf6cf..22fcf0a9181a8 100644 --- a/ci/deps/azure-27-compat.yaml +++ b/ci/deps/azure-27-compat.yaml @@ -7,7 +7,7 @@ dependencies: - cython=0.28.2 - jinja2=2.8 - numexpr=2.6.1 - - numpy=1.12.0 + - numpy=1.13.0 - openpyxl=2.5.5 - pytables=3.4.2 - python-dateutil=2.5.0 diff --git a/ci/deps/azure-27-locale.yaml b/ci/deps/azure-27-locale.yaml index 0846ef5e8264e..95431daaa0849 100644 --- a/ci/deps/azure-27-locale.yaml +++ b/ci/deps/azure-27-locale.yaml @@ -7,7 +7,7 @@ dependencies: - cython=0.28.2 - lxml - matplotlib=2.0.0 - - numpy=1.12.0 + - numpy=1.13.0 - openpyxl=2.4.0 - python-dateutil - python-blosc diff --git a/ci/deps/azure-macos-35.yaml b/ci/deps/azure-macos-35.yaml index 58abbabce3d86..64c92dc73674d 100644 --- a/ci/deps/azure-macos-35.yaml +++ b/ci/deps/azure-macos-35.yaml @@ -11,7 +11,7 @@ dependencies: - matplotlib=2.2.0 - nomkl - numexpr - - numpy=1.12.0 + - numpy=1.13.0 - openpyxl=2.5.5 - pyarrow - pytables diff --git a/doc/source/install.rst b/doc/source/install.rst index 92364fcc9ebd2..e2a784d6daf81 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -224,7 +224,7 @@ Dependencies ------------ * `setuptools `__: 24.2.0 or higher -* `NumPy `__: 1.12.0 or higher +* `NumPy `__: 1.13.0 or higher * `python-dateutil `__: 2.5.0 or higher * `pytz `__ diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index f27f7e18ca738..bb5bdc8f71ef9 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -196,6 +196,7 @@ Sparse Other ^^^^^ +- Raised minimal NumPy dependency to ``1.13.0`` (:issue:`25227`) - Specify build-time requirement in ``pyproject.toml`` (:issue:`25193`) - - diff --git a/pandas/compat/numpy/__init__.py b/pandas/compat/numpy/__init__.py index bc9af01a97467..f0c617a69c077 100644 --- a/pandas/compat/numpy/__init__.py +++ b/pandas/compat/numpy/__init__.py @@ -15,11 +15,11 @@ _np_version_under1p16 = _nlv < LooseVersion('1.16') -if _nlv < '1.12': +if _nlv < '1.13': raise ImportError('this version of pandas is incompatible with ' - 'numpy < 1.12.0\n' + 'numpy < 1.13.0\n' 'your numpy version is {0}.\n' - 'Please upgrade numpy to >= 1.12.0 to use ' + 'Please upgrade numpy to >= 1.13.0 to use ' 'this pandas version'.format(_np_version)) diff --git a/pyproject.toml b/pyproject.toml index 800c0669de64a..31d766aa357b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,11 +4,6 @@ requires = [ "setuptools", "wheel", "Cython >= 0.28.2", # required for VCS build, optional for released source - "numpy==1.9.3; python_version=='2.7'", - "numpy==1.9.3; python_version=='3.5'", - # We pin to numpy==1.13.1 as numpy==1.12.1 has build issues on distributions - # like Alpine Linux (which are the most common place where these source - # builds happen). - "numpy==1.13.1; python_version=='3.6'", - "numpy==1.13.1; python_version>='3.7'", + "numpy==1.13.3; python_version<'3.7'", + "numpy==1.14.5; python_version>='3.7'", ] diff --git a/setup.py b/setup.py index cf9d3f8c01d0f..3b09d0ff33696 100755 --- a/setup.py +++ b/setup.py @@ -31,14 +31,16 @@ def is_platform_mac(): # When changing the version numbers here, also adjust them in `pyproject.toml` -min_numpy_ver = '1.12.0' +numpy_requires = [ + "numpy>=1.13; python_version<'3.7'", + "numpy>=1.14; python_version>='3.7'", +] setuptools_kwargs = { 'install_requires': [ 'python-dateutil >= 2.5.0', 'pytz >= 2011k', - 'numpy >= {numpy_ver}'.format(numpy_ver=min_numpy_ver), - ], - 'setup_requires': ['numpy >= {numpy_ver}'.format(numpy_ver=min_numpy_ver)], + ] + numpy_requires, + 'setup_requires': numpy_requires, 'zip_safe': False, } From c0deaf949597f803a22080b75087582b46cde988 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Mon, 18 Feb 2019 19:21:27 +0100 Subject: [PATCH 6/9] Revert "Remove workaround used for old pip versions" This reverts commit faf7df7ed5e9526905357fafff4d0f7ca23fac20. --- setup.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup.py b/setup.py index 3b09d0ff33696..3e3b99a217447 100755 --- a/setup.py +++ b/setup.py @@ -17,6 +17,16 @@ from distutils.version import LooseVersion from setuptools import setup, Command, find_packages +# Taken from https://github.com/jupyterhub/traefik-proxy/ +# commit: 0f16dc307b72e613e71067b6498f82728461434a +# +# ensure cwd is on sys.path +# workaround bug in pip 19.0 +# This is needed to load versioneer that lies alongside the setup.py +here = os.path.dirname(__file__) +if here not in sys.path: + sys.path.insert(0, here) + # versioning import versioneer cmdclass = versioneer.get_cmdclass() From d8cd7e6416caa968e1b37ca397de6f028966d748 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Mon, 6 May 2019 21:36:02 -0400 Subject: [PATCH 7/9] fixup --- README.md | 4 ---- ci/deps/azure-36-locale.yaml | 5 ----- ci/deps/azure-macos-35.yaml | 5 ----- doc/source/install.rst | 4 ---- doc/source/whatsnew/v0.25.0.rst | 8 +------- pandas/compat/numpy/__init__.py | 8 -------- setup.py | 13 +------------ 7 files changed, 2 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 6edc58dffaadc..e8bfd28cc8208 100644 --- a/README.md +++ b/README.md @@ -164,11 +164,7 @@ pip install pandas ``` ## Dependencies -<<<<<<< HEAD -- [NumPy](https://www.numpy.org): 1.13.0 or higher -======= - [NumPy](https://www.numpy.org): 1.13.3 or higher ->>>>>>> master - [python-dateutil](https://labix.org/python-dateutil): 2.5.0 or higher - [pytz](https://pythonhosted.org/pytz): 2015.4 or higher diff --git a/ci/deps/azure-36-locale.yaml b/ci/deps/azure-36-locale.yaml index 721163276ed3b..f43ed0249985e 100644 --- a/ci/deps/azure-36-locale.yaml +++ b/ci/deps/azure-36-locale.yaml @@ -7,13 +7,8 @@ dependencies: - bottleneck=1.2.* - cython=0.28.2 - lxml -<<<<<<< HEAD:ci/deps/azure-27-locale.yaml - - matplotlib=2.0.0 - - numpy=1.13.0 -======= - matplotlib=2.2.2 - numpy=1.14.* ->>>>>>> master:ci/deps/azure-36-locale.yaml - openpyxl=2.4.0 - python-dateutil - python-blosc diff --git a/ci/deps/azure-macos-35.yaml b/ci/deps/azure-macos-35.yaml index 0b147c6821b2d..591266348a5f1 100644 --- a/ci/deps/azure-macos-35.yaml +++ b/ci/deps/azure-macos-35.yaml @@ -11,13 +11,8 @@ dependencies: - matplotlib=2.2.3 - nomkl - numexpr -<<<<<<< HEAD - - numpy=1.13.0 - - openpyxl=2.5.5 -======= - numpy=1.13.3 - openpyxl ->>>>>>> master - pyarrow - pytables - python=3.5.* diff --git a/doc/source/install.rst b/doc/source/install.rst index a4ad0be585464..b3b5945cc515e 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -224,11 +224,7 @@ Dependencies ------------ * `setuptools `__: 24.2.0 or higher -<<<<<<< HEAD -* `NumPy `__: 1.13.0 or higher -======= * `NumPy `__: 1.13.3 or higher ->>>>>>> master * `python-dateutil `__: 2.5.0 or higher * `pytz `__: 2015.4 or higher diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index c56684fe0d533..e38aef36ebf65 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -415,6 +415,7 @@ Reshaping - Bug in :func:`pandas.cut` where large bins could incorrectly raise an error due to an integer overflow (:issue:`26045`) - Bug in :func:`DataFrame.sort_index` where an error is thrown when a multi-indexed DataFrame is sorted on all levels with the initial level sorted last (:issue:`26053`) - Bug in :meth:`Series.nlargest` treats ``True`` as smaller than ``False`` (:issue:`26154`) +- Bug in :func:`factorize` when passing an ``ExtensionArray`` with a custom ``na_sentinel`` (:issue:`25696`). Sparse ^^^^^^ @@ -427,15 +428,8 @@ Sparse Other ^^^^^ -<<<<<<< HEAD -- Raised minimal NumPy dependency to ``1.13.0`` (:issue:`25227`) - Specify build-time requirement in ``pyproject.toml`` (:issue:`25193`) -- -- -======= - Removed unused C functions from vendored UltraJSON implementation (:issue:`26198`) -- Bug in :func:`factorize` when passing an ``ExtensionArray`` with a custom ``na_sentinel`` (:issue:`25696`). ->>>>>>> master .. _whatsnew_0.250.contributors: diff --git a/pandas/compat/numpy/__init__.py b/pandas/compat/numpy/__init__.py index 9deb791204aee..bd871c47fa08b 100644 --- a/pandas/compat/numpy/__init__.py +++ b/pandas/compat/numpy/__init__.py @@ -14,19 +14,11 @@ _np_version_under1p17 = _nlv < LooseVersion('1.17') -<<<<<<< HEAD -if _nlv < '1.13': - raise ImportError('this version of pandas is incompatible with ' - 'numpy < 1.13.0\n' - 'your numpy version is {0}.\n' - 'Please upgrade numpy to >= 1.13.0 to use ' -======= if _nlv < '1.13.3': raise ImportError('this version of pandas is incompatible with ' 'numpy < 1.13.3\n' 'your numpy version is {0}.\n' 'Please upgrade numpy to >= 1.13.3 to use ' ->>>>>>> master 'this pandas version'.format(_np_version)) diff --git a/setup.py b/setup.py index ec3cc7ca3efab..1ff874daec425 100755 --- a/setup.py +++ b/setup.py @@ -40,10 +40,9 @@ def is_platform_mac(): return sys.platform == 'darwin' -<<<<<<< HEAD # When changing the version numbers here, also adjust them in `pyproject.toml` numpy_requires = [ - "numpy>=1.13; python_version<'3.7'", + "numpy>=1.13.3; python_version<'3.7'", "numpy>=1.14; python_version>='3.7'", ] setuptools_kwargs = { @@ -52,16 +51,6 @@ def is_platform_mac(): 'pytz >= 2011k', ] + numpy_requires, 'setup_requires': numpy_requires, -======= -min_numpy_ver = '1.13.3' -setuptools_kwargs = { - 'install_requires': [ - 'python-dateutil >= 2.5.0', - 'pytz >= 2015.4', - 'numpy >= {numpy_ver}'.format(numpy_ver=min_numpy_ver), - ], - 'setup_requires': ['numpy >= {numpy_ver}'.format(numpy_ver=min_numpy_ver)], ->>>>>>> master 'zip_safe': False, } From 282d3175c338c53495cb2d206a5c42ef2d8a619a Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Mon, 6 May 2019 21:45:46 -0400 Subject: [PATCH 8/9] revert to pytz version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1ff874daec425..3fe0796ac4786 100755 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ def is_platform_mac(): setuptools_kwargs = { 'install_requires': [ 'python-dateutil >= 2.5.0', - 'pytz >= 2011k', + 'pytz >= 2015.4', ] + numpy_requires, 'setup_requires': numpy_requires, 'zip_safe': False, From cec70531e37bc0852774ff457026038d00f2874a Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sun, 12 May 2019 17:01:38 -0400 Subject: [PATCH 9/9] updates --- doc/source/whatsnew/v0.25.0.rst | 1 - setup.py | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index e1d3b8ed03877..66e6281dd5175 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -438,7 +438,6 @@ Other - Specify build-time requirement in ``pyproject.toml`` (:issue:`25193`) - Removed unused C functions from vendored UltraJSON implementation (:issue:`26198`) -- Bug in :func:`factorize` when passing an ``ExtensionArray`` with a custom ``na_sentinel`` (:issue:`25696`). - Allow :class:`Index` and :class:`RangeIndex` to be passed to numpy ``min`` and ``max`` functions. diff --git a/setup.py b/setup.py index 15d73150361c7..17680598567f4 100755 --- a/setup.py +++ b/setup.py @@ -17,16 +17,6 @@ from distutils.version import LooseVersion from setuptools import setup, Command, find_packages -# Taken from https://github.com/jupyterhub/traefik-proxy/ -# commit: 0f16dc307b72e613e71067b6498f82728461434a -# -# ensure cwd is on sys.path -# workaround bug in pip 19.0 -# This is needed to load versioneer that lies alongside the setup.py -here = os.path.dirname(__file__) -if here not in sys.path: - sys.path.insert(0, here) - # versioning import versioneer cmdclass = versioneer.get_cmdclass()