jazzband / geojson

Python bindings and utilities for GeoJSON
https://pypi.python.org/pypi/geojson/
BSD 3-Clause "New" or "Revised" License
898 stars 120 forks source link

Compatibility with Python 3.12 #221

Closed amotl closed 8 months ago

amotl commented 9 months ago

Hi there,

thank you very much for conceiving and maintaining the geojson package.

We are currently evaluating support for Python 3.12 on behalf of https://github.com/earthobservations/wetterdienst/pull/1008, and wanted to report an observation we just made over there ^1:

SolverProblemError

The current project's Python requirement (3.12.0rc3) is not compatible with some of the required packages Python requirement:
- geojson requires Python >=3.7, <3.12, so it will not be satisfied for Python 3.12.0rc3

Because geojson (3.0.1) requires Python >=3.7, <3.12
and no versions of geojson match >=3,<3.0.1 || >3.0.1,<4, geojson is forbidden.
So, because wetterdienst depends on geojson (>=3,<4), version solving failed.

Python 3.12 will be released on 2023-10-02 ^2, so, if nothing speaks against it, it might be applicable to relax the version constraint, and run another release in order to unlock a few other applications depending on geojson?

With kind regards, Andreas.

hugovk commented 9 months ago

This restriction was relaxed to 3.7 - 3.12 in https://github.com/jazzband/geojson/pull/215 (although I don't think there should be any upper bound).

What is missing is a release to PyPI.

@rayrrr After #222 is merged, please could you make a new release?

amotl commented 9 months ago

Hi again,

thank you for integrating GH-222 so quickly, @hugovk.

The package can now be installed well interactively, as a workaround, by invoking pip install git+https://github.com/jazzband/geojson, but it can't be used as a dependency in setup.py / setup.cfg / pyproject.toml, unless it will be released on PyPI, right?

So, in order to support the advent of Python 3.12, can we humbly ask you to run a release on PyPI?

With kind regards, Andreas.

hugovk commented 9 months ago

Yes, it's possible.

Here's an example: https://peps.python.org/pep-0508/#examples

For example in pyproject.toml:

dependencies = [
  "geojson @ https://github.com/jazzband/geojson/archive/refs/heads/main.zip",
]

Note this installs from a zip which should be quicker than from a Git clone.

cpontvieux-systra commented 8 months ago

What’s blocking to make a proper Pypi release?

rayrrr commented 8 months ago

New release forthcoming. I just need to write up the changelog and push it out. Will aim to get it done by this weekend at the latest.

rayrrr commented 8 months ago

3.1.0 has been released with Python 3.12 support. https://pypi.org/project/geojson/

amotl commented 8 months ago

Dear Ray,

thank you so much for running a release ❤️. On two downstream projects, we've invoked corresponding CI runs. It seems to work well [^1].

With kind regards, Andreas.

[^1]: Modulo Wetterdienst, now failing on h5py, but that's a different thing.