Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading pyproj to 3.7.0 and tests to cover Python 3.13 and 3.14.0-alpha.2 #169

Closed
wants to merge 3 commits into from

Conversation

marklit
Copy link

@marklit marklit commented Dec 2, 2024

I tested this on my machine and pyproj 3.7.0 doesn't trigger any issues with any of the unit tests.

$ pip install -U pyproj
Requirement already satisfied: pyproj in /home/mark/.morecantile/lib/python3.10/site-packages (3.7.0)
Requirement already satisfied: certifi in /home/mark/.morecantile/lib/python3.10/site-packages (from pyproj) (2024.8.30)
$ python3 -m pytest mercantile -s -vv | tail
mercantile/tests/test_funcs.py::test_geojson_bounds[obj0] PASSED
mercantile/tests/test_funcs.py::test_geojson_bounds[obj1] PASSED
mercantile/tests/test_funcs.py::test_geojson_bounds[obj2] PASSED
mercantile/tests/test_funcs.py::test_geojson_bounds[obj3] PASSED
mercantile/tests/test_funcs.py::test_xy_future_warnings[0-1] PASSED
mercantile/tests/test_funcs.py::test_xy_future_warnings[1-0] PASSED
mercantile/tests/test_funcs.py::test_xy_future_warnings[-1-0] PASSED
mercantile/tests/test_funcs.py::test_xy_future_warnings[0--1] PASSED

============================= 136 passed in 0.62s ==============================

@marklit marklit mentioned this pull request Dec 2, 2024
@marklit marklit changed the title Upgrading pyproj to 3.7.0 Upgrading pyproj to 3.7.0 and tests to cover Python 3.13 and 3.14.0-alpha.2 Dec 2, 2024
pyproject.toml Outdated
@@ -22,7 +22,7 @@ classifiers = [
dynamic = ["version"]
dependencies = [
"attrs",
"pyproj~=3.1",
"pyproj~=3.7",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marklit what do you think about pyproj>=3.1,<4.0 ?

@vincentsarago
Copy link
Member

python 3.8 and 3.9 tests are failing because pyproj 3.7 dropped support for both versions

@marklit
Copy link
Author

marklit commented Dec 19, 2024

python 3.8 and 3.9 tests are failing because pyproj 3.7 dropped support for both versions

Python 3.8 is still the default in WSL2. Maybe pin to the latest version of pyproj 3.6?

Python 3.8 dropped in pyproj 3.7. It's still the default for WSL so try the last version of pyproj 3.6 instead.
@vincentsarago
Copy link
Member

vincentsarago commented Dec 19, 2024

what is WSL2? I'm going to remove python 3.8 support in most of our project because dependencies like pyproj and rasterio removed it

as I mentioned we could totally have pyproj>=3.1,<4.0

@marklit
Copy link
Author

marklit commented Dec 19, 2024

what is WSL2? I'm going to remove python 3.8 support in most of our project because dependencies like pyproj and rasterio removed it

as I mentioned we could totally have pyproj>=3.1,<4.0

WSL2 is Windows Sub-system Linux. It's how you can run Ubuntu almost natively on Windows 10 and 11. It's based on versions of Ubuntu that are starting to get on in age now.

ArcGIS Pro only runs on Windows natively and Jack said Esri work with 650K+ orgs. This population of users is more likely to try out tools like yours at some point and they'll be Windows users.

I'm not sure when MS is going to update WSL2 but it defaults to Python 3.8 so I'm careful to keep supporting that version.

@vincentsarago
Copy link
Member

@marklit I'm not sure of the intend of the PR then. You proposed to upgrade pyproj to 3.7, I mentioned twice that we could open up the requirement to >=3.1,<4.0 to avoid having issue with python/package dependencies 🤷

@gadomski
Copy link

gadomski commented Dec 19, 2024

This population of users is more likely to try out tools like yours at some point and they'll be Windows users.

Also, I'm pretty sure you can install a newer Python version in WSL2? So there's nothing here preventing Windows users from using the package.

@marklit
Copy link
Author

marklit commented Dec 19, 2024

We'd still get the latest 3.6 instead of 3.1 atm.

The process of upgrading Python 3 to anything later than 3.8 is somewhat involved with a number of apt commands. For people used to juggling packages on Ubuntu, this isn't an issue but these people might not overlap well with those getting into modern GIS.

Could you allow the Python 3.12 test to run so I can see how far it gets, please?

I'll look into what might be needed to make 3.13 and 3.14 happy.

@vincentsarago
Copy link
Member

python 3.13 is failing because pyproj 3.6 wheels are not available (they started shipping wheels for 3.7)
python 3.14 is failing because there are no pyproj wheels (we won't be able to test 3.14 while pyproj/rasterio don't ship those)

@vincentsarago
Copy link
Member

@marklit are there any specific why user on python 3.8 would want to have pyproj >3.1 (e.g 3.6 ?)

In #171 I'm going to remove python 3.8 support, meaning that next published (6.2) version of morecantile will drop python 3.8 support

@marklit
Copy link
Author

marklit commented Dec 19, 2024

@marklit are there any specific why user on python 3.8 would want to have pyproj >3.1 (e.g 3.6 ?)

In #171 I'm going to remove python 3.8 support, meaning that next published (6.2) version of morecantile will drop python 3.8 support

I was trying to find a way to support every version of Python between 3.8 and the upcoming 3.14. I'm using morecantile in https://github.com/marklit/tiles2columns and is aimed at WSL2 users specifically due to visitors from the Esri world trying it out.

The blog post that I used to launch that tool has had 70K+ hits from Hacker News alone. There seems to be ongoing traffic to that post from Google and a bunch of other places as getting MVT served by OSM is a pretty big deal.

If you do drop 3.8 support, I can pin to an older version of your library but until Microsoft upgrade WSL2 to a newer version of Python, I need to keep 3.8 support around.

I'm not sure of every single fix that exists between pyproj 3.1 and 3.6 but I'm certain there are some profound changes between that time.

@vincentsarago
Copy link
Member

vincentsarago commented Dec 19, 2024

I've added back 3.8 in 2cbf0b4

so next version 6.2.0 will have pyproj>=3.1 (so effectively you'll get 3.6 with python3.8) but will remove python 3.8 on 6.3

@vincentsarago
Copy link
Member

closed in favour of #171

@wildintellect
Copy link

wildintellect commented Dec 19, 2024

what is WSL2? I'm going to remove python 3.8 support in most of our project because dependencies like pyproj and rasterio removed it
as I mentioned we could totally have pyproj>=3.1,<4.0

WSL2 is Windows Sub-system Linux. It's how you can run Ubuntu almost natively on Windows 10 and 11. It's based on versions of Ubuntu that are starting to get on in age now.

ArcGIS Pro only runs on Windows natively and Jack said Esri work with 650K+ orgs. This population of users is more likely to try out tools like yours at some point and they'll be Windows users.

ArcGIS Pro 3.4 includes more recent Python, 3.11 https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/available-python-libraries.htm
Conda is also fully included so making new envs with newer python will work.

I'm not sure when MS is going to update WSL2 but it defaults to Python 3.8 so I'm careful to keep supporting that version.

If you're advanced enough to use WSL2, switching python versions is not hard https://linuxbeast.com/blog/managing-python-versions-on-wsl-ubuntu/ though I would tell people to just change their default WSL2 distro to a newer version.

Even Linux users don't expect to use stock python on their system when doing science or development that requires newer libraries. Ubuntu even started blocking pip installs to the default python and telling you to use virtualenv or conda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants