Skip to content

Fix missing dependency on packaging #590

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

Merged
merged 1 commit into from
Dec 9, 2023
Merged

Fix missing dependency on packaging #590

merged 1 commit into from
Dec 9, 2023

Conversation

coox
Copy link
Contributor

@coox coox commented Dec 5, 2023

Description

Since the deprecation of distutils (#574), the packaging package has become a requirement, but was missing from the project’s dependencies.

We noticed this when recently attempting to install pg_chameleon, only to end up facing a ModuleNotFoundError, which we traced back to this unsatisfied dependency.

The present Pull Request fixes this by explicitly listing packaging as a dependency.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Other (please specify below)

Checklist

  • I have read and understood the CONTRIBUTING.md document.
  • I have checked there aren't any other open Pull Requests for the desired changes.
  • This PR resolves an issue #[Issue Number Here].

Tests

  • All tests have passed.
  • New tests have been added to cover the changes. (describe below if applicable).

This package has been required since deprecation of `distutils`
@sean-k1
Copy link
Collaborator

sean-k1 commented Dec 5, 2023

@coox Thanks for your reporting.
Is there a problem running or a problem installing it?
can you describe pg_chameleon pip install version

when I try to install latest version 2.0.19, i did not �found the error.

pip install pg-chameleon==2.0.19
Collecting pg-chameleon==2.0.19
  Downloading pg_chameleon-2.0.19-py3-none-any.whl (107 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 107.1/107.1 kB 3.7 MB/s eta 0:00:00
Requirement already satisfied: PyMySQL>=0.10.0 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from pg-chameleon==2.0.19) (1.1.0)
Collecting mysql-replication>=0.31 (from pg-chameleon==2.0.19)
  Using cached mysql_replication-1.0.4-py3-none-any.whl
Collecting psycopg2-binary>=2.8.3 (from pg-chameleon==2.0.19)
  Downloading psycopg2_binary-2.9.9-cp39-cp39-macosx_10_9_x86_64.whl (2.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 11.1 MB/s eta 0:00:00
Requirement already satisfied: PyYAML>=3.13 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from pg-chameleon==2.0.19) (6.0.1)
Collecting tabulate>=0.8.1 (from pg-chameleon==2.0.19)
  Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting daemonize>=2.4.7 (from pg-chameleon==2.0.19)
  Downloading daemonize-2.5.0-py2.py3-none-any.whl (5.2 kB)
Collecting rollbar>=0.13.17 (from pg-chameleon==2.0.19)
  Downloading rollbar-1.0.0-py3-none-any.whl (101 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.2/101.2 kB 4.3 MB/s eta 0:00:00
Requirement already satisfied: requests>=0.12.1 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from rollbar>=0.13.17->pg-chameleon==2.0.19) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from requests>=0.12.1->rollbar>=0.13.17->pg-chameleon==2.0.19) (3.3.0)
Requirement already satisfied: idna<4,>=2.5 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from requests>=0.12.1->rollbar>=0.13.17->pg-chameleon==2.0.19) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from requests>=0.12.1->rollbar>=0.13.17->pg-chameleon==2.0.19) (2.0.6)
Requirement already satisfied: certifi>=2017.4.17 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from requests>=0.12.1->rollbar>=0.13.17->pg-chameleon==2.0.19) (2023.7.22)
Installing collected packages: daemonize, tabulate, psycopg2-binary, mysql-replication, rollbar, pg-chameleon
Successfully installed daemonize-2.5.0 mysql-replication-1.0.4 pg-chameleon-2.0.19 psycopg2-binary-2.9.9 rollbar-1.0.0 tabulate-0.9.0

@gongyisheng
Copy link

gongyisheng commented Dec 8, 2023

@coox Thanks for your reporting. Is there a problem running or a problem installing it? can you describe pg_chameleon pip install version

when I try to install latest version 2.0.19, i did not �found the error.

pip install pg-chameleon==2.0.19
Collecting pg-chameleon==2.0.19
  Downloading pg_chameleon-2.0.19-py3-none-any.whl (107 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 107.1/107.1 kB 3.7 MB/s eta 0:00:00
Requirement already satisfied: PyMySQL>=0.10.0 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from pg-chameleon==2.0.19) (1.1.0)
Collecting mysql-replication>=0.31 (from pg-chameleon==2.0.19)
  Using cached mysql_replication-1.0.4-py3-none-any.whl
Collecting psycopg2-binary>=2.8.3 (from pg-chameleon==2.0.19)
  Downloading psycopg2_binary-2.9.9-cp39-cp39-macosx_10_9_x86_64.whl (2.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 11.1 MB/s eta 0:00:00
Requirement already satisfied: PyYAML>=3.13 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from pg-chameleon==2.0.19) (6.0.1)
Collecting tabulate>=0.8.1 (from pg-chameleon==2.0.19)
  Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting daemonize>=2.4.7 (from pg-chameleon==2.0.19)
  Downloading daemonize-2.5.0-py2.py3-none-any.whl (5.2 kB)
Collecting rollbar>=0.13.17 (from pg-chameleon==2.0.19)
  Downloading rollbar-1.0.0-py3-none-any.whl (101 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.2/101.2 kB 4.3 MB/s eta 0:00:00
Requirement already satisfied: requests>=0.12.1 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from rollbar>=0.13.17->pg-chameleon==2.0.19) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from requests>=0.12.1->rollbar>=0.13.17->pg-chameleon==2.0.19) (3.3.0)
Requirement already satisfied: idna<4,>=2.5 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from requests>=0.12.1->rollbar>=0.13.17->pg-chameleon==2.0.19) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from requests>=0.12.1->rollbar>=0.13.17->pg-chameleon==2.0.19) (2.0.6)
Requirement already satisfied: certifi>=2017.4.17 in ./opt/anaconda3/envs/python-mysql-replication/lib/python3.9/site-packages (from requests>=0.12.1->rollbar>=0.13.17->pg-chameleon==2.0.19) (2023.7.22)
Installing collected packages: daemonize, tabulate, psycopg2-binary, mysql-replication, rollbar, pg-chameleon
Successfully installed daemonize-2.5.0 mysql-replication-1.0.4 pg-chameleon-2.0.19 psycopg2-binary-2.9.9 rollbar-1.0.0 tabulate-0.9.0

I meet same issue before. If you uninstall packaging and re-install mysql-replication the problem can be reproduced.
env: python 3.8.10, pip 21.1.1
packaging version can be 23.1
image

@sean-k1
Copy link
Collaborator

sean-k1 commented Dec 9, 2023

@coox @gongyisheng I'll release this problem Thanks

@sean-k1 sean-k1 merged commit 4ea7412 into julien-duponchelle:main Dec 9, 2023
sean-k1 added a commit that referenced this pull request Dec 9, 2023
* Fix missing dependency on packaging (#590)
* implement partial format description event fields (#585)
@sean-k1 sean-k1 mentioned this pull request Dec 9, 2023
@coox
Copy link
Contributor Author

coox commented Dec 9, 2023

Thank you @sean-k1 and @gongyisheng!

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

Successfully merging this pull request may close these issues.

3 participants