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

Compatibility issue with 'watchdog' and Python 3.12 #7

Open
jiaruiz717 opened this issue May 24, 2024 · 0 comments
Open

Compatibility issue with 'watchdog' and Python 3.12 #7

jiaruiz717 opened this issue May 24, 2024 · 0 comments

Comments

@jiaruiz717
Copy link

jiaruiz717 commented May 24, 2024

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:

  1. Set up a Python 3.12 environment.
  2. Clone the coredump-uploader repository.
  3. 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"
  4. 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.

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

No branches or pull requests

1 participant