getsentry / coredump-uploader

Coredump uploader
MIT License
13 stars 6 forks source link

Compatibility issue with 'watchdog' and Python 3.12 #7

Open jiaruiz717 opened 2 months ago

jiaruiz717 commented 2 months ago

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:

My solution:

Thank you for your attention to this issue. Please let me know if you need any further information.