You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PyCSW 2.6.1 (latest release, from oct/2021) requires the deprecated "imp" library which is no longer available in Python 3.12
The master branch has already dropped that dependency on the "server.py" file, so no patch is necessary. This issue will be solved with a release of 3.0 which seems to be in the works.
Environment
operating system: all
Python version: 3.12
pycsw version: 2.6.1
source/distribution
git clone
DebianGIS/UbuntuGIS
PyPI
zip/tar.gz
other (please specify):
web server
Apache/mod_wsgi
CGI
other (please specify): geonode backend when trying to use python 3.12.
Steps to Reproduce
Run a container with the latest python version:
$ podman run -it --rm python:latest bash
Inside the container, install the required packages and launch a python console:
$ pip install setuptools pycsw==2.6.1 #latest version as of 2024-09-11
$ python
In the python shell run the following:
frompycswimportserverimportosos.environ['QUERY_STRING'] ="fake query"# dummy configuration dictionary. It is important to have a "mappings" section in "repository" to trigger the invalid import.config= {
'server': {
'home': '.',
'url': 'http://localhost:8000',
'mimetype': 'application/xml; charset=UTF-8',
'encoding': 'UTF-8',
'language': 'en-US',
'maxrecords': '10',
},
'repository': {
'database': 'sqlite:///data.db',
'table': 'records',
'mappings': 'path/to/your/mappings.py'
}
}
# Instantiate pycsw objectcsw=server.Csw(rtconfig=config)
Running the code above will generate the following error message:
Could not load custom mappings: No module named 'imp'
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/pycsw/server.py", line 194, in __init__
import imp
ModuleNotFoundError: No module named 'imp'
Additional Information
This issue will be solved with a release of 3.0 which seems to be in the works.
The text was updated successfully, but these errors were encountered:
Description
PyCSW 2.6.1 (latest release, from oct/2021) requires the deprecated "imp" library which is no longer available in Python 3.12
The master branch has already dropped that dependency on the "server.py" file, so no patch is necessary. This issue will be solved with a release of 3.0 which seems to be in the works.
Environment
Steps to Reproduce
Run a container with the latest python version:
Inside the container, install the required packages and launch a python console:
$ pip install setuptools pycsw==2.6.1 #latest version as of 2024-09-11 $ python
In the python shell run the following:
Running the code above will generate the following error message:
Additional Information
This issue will be solved with a release of 3.0 which seems to be in the works.
The text was updated successfully, but these errors were encountered: