diff --git a/.github/workflows/basemap-data-hires.yml b/.github/workflows/basemap-data-hires.yml index 5cec79af0..2e8ef7f8a 100644 --- a/.github/workflows/basemap-data-hires.yml +++ b/.github/workflows/basemap-data-hires.yml @@ -4,6 +4,7 @@ env: PKGDIR: "packages/basemap_data_hires" PYTHONWARNINGS: "ignore:DEPRECATION" PIP_DISABLE_PIP_VERSION_CHECK: 1 + PIP_PREFER_BINARY: 1 PIP_TIMEOUT: 10 PIP_RETRIES: 0 @@ -114,9 +115,9 @@ jobs: name: artifacts-build path: ${{ env.PKGDIR }}/dist - - name: Install requirements + name: Install upload requirements run: | - pip install --prefer-binary twine + pip install twine - name: Upload distributables env: diff --git a/.github/workflows/basemap-data.yml b/.github/workflows/basemap-data.yml index e77ccc22a..ade389cd7 100644 --- a/.github/workflows/basemap-data.yml +++ b/.github/workflows/basemap-data.yml @@ -4,6 +4,7 @@ env: PKGDIR: "packages/basemap_data" PYTHONWARNINGS: "ignore:DEPRECATION" PIP_DISABLE_PIP_VERSION_CHECK: 1 + PIP_PREFER_BINARY: 1 PIP_TIMEOUT: 10 PIP_RETRIES: 0 @@ -114,9 +115,9 @@ jobs: name: artifacts-build path: ${{ env.PKGDIR }}/dist - - name: Install requirements + name: Install upload requirements run: | - pip install --prefer-binary twine + pip install twine - name: Upload distributables env: diff --git a/.github/workflows/basemap-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml index 7684d139f..1d3f43cd6 100644 --- a/.github/workflows/basemap-for-manylinux.yml +++ b/.github/workflows/basemap-for-manylinux.yml @@ -4,6 +4,7 @@ env: PKGDIR: "packages/basemap" PYTHONWARNINGS: "ignore:DEPRECATION" PIP_DISABLE_PIP_VERSION_CHECK: 1 + PIP_PREFER_BINARY: 1 PIP_TIMEOUT: 10 PIP_RETRIES: 0 @@ -59,7 +60,7 @@ jobs: name: Install library requirements run: | cd ${{ env.PKGDIR }} - pip install --prefer-binary -r requirements.txt + pip install -r requirements.txt - name: Run Flake8 run: | @@ -186,7 +187,7 @@ jobs: export NUMPY_INCLUDE_PATH=${sitepkgdir}/numpy/core/include if [ "${{ matrix.python-version }}" = "3.11" ]; then kwds="--no-build-isolation" - pip install setuptools wheel "cython >= 0.29, < 3.1" + pip install setuptools wheel "cython >= 0.29, < 3.0" fi cd ${{ env.PKGDIR }} python setup.py sdist @@ -223,10 +224,6 @@ jobs: with: name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} path: ${{ env.PKGDIR }}/dist - - - name: Fix APT sources - run: | - sed -i 's|deb\.debian\.org|archive\.debian\.org|g' /etc/apt/sources.list - name: Install auditwheel run: | @@ -272,10 +269,6 @@ jobs: with: name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} path: ${{ env.PKGDIR }}/dist - - - name: Fix APT sources - run: | - sed -i 's|deb\.debian\.org|archive\.debian\.org|g' /etc/apt/sources.list - name: Install numpy from source run: | @@ -286,7 +279,7 @@ jobs: - name: Install package run: | - pip install --prefer-binary ${{ env.PKGDIR }}/dist/*-manylinux1*.whl + pip install ${{ env.PKGDIR }}/dist/*-manylinux1*.whl - name: Test package run: | @@ -314,9 +307,9 @@ jobs: name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} path: ${{ env.PKGDIR }}/dist - - name: Install requirements + name: Install upload requirements run: | - pip install --prefer-binary twine + pip install twine - name: Upload distributables env: diff --git a/.github/workflows/basemap-for-windows.yml b/.github/workflows/basemap-for-windows.yml index 3242acf6c..ff93b0d4f 100644 --- a/.github/workflows/basemap-for-windows.yml +++ b/.github/workflows/basemap-for-windows.yml @@ -4,6 +4,7 @@ env: PKGDIR: "packages/basemap" PYTHONWARNINGS: "ignore:DEPRECATION" PIP_DISABLE_PIP_VERSION_CHECK: 1 + PIP_PREFER_BINARY: 1 PIP_TIMEOUT: 10 PIP_RETRIES: 0 @@ -51,7 +52,7 @@ jobs: path: . - name: Set Python - uses: actions/setup-python@v4 + uses: pylegacy/actions/setup-pyenv-win@v2 with: architecture: ${{ matrix.arch }} python-version: ${{ matrix.python-version }} @@ -68,7 +69,7 @@ jobs: name: Install library requirements run: | cd ${{ env.PKGDIR }} - pip install --prefer-binary -r requirements.txt + python -m pip install -r requirements.txt - name: Run Flake8 run: | @@ -117,7 +118,7 @@ jobs: cmake-version: "3.14.7" - name: Set Python - uses: actions/setup-python@v4 + uses: pylegacy/actions/setup-pyenv-win@v2 with: architecture: ${{ matrix.arch }} python-version: "3.6" @@ -167,7 +168,7 @@ jobs: version: ${{ env.msvc-toolset }} - name: Set Python - uses: actions/setup-python@v4 + uses: pylegacy/actions/setup-pyenv-win@v2 with: architecture: ${{ matrix.arch }} python-version: ${{ matrix.python-version }} @@ -197,9 +198,9 @@ jobs: run: | cd ${{ env.PKGDIR }} $env:GEOS_DIR = "$env:GITHUB_WORKSPACE/${{ env.PKGDIR }}/extern" - pip install -r requirements-setup.txt + python -m pip install -r requirements-setup.txt python setup.py sdist - pip wheel -w dist --no-deps (Get-Item dist/*.zip) + python -m pip wheel -w dist --no-deps (Get-Item dist/*.zip) - name: Upload build artifacts uses: actions/upload-artifact@v1 @@ -221,10 +222,14 @@ jobs: steps: - name: Set Python - uses: actions/setup-python@v4 + uses: pylegacy/actions/setup-pyenv-win@v2 with: architecture: ${{ matrix.arch }} python-version: ${{ matrix.python-version }} + - + name: Set Python base packages + run: | + python -m pip install --upgrade pip setuptools wheel - name: Download build artifacts uses: actions/download-artifact@v1 @@ -234,16 +239,12 @@ jobs: - name: Install package run: | - pip install --prefer-binary (Get-Item ${{ env.PKGDIR }}/dist/*-win*.whl) - # We need to skip Py311 x86 because of missing pyproj wheels. - if: matrix.arch != 'x86' || matrix.python-version != '3.11' + python -m pip install (Get-Item ${{ env.PKGDIR }}/dist/*-win*.whl) - name: Test package run: | python -c "from mpl_toolkits.basemap import Basemap" python -c "from mpl_toolkits.basemap import cm" - # We need to skip Py311 x86 because of missing pyproj wheels. - if: matrix.arch != 'x86' || matrix.python-version != '3.11' upload: strategy: @@ -260,7 +261,7 @@ jobs: steps: - name: Set Python - uses: actions/setup-python@v4 + uses: pylegacy/actions/setup-pyenv-win@v2 with: architecture: ${{ matrix.arch }} python-version: ${{ matrix.python-version }} @@ -271,9 +272,9 @@ jobs: name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} path: ${{ env.PKGDIR }}/dist - - name: Install requirements + name: Install upload requirements run: | - pip install --prefer-binary twine + python -m pip install twine - name: Upload distributables env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dd04705e..15a3918fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,25 @@ https://keepachangelog.com/en/1.0.0/ https://semver.org/spec/v2.0.0.html +## [1.3.8] - 2023-08-18 + +### Changed +- Upgrade `numpy` upper pin to 1.26. +- Upgrade `pyproj` upper pin to 3.7. +- Upgrade optional `pillow` upper pin to 10.1.0. +- Upgrade documentation and linting dependencies. + +### Fixed +- Fix Cygwin build error due to GCC passing `"--enable-new-dtags"` to + the linker (PR [#582] by @DWesl, solves issue [#579]). +- Fix deprecated `Image.ANTIALIAS` with `Image.LANCZOS` when `pillow` + version is at least 10.0.0 (PR [#580] by @cgohlke). +- Downgrade upper pin for Cython requirement from 3.1 to 3.0 due to + build error triggered by `_geoslib.pyx` (solves issues [#581] and + [#583]). +- Downgrade `numpy` lower pin to `numpy >= 1.21` for Python >= 3.8, + whose upgrade is delayed until `basemap` 1.4.0. + ## [1.3.7] - 2023-05-04 ### Changed @@ -957,6 +976,16 @@ https://semver.org/spec/v2.0.0.html - Fix glitches in drawing of parallels and meridians. +[#583]: +https://github.com/matplotlib/basemap/issues/583 +[#582]: +https://github.com/matplotlib/basemap/pull/582 +[#581]: +https://github.com/matplotlib/basemap/issues/581 +[#580]: +https://github.com/matplotlib/basemap/pull/580 +[#579]: +https://github.com/matplotlib/basemap/issues/579 [#573]: https://github.com/matplotlib/basemap/issues/573 [#564]: @@ -1051,7 +1080,9 @@ https://github.com/matplotlib/basemap/issues/228 https://github.com/matplotlib/basemap/issues/179 [Unreleased]: -https://github.com/matplotlib/basemap/compare/v1.3.7...develop +https://github.com/matplotlib/basemap/compare/v1.3.8...develop +[1.3.8]: +https://github.com/matplotlib/basemap/compare/v1.3.7...v1.3.8 [1.3.7]: https://github.com/matplotlib/basemap/compare/v1.3.6...v1.3.7 [1.3.6]: diff --git a/packages/basemap/.pylintrc b/packages/basemap/.pylintrc index 614b09142..5d3516905 100644 --- a/packages/basemap/.pylintrc +++ b/packages/basemap/.pylintrc @@ -76,8 +76,11 @@ disable= assignment-from-none, # Allow freedom with error raises. raise-missing-from, - # Allow freedom with string formatting. - consider-using-f-string + # Allow freedom with using lambda functions. + unnecessary-lambda-assignment, + # Allow freedom with old ways of using basic types. + consider-using-f-string, + use-dict-literal # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option @@ -251,12 +254,6 @@ max-line-length=99 # Maximum number of lines in a module. max-module-lines=999 -# List of optional constructs for which whitespace checking is disabled. `dict- -# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. -# `trailing-comma` allows a space between comma and closing bracket: (a, ). -# `empty-line` allows space-only lines. -no-space-check=dict-separator - # Allow the body of a class to be on the same line as the declaration if body # contains single statement. single-line-class-stmt=no @@ -519,6 +516,6 @@ preferred-modules= [EXCEPTIONS] # Exceptions that will emit a warning when being caught. Defaults to -# "BaseException, Exception". -overgeneral-exceptions=BaseException, - Exception +# "builtins.BaseException, builtins.Exception". +overgeneral-exceptions=builtins.BaseException, + builtins.Exception diff --git a/packages/basemap/README.md b/packages/basemap/README.md index 4b408b7a0..393bde003 100644 --- a/packages/basemap/README.md +++ b/packages/basemap/README.md @@ -45,6 +45,6 @@ https://spdx.org/licenses/LGPL-2.1-only.html https://spdx.org/licenses/MIT.html [`LICENSE`]: -https://github.com/matplotlib/basemap/blob/v1.3.7/packages/basemap/LICENSE +https://github.com/matplotlib/basemap/blob/v1.3.8/packages/basemap/LICENSE [`LICENSE.geos`]: -https://github.com/matplotlib/basemap/blob/v1.3.7/packages/basemap/LICENSE.geos +https://github.com/matplotlib/basemap/blob/v1.3.8/packages/basemap/LICENSE.geos diff --git a/packages/basemap/pyproject.toml b/packages/basemap/pyproject.toml index 26e78d87a..1e86505d7 100644 --- a/packages/basemap/pyproject.toml +++ b/packages/basemap/pyproject.toml @@ -8,7 +8,7 @@ requires = [ 'numpy == 1.16.6; sys_platform != "darwin" and (python_version >= "3.7" and python_version <= "3.9")', 'numpy == 1.16.6; python_version == "2.7" or (python_version >= "3.4" and python_version <= "3.6")', 'numpy == 1.11.3; python_version == "2.6" or (python_version >= "3.2" and python_version <= "3.3")', - 'cython >= 0.29, < 3.1; python_version >= "3.3" or python_version < "3.0"', + 'cython >= 0.29, < 3.0; python_version >= "3.3" or python_version < "3.0"', 'cython >= 0.26, < 0.27; python_version == "3.2"' ] build-backend = "setuptools.build_meta" diff --git a/packages/basemap/requirements-doc.txt b/packages/basemap/requirements-doc.txt index cdea62cb0..75248eed8 100644 --- a/packages/basemap/requirements-doc.txt +++ b/packages/basemap/requirements-doc.txt @@ -1 +1,2 @@ -sphinx >= 3.0, < 5.0; python_version >= "3.6" \ No newline at end of file +sphinx >= 5.3, < 6.3; python_version >= "3.6" +furo >= 2022.4.7, < 2023.5.21; python_version >= "3.6" diff --git a/packages/basemap/requirements-lint.txt b/packages/basemap/requirements-lint.txt index b5cdc5230..5669b9475 100644 --- a/packages/basemap/requirements-lint.txt +++ b/packages/basemap/requirements-lint.txt @@ -5,9 +5,13 @@ flake8 >= 2.6, < 4.0; python_version == "2.7" flake8 >= 2.6, < 3.0; python_version == "3.2" flake8 >= 2.6, < 3.0; python_version == "3.3" flake8 >= 2.6, < 3.9; python_version == "3.4" -flake8 >= 2.6, < 4.1; python_version >= "3.5" +flake8 >= 2.6, < 7.1; python_version >= "3.5" astroid >= 1.6, < 2.0; python_version == "2.7" -astroid >= 2.4, < 3.0; python_version >= "3.5" +astroid >= 2.4, < 2.5; python_version == "3.5" +astroid >= 2.5, < 2.7; python_version == "3.6" +astroid >= 2.8, < 3.0; python_version >= "3.7" pylint >= 1.9, < 2.0; python_version == "2.7" -pylint >= 2.6, < 3.0; python_version >= "3.5" +pylint >= 2.6, < 2.7; python_version == "3.5" +pylint >= 2.7, < 2.10; python_version == "3.6" +pylint >= 2.11, < 3.0; python_version >= "3.7" diff --git a/packages/basemap/requirements-setup.txt b/packages/basemap/requirements-setup.txt index 683c97388..376b9f7a0 100644 --- a/packages/basemap/requirements-setup.txt +++ b/packages/basemap/requirements-setup.txt @@ -1,6 +1,4 @@ cython >= 0.29, < 3.0; python_version == "2.6" cython >= 0.29, < 3.0; python_version == "2.7" cython >= 0.26, < 0.27; python_version == "3.2" -cython >= 0.29, < 3.0; python_version == "3.3" -cython >= 0.29, < 3.0; python_version == "3.4" -cython >= 0.29, < 3.1; python_version >= "3.5" +cython >= 0.29, < 3.0; python_version >= "3.3" diff --git a/packages/basemap/requirements-test.txt b/packages/basemap/requirements-test.txt index 1e4659b6a..504c7f5b7 100644 --- a/packages/basemap/requirements-test.txt +++ b/packages/basemap/requirements-test.txt @@ -28,4 +28,4 @@ pillow >= 4.3.0, < 5.0.0; python_version == "3.3" pillow >= 5.4.0, < 6.0.0; python_version == "3.4" pillow >= 7.1.0, < 8.0.0; python_version == "3.5" pillow >= 8.3.2, < 9.0.0; python_version == "3.6" -pillow >= 9.4.0, < 10.0.0; python_version >= "3.7" +pillow >= 9.4.0, < 10.1.0; python_version >= "3.7" diff --git a/packages/basemap/requirements.txt b/packages/basemap/requirements.txt index 5b4211b89..7c18f9a3e 100644 --- a/packages/basemap/requirements.txt +++ b/packages/basemap/requirements.txt @@ -8,7 +8,7 @@ numpy >= 1.15, < 1.17; python_version == "3.4" numpy >= 1.16, < 1.19; python_version == "3.5" numpy >= 1.19, < 1.20; python_version == "3.6" numpy >= 1.21, < 1.22; python_version == "3.7" -numpy >= 1.22, < 1.25; python_version >= "3.8" +numpy >= 1.21, < 1.26; python_version >= "3.8" cycler < 0.11; python_version == "3.2" pyparsing >= 1.5, < 2.4.1; python_version == "2.6" @@ -25,7 +25,7 @@ pyproj >= 1.9.3, < 2.3.0; python_version == "2.7" pyproj >= 1.9.3, < 1.9.6; python_version == "3.2" pyproj >= 1.9.3, < 2.1.0; python_version == "3.3" pyproj >= 1.9.3, < 2.1.0; python_version == "3.4" -pyproj >= 1.9.3, < 3.6.0; python_version >= "3.5" +pyproj >= 1.9.3, < 3.7.0; python_version >= "3.5" pyshp >= 1.2, < 2.0; python_version == "2.6" pyshp >= 1.2, < 2.4; python_version >= "2.7" diff --git a/packages/basemap/setup.cfg b/packages/basemap/setup.cfg index 3195b621d..3247f242e 100644 --- a/packages/basemap/setup.cfg +++ b/packages/basemap/setup.cfg @@ -8,19 +8,28 @@ formats = zip [flake8] ignore = - E301,E306,E402,E501,E731,W503,W504 + E301,E306,E402,E501,E731,F401,F403,W503,W504 # E301: expected-blank-line-missing # E306: no-blank-line-before-nested-def # E402: module-import-not-at-top-file # E501: line-too-long # E731: used-lambda +# F401: unused-import +# F403: wildcard-import # W503: line-break-before-binary-operator # W504: line-break-after-binary-operator [tool:pytest] filterwarnings = + error + ignore::DeprecationWarning:coverage.pytracer: ignore::DeprecationWarning:unittest2.compatibility: +[coverage:paths] +source = + src + /opt/pyenv/versions/**/site-packages + [coverage:report] exclude_lines = pragma: no cover diff --git a/packages/basemap/setup.py b/packages/basemap/setup.py index 69b23963c..c4f998f77 100644 --- a/packages/basemap/setup.py +++ b/packages/basemap/setup.py @@ -111,7 +111,7 @@ def run(self): library_dirs.append(os.path.join(geos_install_prefix, "lib")) library_dirs.append(os.path.join(geos_install_prefix, "lib64")) runtime_library_dirs = library_dirs - if os.name == "nt": + if os.name == "nt" or sys.platform == "cygwin": # On Windows: # - DLLs get installed under `bin`. # - We need to inject later the DLL in the wheel using `data_files`. @@ -119,7 +119,7 @@ def run(self): # `distutils` bug (http://bugs.python.org/issue2437). library_dirs.append(os.path.join(geos_install_prefix, "bin")) runtime_library_dirs = [] - dlls = glob.glob(os.path.join(geos_install_prefix, "*", "geos_c.dll")) + dlls = glob.glob(os.path.join(geos_install_prefix, "*", "*geos_c*.dll")) if dlls: data_files.append(("../..", sorted(dlls))) @@ -172,7 +172,7 @@ def run(self): "name": "basemap", "version": - "1.3.7", + "1.3.8", "license": "MIT", "description": diff --git a/packages/basemap/src/mpl_toolkits/basemap/__init__.py b/packages/basemap/src/mpl_toolkits/basemap/__init__.py index f09e16f42..8e2715cc7 100644 --- a/packages/basemap/src/mpl_toolkits/basemap/__init__.py +++ b/packages/basemap/src/mpl_toolkits/basemap/__init__.py @@ -54,7 +54,7 @@ import functools -__version__ = "1.3.7" +__version__ = "1.3.8" # basemap data files now installed in lib/matplotlib/toolkits/basemap/data # check to see if environment variable BASEMAPDATA set to a directory, @@ -4107,7 +4107,7 @@ def warpimage(self,image="bluemarble",scale=None,**kwargs): w, h = pilImage.size width = int(np.round(w*scale)) height = int(np.round(h*scale)) - pilImage = pilImage.resize((width,height),Image.ANTIALIAS) + pilImage = pilImage.resize((width,height),Image.LANCZOS) if _matplotlib_version >= '1.2': # orientation of arrays returned by pil_to_array # changed (https://github.com/matplotlib/matplotlib/pull/616) diff --git a/packages/basemap/src/mpl_toolkits/basemap/proj.py b/packages/basemap/src/mpl_toolkits/basemap/proj.py index 7c733bbb4..9c0692e87 100644 --- a/packages/basemap/src/mpl_toolkits/basemap/proj.py +++ b/packages/basemap/src/mpl_toolkits/basemap/proj.py @@ -11,7 +11,7 @@ from matplotlib.cbook import dedent -__version__ = "1.3.7" +__version__ = "1.3.8" _dg2rad = math.radians(1.) _rad2dg = math.degrees(1.)