valkey-io / valkey-py

Valkey Python client based on a fork of redis-py
MIT License
20 stars 2 forks source link

Add development support for python 3.12 #24

Open kjaymiller opened 3 days ago

kjaymiller commented 3 days ago

Thanks for wanting to report an issue you've found in valkey-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!

Version: What valkey-py and what valkey version is the issue happening on?

Platform: Python 3.12 on MacOS (M-Series ARM devices)

Description: There are some package changes that need to be made to make development possible on python 3.12

aiven-sal commented 2 days ago

Is this just to make development possible or is there any production need? If it's just for development, you may consider using pyenv. This is what I use as well, because my distro also has 3.12 by default and it works quite well (on Linux at least).

kjaymiller commented 2 days ago

development is possible with some work but in order to run invoke devenv with the Python 3.12 followed by invoke tests you run into several module not found errors that you can either import yourself likepyyaml or in some cases they have been replaced in updated versions of the existing requirements.

I would be interested in understanding why the versions are pinned to the versions selected. Other that tests failing outside the scope of my work, I've seen no issues with making the replacements.

distutils has been removed from Python as of 3.12 and is only used in a single point for testing. That can be replaced with a new module (again my suggestion is dirty_equals as it seems the most up to date and could have some other utilities that would be helpful in testing.

FWIW I'm using pyenv which when I switched the environment to 3.11 and saw the deprecation warnings, that is how I begun the digging for updated versions and replacements.