Skip to content

Commit e65ae09

Browse files
Build: Deprecate Py<3.10 (#538)
1 parent 3cb2bdd commit e65ae09

12 files changed

Lines changed: 43 additions & 59 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,7 @@ If the message is a warning, run your program with the ``-Werror`` flag: ``pytho
112112
- type: markdown
113113
attributes:
114114
value: "### Thanks! Have a nice day!"
115+
116+
- type: markdown
117+
attributes:
118+
value: "Note that a Pull Request to fix this bug would be very welcome if you have the time and skills to do it"

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@ Your requests must include the following features:
5454
- type: markdown
5555
attributes:
5656
value: "### Thanks! Have a nice day!"
57+
58+
- type: markdown
59+
attributes:
60+
value: "Note that a Pull Request to fix this bug would be very welcome if you have the time and skills to do it"

.github/ISSUE_TEMPLATE/how_to_use.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ If the message is a warning, run your program with the ``-Werror`` flag: ``pytho
8282
id: package_version
8383
attributes:
8484
label: GeoAlchemy 2 Version in Use
85-
description: e.g. 1.4.42, 2.0.2, etc or commit hash
85+
description: e.g. 1.4.42, 2.0.2, etc. or commit hash
8686
validations:
8787
required: true
8888

.github/workflows/test_and_publish.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
python-version: [
30-
{"pkg_name": "python==3.7.*", "flag": "3.7"},
31-
{"pkg_name": "python==3.8.*", "flag": "3.8"},
32-
{"pkg_name": "python==3.9.*", "flag": "3.9"},
3330
{"pkg_name": "python==3.10.*", "flag": "3.10"},
3431
{"pkg_name": "python==3.11.*", "flag": "3.11"},
3532
{"pkg_name": "python==3.12.*", "flag": "3.12"},
33+
{"pkg_name": "python==3.13.*", "flag": "3.13"},
3634
{"pkg_name": "pypy3.10", "flag": "pypy3.10"},
3735
]
3836

@@ -155,7 +153,6 @@ jobs:
155153
PYTEST_MARIADB_DB_URL: mariadb://gis:gis@127.0.0.1:3308/gis
156154
run: |
157155
if [[ ${{ matrix.python-version.flag }} == 'pypy3.10' ]]; then
158-
export PYTEST_ADDOPTS=${PYTEST_ADDOPTS}' --ignore=tests/gallery/test_insert_raster.py'
159156
export PYTEST_SPATIALITE3_DB_URL="FAILING URL"
160157
export PYTEST_SPATIALITE4_DB_URL="FAILING URL"
161158
else

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ var/
2626
*.egg-info/
2727
.installed.cfg
2828
*.egg
29+
.env
30+
.venv
2931

3032
# Installer logs
3133
pip-log.txt
@@ -60,6 +62,11 @@ reports/
6062
doc/_build/
6163
doc/gallery/
6264

65+
# Mypy
66+
.mypy_cache/
67+
.dmypy.json
68+
dmypy.json
69+
6370
# Miscellaneous
6471
*.csv
6572
*.sh

GeoAlchemy2_dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ channels:
33
- conda-forge
44
dependencies:
55
- libspatialite
6-
- python=3.7.*
6+
- python=3.10.*
77
- pyproj
88
- psycopg2

geoalchemy2/__init__.py

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,12 @@
2020

2121
admin.setup_ddl_event_listeners()
2222

23-
24-
# Get version number
25-
__version__ = "UNKNOWN VERSION"
26-
27-
# Attempt to use importlib.metadata first because it's much faster
28-
# though it's only available in Python 3.8+ so we'll need to fall
29-
# back to pkg_resources for Python 3.7 support
3023
try:
31-
import importlib.metadata
32-
except ImportError:
33-
try:
34-
from pkg_resources import DistributionNotFound
35-
from pkg_resources import get_distribution
36-
except ImportError: # pragma: no cover
37-
pass
38-
else:
39-
try:
40-
__version__ = get_distribution("GeoAlchemy2").version
41-
except DistributionNotFound: # pragma: no cover
42-
pass
43-
else:
44-
try:
45-
__version__ = importlib.metadata.version("GeoAlchemy2")
46-
except importlib.metadata.PackageNotFoundError: # pragma: no cover
47-
pass
24+
from importlib.metadata import version
4825

26+
__version__ = version("geoalchemy2")
27+
except ImportError:
28+
__version__ = "0.0.0"
4929

5030
__all__ = [
5131
"__version__",

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ build-backend = "setuptools.build_meta"
1313
[tool.black]
1414
line-length = 100
1515
target-version = [
16-
"py37",
17-
"py38",
18-
"py39",
1916
"py310",
2017
"py311",
2118
"py312",

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@
1111
"Environment :: Plugins",
1212
"Operating System :: OS Independent",
1313
"Programming Language :: Python",
14-
"Programming Language :: Python :: 3.7",
15-
"Programming Language :: Python :: 3.8",
16-
"Programming Language :: Python :: 3.9",
1714
"Programming Language :: Python :: 3.10",
1815
"Programming Language :: Python :: 3.11",
1916
"Programming Language :: Python :: 3.12",
17+
"Programming Language :: Python :: 3.13",
2018
"Intended Audience :: Information Technology",
2119
"License :: OSI Approved :: MIT License",
2220
"Topic :: Scientific/Engineering :: GIS",
@@ -30,7 +28,7 @@
3028
"Source": "https://github.com/geoalchemy/geoalchemy2",
3129
},
3230
license="MIT",
33-
python_requires=">=3.7",
31+
python_requires=">=3.10",
3432
packages=find_namespace_packages(include=["geoalchemy2*"]),
3533
include_package_data=True,
3634
zip_safe=False,

test_container/helpers/entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ done
1818
echo "###############################"
1919
echo "GeoAlchemy2 Test Container"
2020
echo ""
21-
echo 'run tests with `tox --workdir /output -vv`'
21+
echo 'run tests with `tox --workdir /output -v run`'
22+
echo 'run only a specific job, e.g. `py310-sqlalatest`, with `tox --workdir /output -v run -e py310-sqlalatest`'
2223
echo "###############################"
2324

2425
###############################

0 commit comments

Comments
 (0)