Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pyproj for openSUSE:Factory checked in at 2022-06-04 23:27:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyproj (Old) and /work/SRC/openSUSE:Factory/.python-pyproj.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyproj" Sat Jun 4 23:27:03 2022 rev:20 rq:980664 version:3.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyproj/python-pyproj.changes 2021-12-02 02:24:13.660822487 +0100 +++ /work/SRC/openSUSE:Factory/.python-pyproj.new.1548/python-pyproj.changes 2022-06-04 23:27:07.576761297 +0200 @@ -1,0 +2,24 @@ +Fri May 6 06:52:52 UTC 2022 - Libor Pechacek <lpecha...@suse.com> + +- Update to 3.3.1 + * DOC: minor fix to crs doc-strings by @bjlittle in #1004 + * BUG: Correct type annotation for AreaofUse.bounds by + @Kirill888 in #1013 + * BUG: crs.py: remove @AbstractMethod decorator by @hemberger + in #1018 + * BUG: Reorder deps in show_versions for setuptools issue by + @snowman2 in #1019 + * BUG: get_data_dir support for conda Windows enviroments by + @snowman2 in #1030 + * ENH: warn when export of CRS returns None by @martinfleis + in #1037 + * BUG: Complete database stub file with query_utm_crs_info() + signature by @orontee in #1047 + * ENH: Added support for int-like strings and numpy dtypes by + @iboates in #1049 + * BUG: Warn when CRS cannot be converted to PROJ or PROJ JSON + by @snowman2 in #1054 + * ENH: Added support to pickle Transformer by @snowman2 + in #1060 + +------------------------------------------------------------------- Old: ---- pyproj-3.3.0.tar.gz New: ---- pyproj-3.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyproj.spec ++++++ --- /var/tmp/diff_new_pack.oVq9uq/_old 2022-06-04 23:27:08.092761819 +0200 +++ /var/tmp/diff_new_pack.oVq9uq/_new 2022-06-04 23:27:08.096761822 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pyproj # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +20,7 @@ %define skip_python36 1 %{?!python_module:%define python_module() python3-%{**}} Name: python-pyproj -Version: 3.3.0 +Version: 3.3.1 Release: 0 Summary: Python interface to PROJ library License: SUSE-Public-Domain AND X11 ++++++ pyproj-3.3.0.tar.gz -> pyproj-3.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/LICENSE new/pyproj-3.3.1/LICENSE --- old/pyproj-3.3.0/LICENSE 2021-09-18 17:44:57.000000000 +0200 +++ new/pyproj-3.3.1/LICENSE 2022-04-22 05:27:43.000000000 +0200 @@ -1,5 +1,5 @@ Copyright (c) 2006-2018, Jeffrey Whitaker. -Copyright (c) 2019-2021, Open source contributors. +Copyright (c) 2019-2022, Open source contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/PKG-INFO new/pyproj-3.3.1/PKG-INFO --- old/pyproj-3.3.0/PKG-INFO 2021-11-18 02:52:04.366074800 +0100 +++ new/pyproj-3.3.1/PKG-INFO 2022-04-23 20:01:15.314736000 +0200 @@ -1,12 +1,12 @@ Metadata-Version: 2.1 Name: pyproj -Version: 3.3.0 +Version: 3.3.1 Summary: Python interface to PROJ (cartographic projections and coordinate transformations library) Home-page: https://github.com/pyproj4/pyproj +Download-URL: http://python.org/pypi/pyproj Author: Jeff Whitaker Author-email: jeffrey.s.whita...@noaa.gov License: MIT -Download-URL: http://python.org/pypi/pyproj Project-URL: Documentation, https://pyproj4.github.io/pyproj/ Project-URL: Release Notes, https://pyproj4.github.io/pyproj/stable/history.html Project-URL: Bug Tracker, https://github.com/pyproj4/pyproj/issues @@ -39,10 +39,10 @@ <p align="center"> <a href="https://gitter.im/pyproj4-pyproj/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img alt="Join the chat at https://gitter.im/pyproj4-pyproj/community" src="https://badges.gitter.im/pyproj4-pyproj/community.svg"></a> -<a href="#contributors"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-44-orange.svg?style=flat-square"></a> -<a href="https://ci.appveyor.com/project/jswhit/pyproj"><img alt="Appveyor Build Status" src="https://ci.appveyor.com/api/projects/status/8xkka4s97uwhkc64/branch/master?svg=true"></a> +<a href="#contributors"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-49-orange.svg?style=flat-square"></a> +<a href="https://ci.appveyor.com/project/jswhit/pyproj"><img alt="Appveyor Build Status" src="https://ci.appveyor.com/api/projects/status/8xkka4s97uwhkc64/branch/main?svg=true"></a> <a href="https://github.com/pyproj4/pyproj/actions?query=workflow%3ATests"><img alt="GitHub Actions Build Status" src="https://github.com/pyproj4/pyproj/workflows/Tests/badge.svg"></a> -<a href="https://codecov.io/gh/pyproj4/pyproj"><img alt="Codecov Status" src="https://codecov.io/gh/pyproj4/pyproj/branch/master/graph/badge.svg"></a> +<a href="https://codecov.io/gh/pyproj4/pyproj"><img alt="Codecov Status" src="https://codecov.io/gh/pyproj4/pyproj/branch/main/graph/badge.svg"></a> <a href="https://badge.fury.io/py/pyproj"><img alt="PyPI" src="https://badge.fury.io/py/pyproj.svg"></a> <a href="https://pepy.tech/project/pyproj"><img alt="Downloads" src="https://pepy.tech/badge/pyproj"></a> <a href="https://anaconda.org/conda-forge/pyproj"><img alt="Anaconda-Server Badge" src="https://anaconda.org/conda-forge/pyproj/badges/version.svg"></a> @@ -129,6 +129,11 @@ <tr> <td align="center"><a href="https://www.metoffice.gov.uk/"><img src="https://avatars.githubusercontent.com/u/2051656?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bill Little</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=bjlittle" title="Documentation">????</a></td> <td align="center"><a href="https://github.com/gerritholl"><img src="https://avatars.githubusercontent.com/u/500246?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gerrit Holl</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=gerritholl" title="Documentation">????</a></td> + <td align="center"><a href="https://github.com/Kirill888"><img src="https://avatars.githubusercontent.com/u/1428024?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kirill Kouzoubov</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=Kirill888" title="Code">????</a></td> + <td align="center"><a href="https://github.com/hemberger"><img src="https://avatars.githubusercontent.com/u/846186?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dan Hemberger</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/issues?q=author%3Ahemberger" title="Bug reports">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=hemberger" title="Code">????</a></td> + <td align="center"><a href="https://github.com/martinfleis"><img src="https://avatars.githubusercontent.com/u/36797143?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Martin Fleischmann</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/issues?q=author%3Amartinfleis" title="Bug reports">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=martinfleis" title="Code">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=martinfleis" title="Tests">??????</a></td> + <td align="center"><a href="https://github.com/orontee"><img src="https://avatars.githubusercontent.com/u/2065954?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matthias Meulien</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=orontee" title="Code">????</a> <a href="https://github.com/pyproj4/pyproj/issues?q=author%3Aorontee" title="Bug reports">????</a></td> + <td align="center"><a href="https://github.com/iboates"><img src="https://avatars.githubusercontent.com/u/13814358?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Isaac Boates</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=iboates" title="Code">????</a> <a href="https://github.com/pyproj4/pyproj/issues?q=author%3Aiboates" title="Bug reports">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=iboates" title="Tests">??????</a></td> </tr> </table> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/README.md new/pyproj-3.3.1/README.md --- old/pyproj-3.3.0/README.md 2021-11-09 02:41:36.000000000 +0100 +++ new/pyproj-3.3.1/README.md 2022-04-22 05:27:43.000000000 +0200 @@ -6,10 +6,10 @@ <p align="center"> <a href="https://gitter.im/pyproj4-pyproj/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img alt="Join the chat at https://gitter.im/pyproj4-pyproj/community" src="https://badges.gitter.im/pyproj4-pyproj/community.svg"></a> -<a href="#contributors"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-44-orange.svg?style=flat-square"></a> -<a href="https://ci.appveyor.com/project/jswhit/pyproj"><img alt="Appveyor Build Status" src="https://ci.appveyor.com/api/projects/status/8xkka4s97uwhkc64/branch/master?svg=true"></a> +<a href="#contributors"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-49-orange.svg?style=flat-square"></a> +<a href="https://ci.appveyor.com/project/jswhit/pyproj"><img alt="Appveyor Build Status" src="https://ci.appveyor.com/api/projects/status/8xkka4s97uwhkc64/branch/main?svg=true"></a> <a href="https://github.com/pyproj4/pyproj/actions?query=workflow%3ATests"><img alt="GitHub Actions Build Status" src="https://github.com/pyproj4/pyproj/workflows/Tests/badge.svg"></a> -<a href="https://codecov.io/gh/pyproj4/pyproj"><img alt="Codecov Status" src="https://codecov.io/gh/pyproj4/pyproj/branch/master/graph/badge.svg"></a> +<a href="https://codecov.io/gh/pyproj4/pyproj"><img alt="Codecov Status" src="https://codecov.io/gh/pyproj4/pyproj/branch/main/graph/badge.svg"></a> <a href="https://badge.fury.io/py/pyproj"><img alt="PyPI" src="https://badge.fury.io/py/pyproj.svg"></a> <a href="https://pepy.tech/project/pyproj"><img alt="Downloads" src="https://pepy.tech/badge/pyproj"></a> <a href="https://anaconda.org/conda-forge/pyproj"><img alt="Anaconda-Server Badge" src="https://anaconda.org/conda-forge/pyproj/badges/version.svg"></a> @@ -96,6 +96,11 @@ <tr> <td align="center"><a href="https://www.metoffice.gov.uk/"><img src="https://avatars.githubusercontent.com/u/2051656?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bill Little</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=bjlittle" title="Documentation">????</a></td> <td align="center"><a href="https://github.com/gerritholl"><img src="https://avatars.githubusercontent.com/u/500246?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gerrit Holl</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=gerritholl" title="Documentation">????</a></td> + <td align="center"><a href="https://github.com/Kirill888"><img src="https://avatars.githubusercontent.com/u/1428024?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kirill Kouzoubov</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=Kirill888" title="Code">????</a></td> + <td align="center"><a href="https://github.com/hemberger"><img src="https://avatars.githubusercontent.com/u/846186?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dan Hemberger</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/issues?q=author%3Ahemberger" title="Bug reports">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=hemberger" title="Code">????</a></td> + <td align="center"><a href="https://github.com/martinfleis"><img src="https://avatars.githubusercontent.com/u/36797143?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Martin Fleischmann</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/issues?q=author%3Amartinfleis" title="Bug reports">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=martinfleis" title="Code">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=martinfleis" title="Tests">??????</a></td> + <td align="center"><a href="https://github.com/orontee"><img src="https://avatars.githubusercontent.com/u/2065954?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matthias Meulien</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=orontee" title="Code">????</a> <a href="https://github.com/pyproj4/pyproj/issues?q=author%3Aorontee" title="Bug reports">????</a></td> + <td align="center"><a href="https://github.com/iboates"><img src="https://avatars.githubusercontent.com/u/13814358?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Isaac Boates</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=iboates" title="Code">????</a> <a href="https://github.com/pyproj4/pyproj/issues?q=author%3Aiboates" title="Bug reports">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=iboates" title="Tests">??????</a></td> </tr> </table> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/docs/conf.py new/pyproj-3.3.1/docs/conf.py --- old/pyproj-3.3.0/docs/conf.py 2021-09-18 17:44:57.000000000 +0200 +++ new/pyproj-3.3.1/docs/conf.py 2022-04-22 05:27:43.000000000 +0200 @@ -59,7 +59,7 @@ # General information about the project. project = "pyproj" -copyright = "2006-2018, Jeffrey Whitaker; 2019-2021, Open source contributors" +copyright = "2006-2018, Jeffrey Whitaker; 2019-2022, Open source contributors" author = "Jeffrey Whitaker" # The version info for the project you're documenting, acts as replacement diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/docs/history.rst new/pyproj-3.3.1/docs/history.rst --- old/pyproj-3.3.0/docs/history.rst 2021-11-18 02:45:53.000000000 +0100 +++ new/pyproj-3.3.1/docs/history.rst 2022-04-23 20:00:51.000000000 +0200 @@ -1,6 +1,18 @@ Change Log ========== +3.3.1 +------- +- WHL: Wheels for Linux are manylinux2014 (pip 19.3+) +- BUG: Complete database stub file with query_utm_crs_info() signature (issue #1044) +- BUG: Reorder deps in show_versions for setuptools issue (issue #1017) +- BUG: remove CustomConstructorCRS @abstractmethod decorator (pull #1018) +- BUG: Correct type annotation for AreaofUse.bounds (issue #1012) +- BUG: :func:`pyproj.datadir.get_data_dir` support for conda Windows (issue #1029) +- ENH: warn when :meth:`pyproj.crs.CRS.to_wkt()`, :meth:`pyproj.crs.CRS.to_proj4()`, or :meth:`pyproj.crs.CRS.to_json()` returns None (issue #1036) +- ENH: Added support for int-like strings and numpy dtypes (issues #1026 and #1835) +- ENH: Added support to pickle :class:`pyproj.transformer.Transformer` (issues #1058) + 3.3.0 ------- - WHL: Wheels contain PROJ 8.2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/docs/index.rst new/pyproj-3.3.1/docs/index.rst --- old/pyproj-3.3.0/docs/index.rst 2021-10-08 02:47:37.000000000 +0200 +++ new/pyproj-3.3.1/docs/index.rst 2022-04-22 05:27:43.000000000 +0200 @@ -9,12 +9,11 @@ .. note:: Minimum supported Python version is 3.8 +.. note:: Linux (manylinux2014) wheels require pip 19.3+ + .. note:: pyproj 3 wheels do not include transformation grids. For migration assistance see: :ref:`transformation_grids` -.. note:: pyproj 3+ no longer supports manylinux1 wheels. - pip>=19.0 is required to install manylinux2010 wheels. - .. toctree:: :maxdepth: 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/docs/installation.rst new/pyproj-3.3.1/docs/installation.rst --- old/pyproj-3.3.0/docs/installation.rst 2021-11-18 02:42:18.000000000 +0100 +++ new/pyproj-3.3.1/docs/installation.rst 2022-04-22 05:27:43.000000000 +0200 @@ -12,14 +12,15 @@ pip install pyproj - .. note:: pyproj 3+ no longer supports manylinux1 wheels. - pip>=19.0 is required to install manylinux2010 wheels. + .. note:: Linux (manylinux2014) wheels require pip 19.3+ .. note:: pyproj 3+ wheels do not include transformation grids. For migration assistance see: :ref:`transformation_grids` - - The MacOS and Linux wheels are powered by `multibuild by Matthew Brett <https://github.com/matthew-brett/multibuild>`__ + - The MacOS and Linux wheels are powered by + `cibuildwheel <https://github.com/pypa/cibuildwheel>`__ + & `multibuild <https://github.com/multi-build/multibuild>`__ - The Windows wheels are built by `Christoph Gohlke <https://www.lfd.uci.edu/~gohlke/pythonlibs/>`__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/docs/past_versions.rst new/pyproj-3.3.1/docs/past_versions.rst --- old/pyproj-3.3.0/docs/past_versions.rst 2021-09-19 02:19:58.000000000 +0200 +++ new/pyproj-3.3.1/docs/past_versions.rst 2022-04-22 05:27:43.000000000 +0200 @@ -1,6 +1,7 @@ Documentation Archive ===================== +- `3.3.0 <https://pyproj4.github.io/pyproj/3.3.0/>`_ - `3.2.1 <https://pyproj4.github.io/pyproj/3.2.1/>`_ - `3.1.0 <https://pyproj4.github.io/pyproj/3.1.0/>`_ - `3.0.1 <https://pyproj4.github.io/pyproj/3.0.1/>`_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/pyproj/__init__.py new/pyproj-3.3.1/pyproj/__init__.py --- old/pyproj-3.3.0/pyproj/__init__.py 2021-11-18 02:09:16.000000000 +0100 +++ new/pyproj-3.3.1/pyproj/__init__.py 2022-04-23 20:00:51.000000000 +0200 @@ -9,7 +9,7 @@ Contact: Jeffrey Whitaker <jeffrey.s.whita...@noaa.gov> Copyright (c) 2006-2018, Jeffrey Whitaker. -Copyright (c) 2019-2021, Open source contributors. +Copyright (c) 2019-2022, Open source contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -28,7 +28,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -__version__ = "3.3.0" +__version__ = "3.3.1" __all__ = [ "Proj", "Geod", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/pyproj/_crs.pyi new/pyproj-3.3.1/pyproj/_crs.pyi --- old/pyproj-3.3.0/pyproj/_crs.pyi 2021-09-18 17:44:57.000000000 +0200 +++ new/pyproj-3.3.1/pyproj/_crs.pyi 2022-04-22 05:27:43.000000000 +0200 @@ -23,7 +23,7 @@ def __str__(self) -> str: ... def __repr__(self) -> str: ... @property - def bounds(self) -> tuple[float]: ... + def bounds(self) -> Tuple[float, float, float, float]: ... class Base: name: str diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/pyproj/_show_versions.py new/pyproj-3.3.1/pyproj/_show_versions.py --- old/pyproj-3.3.0/pyproj/_show_versions.py 2021-11-06 03:53:34.000000000 +0100 +++ new/pyproj-3.3.1/pyproj/_show_versions.py 2022-04-22 05:27:43.000000000 +0200 @@ -81,7 +81,7 @@ deps_info: dict version information on relevant Python libraries """ - deps = ["certifi", "pip", "setuptools", "Cython"] + deps = ["certifi", "Cython", "setuptools", "pip"] def get_version(module): try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/pyproj/base.pxi new/pyproj-3.3.1/pyproj/base.pxi --- old/pyproj-3.3.0/pyproj/base.pxi 2021-11-01 01:29:57.000000000 +0100 +++ new/pyproj-3.3.1/pyproj/base.pxi 2022-04-22 05:27:43.000000000 +0200 @@ -1,6 +1,6 @@ from cpython.ref cimport PyObject -from math import radians, degrees +from math import degrees, radians cdef double _DG2RAD = radians(1.) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/pyproj/crs/crs.py new/pyproj-3.3.1/pyproj/crs/crs.py --- old/pyproj-3.3.0/pyproj/crs/crs.py 2021-09-21 02:47:02.000000000 +0200 +++ new/pyproj-3.3.1/pyproj/crs/crs.py 2022-04-22 05:27:43.000000000 +0200 @@ -7,7 +7,6 @@ import re import threading import warnings -from abc import abstractmethod from typing import Any, Callable, Dict, List, Optional, Tuple, Union from pyproj._crs import ( @@ -140,6 +139,16 @@ return _prepare_from_authority("epsg", auth_code) +def _is_epsg_code(auth_code: Any) -> bool: + if isinstance(auth_code, int): + return True + if isinstance(auth_code, str) and auth_code.isnumeric(): + return True + if hasattr(auth_code, "shape") and auth_code.shape == (): + return True + return False + + class CRS: """ A pythonic Coordinate Reference System manager. @@ -301,12 +310,12 @@ if projparams: if isinstance(projparams, _CRS): projstring = projparams.srs + elif _is_epsg_code(projparams): + projstring = _prepare_from_epsg(projparams) elif isinstance(projparams, str): projstring = _prepare_from_string(projparams) elif isinstance(projparams, dict): projstring = _prepare_from_dict(projparams) - elif isinstance(projparams, int): - projstring = _prepare_from_epsg(projparams) elif isinstance(projparams, (list, tuple)) and len(projparams) == 2: projstring = _prepare_from_authority(*projparams) elif hasattr(projparams, "to_wkt"): @@ -969,7 +978,7 @@ Returns ------- CRS: - The the geodeticCRS / geographicCRS from the CRS. + The geodeticCRS / geographicCRS from the CRS. """ return ( @@ -981,7 +990,7 @@ @property def source_crs(self) -> Optional["CRS"]: """ - The the base CRS of a BoundCRS or a DerivedCRS/ProjectedCRS, + The base CRS of a BoundCRS or a DerivedCRS/ProjectedCRS, or the source CRS of a CoordinateOperation. Returns @@ -1201,7 +1210,16 @@ ------- str """ - return self._crs.to_wkt(version=version, pretty=pretty) + wkt = self._crs.to_wkt(version=version, pretty=pretty) + if wkt is None: + warnings.warn( + f"CRS cannot be converted to a WKT string of a '{version}' version. " + "Select a different version of a WKT string or edit your CRS. Future" + "versions of pyproj will raise a CRSError in this case.", + FutureWarning, + stacklevel=2, + ) + return wkt def to_json(self, pretty: bool = False, indentation: int = 2) -> str: """ @@ -1220,7 +1238,15 @@ ------- str """ - return self._crs.to_json(pretty=pretty, indentation=indentation) + proj_json = self._crs.to_json(pretty=pretty, indentation=indentation) + if proj_json is None: + warnings.warn( + "CRS cannot be converted to a PROJ JSON string. " + "Future versions of pyproj will raise a CRSError in this case.", + FutureWarning, + stacklevel=2, + ) + return proj_json def to_json_dict(self) -> dict: """ @@ -1253,7 +1279,15 @@ ------- str """ - return self._crs.to_proj4(version=version) + proj = self._crs.to_proj4(version=version) + if proj is None: + warnings.warn( + "CRS cannot be converted to a PROJ string. " + "Future versions of pyproj will raise a CRSError in this case.", + FutureWarning, + stacklevel=2, + ) + return proj def to_epsg(self, min_confidence: int = 70) -> Optional[int]: """ @@ -1591,7 +1625,6 @@ """ @property - @abstractmethod def _expected_types(self) -> Tuple[str, ...]: """ These are the type names of the CRS class @@ -1648,7 +1681,7 @@ Returns ------- CRS: - The the geodeticCRS / geographicCRS from the CRS. + The geodeticCRS / geographicCRS from the CRS. """ return None if self._crs.geodetic_crs is None else CRS(self._crs.geodetic_crs) @@ -1656,7 +1689,7 @@ @property def source_crs(self) -> Optional["CRS"]: """ - The the base CRS of a BoundCRS or a DerivedCRS/ProjectedCRS, + The base CRS of a BoundCRS or a DerivedCRS/ProjectedCRS, or the source CRS of a CoordinateOperation. Returns diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/pyproj/database.pyi new/pyproj-3.3.1/pyproj/database.pyi --- old/pyproj-3.3.0/pyproj/database.pyi 2021-11-06 03:15:01.000000000 +0100 +++ new/pyproj-3.3.1/pyproj/database.pyi 2022-04-22 05:27:43.000000000 +0200 @@ -38,5 +38,9 @@ contains: bool = False, allow_deprecated: bool = False, ) -> List[CRSInfo]: ... - +def query_utm_crs_info( + datum_name: Optional[str] = None, + area_of_interest: Optional[AreaOfInterest] = None, + contains: bool = False, +) -> List[CRSInfo]: ... def get_database_metadata(key: str) -> Optional[str]: ... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/pyproj/datadir.py new/pyproj-3.3.1/pyproj/datadir.py --- old/pyproj-3.3.0/pyproj/datadir.py 2021-09-18 17:52:20.000000000 +0200 +++ new/pyproj-3.3.1/pyproj/datadir.py 2022-04-22 05:27:43.000000000 +0200 @@ -73,6 +73,7 @@ internal_datadir = Path(__file__).absolute().parent / "proj_dir" / "share" / "proj" proj_lib_dirs = os.environ.get("PROJ_LIB", "") prefix_datadir = Path(sys.prefix, "share", "proj") + conda_windows_prefix_datadir = Path(sys.prefix, "Library", "share", "proj") def valid_data_dir(potential_data_dir): if ( @@ -98,6 +99,8 @@ _VALIDATED_PROJ_DATA = proj_lib_dirs elif valid_data_dir(prefix_datadir): _VALIDATED_PROJ_DATA = str(prefix_datadir) + elif valid_data_dir(conda_windows_prefix_datadir): + _VALIDATED_PROJ_DATA = str(conda_windows_prefix_datadir) else: proj_exe = shutil.which("proj", path=sys.prefix) if proj_exe is None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/pyproj/geod.py new/pyproj-3.3.1/pyproj/geod.py --- old/pyproj-3.3.0/pyproj/geod.py 2021-10-08 02:47:37.000000000 +0200 +++ new/pyproj-3.3.1/pyproj/geod.py 2022-04-22 05:27:43.000000000 +0200 @@ -50,12 +50,12 @@ sphere = True if "b" in ellps_dict: semi_minor_axis: float = ellps_dict["b"] - eccentricity_squared: float = 1.0 - semi_minor_axis ** 2 / semi_major_axis ** 2 + eccentricity_squared: float = 1.0 - semi_minor_axis**2 / semi_major_axis**2 flattening: float = (semi_major_axis - semi_minor_axis) / semi_major_axis elif "rf" in ellps_dict: flattening = 1.0 / ellps_dict["rf"] semi_minor_axis = semi_major_axis * (1.0 - flattening) - eccentricity_squared = 1.0 - semi_minor_axis ** 2 / semi_major_axis ** 2 + eccentricity_squared = 1.0 - semi_minor_axis**2 / semi_major_axis**2 return semi_major_axis, semi_minor_axis, flattening, eccentricity_squared, sphere @@ -86,12 +86,12 @@ semi_major_axis = kwargs["a"] if "b" in kwargs: semi_minor_axis = kwargs["b"] - eccentricity_squared = 1.0 - semi_minor_axis ** 2 / semi_major_axis ** 2 + eccentricity_squared = 1.0 - semi_minor_axis**2 / semi_major_axis**2 flattening = (semi_major_axis - semi_minor_axis) / semi_major_axis elif "rf" in kwargs: flattening = 1.0 / kwargs["rf"] semi_minor_axis = semi_major_axis * (1.0 - flattening) - eccentricity_squared = 1.0 - semi_minor_axis ** 2 / semi_major_axis ** 2 + eccentricity_squared = 1.0 - semi_minor_axis**2 / semi_major_axis**2 elif "f" in kwargs: flattening = kwargs["f"] semi_minor_axis = semi_major_axis * (1.0 - flattening) @@ -99,13 +99,13 @@ elif "es" in kwargs: eccentricity_squared = kwargs["es"] semi_minor_axis = math.sqrt( - semi_major_axis ** 2 - eccentricity_squared * semi_major_axis ** 2 + semi_major_axis**2 - eccentricity_squared * semi_major_axis**2 ) flattening = (semi_major_axis - semi_minor_axis) / semi_major_axis elif "e" in kwargs: eccentricity_squared = kwargs["e"] ** 2 semi_minor_axis = math.sqrt( - semi_major_axis ** 2 - eccentricity_squared * semi_major_axis ** 2 + semi_major_axis**2 - eccentricity_squared * semi_major_axis**2 ) flattening = (semi_major_axis - semi_minor_axis) / semi_major_axis else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/pyproj/transformer.py new/pyproj-3.3.1/pyproj/transformer.py --- old/pyproj-3.3.0/pyproj/transformer.py 2021-10-09 02:49:18.000000000 +0200 +++ new/pyproj-3.3.1/pyproj/transformer.py 2022-04-22 05:27:43.000000000 +0200 @@ -15,7 +15,7 @@ from dataclasses import dataclass from itertools import chain, islice from pathlib import Path -from typing import Any, Iterable, Iterator, List, Optional, Tuple, Union, overload +from typing import Any, Dict, Iterable, Iterator, List, Optional, Tuple, Union, overload from pyproj import CRS from pyproj._compat import cstrencode @@ -310,6 +310,14 @@ self._local.transformer = transformer_maker() self._transformer_maker = transformer_maker + def __getstate__(self) -> Dict[str, Any]: + return {"_transformer_maker": self._transformer_maker} + + def __setstate__(self, state: Dict[str, Any]): + self.__dict__.update(state) + self._local = TransformerLocal() + self._local.transformer = self._transformer_maker() + @property def _transformer(self): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/pyproj.egg-info/PKG-INFO new/pyproj-3.3.1/pyproj.egg-info/PKG-INFO --- old/pyproj-3.3.0/pyproj.egg-info/PKG-INFO 2021-11-18 02:52:04.000000000 +0100 +++ new/pyproj-3.3.1/pyproj.egg-info/PKG-INFO 2022-04-23 20:01:14.000000000 +0200 @@ -1,12 +1,12 @@ Metadata-Version: 2.1 Name: pyproj -Version: 3.3.0 +Version: 3.3.1 Summary: Python interface to PROJ (cartographic projections and coordinate transformations library) Home-page: https://github.com/pyproj4/pyproj +Download-URL: http://python.org/pypi/pyproj Author: Jeff Whitaker Author-email: jeffrey.s.whita...@noaa.gov License: MIT -Download-URL: http://python.org/pypi/pyproj Project-URL: Documentation, https://pyproj4.github.io/pyproj/ Project-URL: Release Notes, https://pyproj4.github.io/pyproj/stable/history.html Project-URL: Bug Tracker, https://github.com/pyproj4/pyproj/issues @@ -39,10 +39,10 @@ <p align="center"> <a href="https://gitter.im/pyproj4-pyproj/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img alt="Join the chat at https://gitter.im/pyproj4-pyproj/community" src="https://badges.gitter.im/pyproj4-pyproj/community.svg"></a> -<a href="#contributors"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-44-orange.svg?style=flat-square"></a> -<a href="https://ci.appveyor.com/project/jswhit/pyproj"><img alt="Appveyor Build Status" src="https://ci.appveyor.com/api/projects/status/8xkka4s97uwhkc64/branch/master?svg=true"></a> +<a href="#contributors"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-49-orange.svg?style=flat-square"></a> +<a href="https://ci.appveyor.com/project/jswhit/pyproj"><img alt="Appveyor Build Status" src="https://ci.appveyor.com/api/projects/status/8xkka4s97uwhkc64/branch/main?svg=true"></a> <a href="https://github.com/pyproj4/pyproj/actions?query=workflow%3ATests"><img alt="GitHub Actions Build Status" src="https://github.com/pyproj4/pyproj/workflows/Tests/badge.svg"></a> -<a href="https://codecov.io/gh/pyproj4/pyproj"><img alt="Codecov Status" src="https://codecov.io/gh/pyproj4/pyproj/branch/master/graph/badge.svg"></a> +<a href="https://codecov.io/gh/pyproj4/pyproj"><img alt="Codecov Status" src="https://codecov.io/gh/pyproj4/pyproj/branch/main/graph/badge.svg"></a> <a href="https://badge.fury.io/py/pyproj"><img alt="PyPI" src="https://badge.fury.io/py/pyproj.svg"></a> <a href="https://pepy.tech/project/pyproj"><img alt="Downloads" src="https://pepy.tech/badge/pyproj"></a> <a href="https://anaconda.org/conda-forge/pyproj"><img alt="Anaconda-Server Badge" src="https://anaconda.org/conda-forge/pyproj/badges/version.svg"></a> @@ -129,6 +129,11 @@ <tr> <td align="center"><a href="https://www.metoffice.gov.uk/"><img src="https://avatars.githubusercontent.com/u/2051656?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bill Little</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=bjlittle" title="Documentation">????</a></td> <td align="center"><a href="https://github.com/gerritholl"><img src="https://avatars.githubusercontent.com/u/500246?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gerrit Holl</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=gerritholl" title="Documentation">????</a></td> + <td align="center"><a href="https://github.com/Kirill888"><img src="https://avatars.githubusercontent.com/u/1428024?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kirill Kouzoubov</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=Kirill888" title="Code">????</a></td> + <td align="center"><a href="https://github.com/hemberger"><img src="https://avatars.githubusercontent.com/u/846186?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dan Hemberger</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/issues?q=author%3Ahemberger" title="Bug reports">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=hemberger" title="Code">????</a></td> + <td align="center"><a href="https://github.com/martinfleis"><img src="https://avatars.githubusercontent.com/u/36797143?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Martin Fleischmann</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/issues?q=author%3Amartinfleis" title="Bug reports">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=martinfleis" title="Code">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=martinfleis" title="Tests">??????</a></td> + <td align="center"><a href="https://github.com/orontee"><img src="https://avatars.githubusercontent.com/u/2065954?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matthias Meulien</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=orontee" title="Code">????</a> <a href="https://github.com/pyproj4/pyproj/issues?q=author%3Aorontee" title="Bug reports">????</a></td> + <td align="center"><a href="https://github.com/iboates"><img src="https://avatars.githubusercontent.com/u/13814358?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Isaac Boates</b></sub></a><br /><a href="https://github.com/pyproj4/pyproj/commits?author=iboates" title="Code">????</a> <a href="https://github.com/pyproj4/pyproj/issues?q=author%3Aiboates" title="Bug reports">????</a> <a href="https://github.com/pyproj4/pyproj/commits?author=iboates" title="Tests">??????</a></td> </tr> </table> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/pyproj.egg-info/entry_points.txt new/pyproj-3.3.1/pyproj.egg-info/entry_points.txt --- old/pyproj-3.3.0/pyproj.egg-info/entry_points.txt 2021-11-18 02:52:04.000000000 +0100 +++ new/pyproj-3.3.1/pyproj.egg-info/entry_points.txt 2022-04-23 20:01:14.000000000 +0200 @@ -1,3 +1,2 @@ [console_scripts] pyproj = pyproj.__main__:main - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/test/conftest.py new/pyproj-3.3.1/test/conftest.py --- old/pyproj-3.3.0/test/conftest.py 2021-10-08 02:47:37.000000000 +0200 +++ new/pyproj-3.3.1/test/conftest.py 2022-04-22 05:27:43.000000000 +0200 @@ -12,6 +12,7 @@ PROJ_LOOSE_VERSION = version.parse(pyproj.__proj_version__) PROJ_GTE_81 = PROJ_LOOSE_VERSION >= version.parse("8.1") PROJ_GTE_82 = PROJ_LOOSE_VERSION >= version.parse("8.2") +PROJ_GTE_901 = PROJ_LOOSE_VERSION >= version.parse("9.0.1") RGF93toWSG84 = "RGF93 v1 to WGS 84 (1)" if PROJ_GTE_82 else "RGF93 to WGS 84 (1)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/test/crs/test_crs.py new/pyproj-3.3.1/test/crs/test_crs.py --- old/pyproj-3.3.0/test/crs/test_crs.py 2021-10-08 02:47:37.000000000 +0200 +++ new/pyproj-3.3.1/test/crs/test_crs.py 2022-04-22 05:27:43.000000000 +0200 @@ -1,6 +1,7 @@ import concurrent.futures import json import platform +from unittest.mock import patch import numpy import pytest @@ -19,7 +20,13 @@ from pyproj.enums import ProjVersion, WktVersion from pyproj.exceptions import CRSError from pyproj.transformer import TransformerGroup -from test.conftest import PROJ_GTE_82, RGF93toWSG84, assert_can_pickle, grids_available +from test.conftest import ( + PROJ_GTE_82, + PROJ_GTE_901, + RGF93toWSG84, + assert_can_pickle, + grids_available, +) class CustomCRS(object): @@ -68,6 +75,15 @@ assert CRS.from_string("epsg:xyz") +def test_from_epsg_int_like_string(): + proj = CRS.from_string("4326") + assert proj.to_epsg() == 4326 + + # Test with invalid EPSG code + with pytest.raises(CRSError): + assert CRS.from_string("0") + + def test_from_string(): wgs84_crs = CRS.from_string("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs") with pytest.warns(UserWarning): @@ -83,6 +99,17 @@ ) +def test_from_numpy(): + crs_numpy = numpy.array([4326])[0] + proj = CRS.from_user_input(crs_numpy) + assert proj.to_epsg() == 4326 + + # Test with invalid EPSG code + with pytest.raises(CRSError): + crs_numpy = numpy.array([0])[0] + assert CRS.from_epsg(crs_numpy) + + def test_from_string__invalid(): with pytest.raises(CRSError, match="CRS input is not a string"): CRS.from_string(4326) @@ -256,6 +283,9 @@ def test_repr__undefined(): + datum_name = "unknown" + if PROJ_GTE_901: + datum_name = f"{datum_name} using nadgrids=@null" assert repr( CRS( "+proj=merc +a=6378137.0 +b=6378137.0 +nadgrids=@null" @@ -272,7 +302,7 @@ "Coordinate Operation:\n" "- name: unknown to WGS84\n" "- method: NTv2\n" - "Datum: unknown\n" + f"Datum: {datum_name}\n" "- Ellipsoid: unknown\n" "- Prime Meridian: Greenwich\n" "Source CRS: unknown\n" @@ -342,7 +372,10 @@ "+k=1 +x_0=0 +y_0=0 +gamma=0 +ellps=WGS84 " "+towgs84=0,0,0,0,0,0,0 +units=m +no_defs" ) - assert crs.datum.name == "Unknown based on WGS84 ellipsoid" + datum_name = "Unknown based on WGS84 ellipsoid" + if PROJ_GTE_901: + datum_name = f"{datum_name} using towgs84=0,0,0,0,0,0,0" + assert crs.datum.name == datum_name def test_epsg__not_found(): @@ -889,6 +922,50 @@ crs.to_wkt("WKT_INVALID") +@pytest.mark.parametrize( + "wkt_version", + ["WKT2_2015", "WKT2_2015_SIMPLIFIED", "WKT1_GDAL", "WKT1_ESRI"], +) +def test_to_wkt_none_warning(wkt_version): + wkt_string = ( + 'PROJCRS["unknown",BASEGEOGCRS["unknown",DATUM["unknown",' + 'ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1,' + 'ID["EPSG",9001]]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199],' + 'ID["EPSG",8901]]],CONVERSION["unknown",METHOD["Equidistant Cylindrical",' + 'ID["EPSG",1028]],PARAMETER["Latitude of 1st standard parallel",0,' + 'ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],' + 'PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199],' + 'ID["EPSG",8802]],PARAMETER["False easting",0,' + 'LENGTHUNIT["unknown",111319.490793274],ID["EPSG",8806]],' + 'PARAMETER["False northing",0,LENGTHUNIT["unknown",111319.490793274],' + 'ID["EPSG",8807]]],CS[Cartesian,3],AXIS["(E)",east,ORDER[1],' + 'LENGTHUNIT["unknown",111319.490793274]],AXIS["(N)",north,ORDER[2],' + 'LENGTHUNIT["unknown",111319.490793274]],AXIS["ellipsoidal height (h)",up,' + 'ORDER[3],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]' + ) + crs = CRS.from_wkt(wkt_string) + with pytest.warns(FutureWarning, match="CRS cannot be converted to a WKT string"): + assert crs.to_wkt(version=wkt_version) is None + + +def test_to_proj4_none_warning(): + crs = CRS("EPSG:4326") + with patch("pyproj.crs.crs.CRS._crs") as crs_mock, pytest.warns( + FutureWarning, match="CRS cannot be converted to a PROJ string" + ): + crs_mock.to_proj4.return_value = None + assert crs.to_proj4() is None + + +def test_to_json_none_warning(): + crs = CRS("EPSG:4326") + with patch("pyproj.crs.crs.CRS._crs") as crs_mock, pytest.warns( + FutureWarning, match="CRS cannot be converted to a PROJ JSON string" + ): + crs_mock.to_json.return_value = None + assert crs.to_json() is None + + def test_to_proj4_enum(): crs = CRS.from_epsg(4326) with pytest.warns(UserWarning): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/test/crs/test_crs_cf.py new/pyproj-3.3.1/test/crs/test_crs_cf.py --- old/pyproj-3.3.0/test/crs/test_crs_cf.py 2021-10-10 01:53:53.000000000 +0200 +++ new/pyproj-3.3.1/test/crs/test_crs_cf.py 2022-04-22 05:27:43.000000000 +0200 @@ -18,7 +18,7 @@ VerticalPerspectiveConversion, ) from pyproj.exceptions import CRSError -from test.conftest import PROJ_LOOSE_VERSION +from test.conftest import PROJ_GTE_901, PROJ_LOOSE_VERSION def _to_dict(operation): @@ -81,6 +81,14 @@ towgs84="-122.74,-34.27,-22.83,-1.884,-3.400,-3.030,-15.62", ) towgs84_test = [-122.74, -34.27, -22.83, -1.884, -3.4, -3.03, -15.62] + horizontal_datum_name = ( + "Unknown based on International 1924 (Hayford 1909, 1910) ellipsoid" + ) + if PROJ_GTE_901: + horizontal_datum_name = ( + f"{horizontal_datum_name} using " + "towgs84=-122.74,-34.27,-22.83,-1.884,-3.400,-3.030,-15.62" + ) expected_cf = { "semi_major_axis": 6378388.0, "semi_minor_axis": crs.ellipsoid.semi_minor_metre, @@ -88,9 +96,7 @@ "reference_ellipsoid_name": "International 1924 (Hayford 1909, 1910)", "longitude_of_prime_meridian": 0.0, "prime_meridian_name": "Greenwich", - "horizontal_datum_name": ( - "Unknown based on International 1924 (Hayford 1909, 1910) ellipsoid" - ), + "horizontal_datum_name": horizontal_datum_name, "towgs84": towgs84_test, "grid_mapping_name": "transverse_mercator", "latitude_of_projection_origin": 0.0, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/test/crs/test_crs_maker.py new/pyproj-3.3.1/test/crs/test_crs_maker.py --- old/pyproj-3.3.0/test/crs/test_crs_maker.py 2021-10-08 02:47:37.000000000 +0200 +++ new/pyproj-3.3.1/test/crs/test_crs_maker.py 2022-04-22 05:27:43.000000000 +0200 @@ -23,7 +23,7 @@ from pyproj.crs.datum import CustomDatum from pyproj.crs.enums import VerticalCSAxis from pyproj.exceptions import CRSError -from test.conftest import assert_can_pickle +from test.conftest import PROJ_GTE_901, assert_can_pickle def assert_maker_inheritance_valid(new_crs, class_type): @@ -98,7 +98,10 @@ def test_make_geographic_3d_crs(): gcrs = GeographicCRS(ellipsoidal_cs=Ellipsoidal3DCS()) assert gcrs.type_name == "Geographic 3D CRS" - assert gcrs.to_authority() == ("IGNF", "WGS84GEODD") + expected_authority = ("IGNF", "WGS84GEODD") + if PROJ_GTE_901: + expected_authority = ("OGC", "CRS84h") + assert gcrs.to_authority() == expected_authority def test_make_derived_geographic_crs(tmp_path): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/test/test_datadir.py new/pyproj-3.3.1/test/test_datadir.py --- old/pyproj-3.3.0/test/test_datadir.py 2021-10-08 02:47:37.000000000 +0200 +++ new/pyproj-3.3.1/test/test_datadir.py 2022-04-22 05:27:43.000000000 +0200 @@ -144,6 +144,16 @@ assert get_data_dir() == str(proj_dir) +def test_get_data_dir__from_prefix__conda_windows(tmp_path): + with proj_env(), patch.dict(os.environ, {}, clear=True), patch( + "pyproj.datadir.Path.absolute", return_value=_INVALID_PATH + ), patch("pyproj.datadir.sys.prefix", str(tmp_path)): + proj_dir = tmp_path / "Library" / "share" / "proj" + proj_dir.mkdir(parents=True) + create_projdb(proj_dir) + assert get_data_dir() == str(proj_dir) + + def test_get_data_dir__from_path(tmp_path): with proj_env(), patch.dict(os.environ, {}, clear=True), patch( "pyproj.datadir.Path.absolute", return_value=_INVALID_PATH diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyproj-3.3.0/test/test_transformer.py new/pyproj-3.3.1/test/test_transformer.py --- old/pyproj-3.3.0/test/test_transformer.py 2021-10-09 02:49:18.000000000 +0200 +++ new/pyproj-3.3.1/test/test_transformer.py 2022-04-22 05:27:43.000000000 +0200 @@ -1,5 +1,6 @@ import concurrent.futures import os +import pickle from array import array from functools import partial from glob import glob @@ -1534,3 +1535,18 @@ transformer = Transformer.from_pipeline("+init=ITRF2008:ITRF2000") assert transformer.source_crs is None assert transformer.target_crs is None + + +def test_pickle_transformer_from_pipeline(): + transformer = Transformer.from_pipeline("+init=ITRF2008:ITRF2000") + assert transformer == pickle.loads(pickle.dumps(transformer)) + + +def test_pickle_transformer_from_crs(): + transformer = Transformer.from_crs( + "EPSG:4326", + "EPSG:2964", + always_xy=True, + area_of_interest=AreaOfInterest(-136.46, 49.0, -60.72, 83.17), + ) + assert transformer == pickle.loads(pickle.dumps(transformer))