Compatibility issue with 'watchdog' and Python 3.12
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- docker, python
- Domain
- build-system
Research direction
Start with pyproject.toml and reproduce poetry install in a Python 3.12 environment using the Arch Linux Docker image described in the issue. Update the watchdog and Python constraints as needed; done means installation no longer fails on pathtools or the removed imp module.
Written by the indexing model from the issue text.
Description
We encountered compatibility issues when using the coredump-uploader with Python 3.12 in archlinux docker image due to the dependency on watchdog version <1.0.0(0.10.4 to be specific). The version of watchdog specified (^0.x.x) uses pathtools, which is incompatible with Python 3.12 because imp(a dependency of watchdog 0.10.4) is deprecated and removed in Python 3.12. It is also not compatible with PEP 517 build system.
To resolve this, we updated the pyproject.toml file to use watchdog version 1.0.0, which replaces pathtools with pathlib. This change resolves the compatibility issue.
Python version in tool.poetry.dependencies also needs to be adjusted( I use python = ">=3.6,<4.0").
Steps to Reproduce:
- Set up a Python 3.12 environment.
- Clone the coredump-uploader repository.
- Get poetry(I use
ENV POETRY_HOME=/app/poetryInstallation&&RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.8.3&&ENV PATH="$PATH:$POETRY_HOME/bin" - Run
poetry install.
Observed Behavior:
- poetry install fails with errors related to pathtools compatibility. (
Note: This error originates from the build backend, and is likely not a problem with poetry but with pathtools (0.1.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "pathtools (==0.1.2)"') - I tried
pip install --no-use-pep517 "pathtools==0.1.2"then got:ModuleNotFoundError: No module named 'imp'
My solution:
- Update the pyproject.toml to use a newer watchdog version(I use 1.0.0).
- Adjust the Python version accordingly( I use
python = ">=3.6,<4.0")
Thank you for your attention to this issue. Please let me know if you need any further information.
- Dominant language
- Python
- Stars
- 15
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/coredump-uploader
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
getsentry/coredump-uploader#5 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
All issues in getsentry/coredump-uploader
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100