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

Python 3.12 #2979

Merged
merged 34 commits into from
Jul 11, 2024
Merged

Python 3.12 #2979

merged 34 commits into from
Jul 11, 2024

Conversation

chayim
Copy link
Contributor

@chayim chayim commented Oct 5, 2023

Updating the trove, and CI to support the Python 3.12 release announcement.

closes #3020

@chayim chayim added the maintenance Maintenance (CI, Releases, etc) label Oct 5, 2023
@chayim
Copy link
Contributor Author

chayim commented Oct 5, 2023

MagicStack/uvloop#567 is a precursor

@adamantike
Copy link

Today, uvloop released version 0.18.0, with support for Python 3.12, in case you want to retrigger the CI!

@chayim chayim requested a review from dvora-h October 18, 2023 13:08
@foarsitter
Copy link

Any news on this PR?

@chayim
Copy link
Contributor Author

chayim commented Jan 1, 2024

Folks, I straight up forgot about this. We're getting it into the 5.1 beta with the removal of Python 3.7 too. @dvora-h leaving this with you.

@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4a66c1e) 92.05% compared to head (e6487ed) 92.05%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2979      +/-   ##
==========================================
- Coverage   92.05%   92.05%   -0.01%     
==========================================
  Files         128      128              
  Lines       33195    33199       +4     
==========================================
+ Hits        30558    30560       +2     
- Misses       2637     2639       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

tests/test_connect.py Fixed Show fixed Hide fixed
@chayim
Copy link
Contributor Author

chayim commented Jan 10, 2024

@adamantike thanks, used that.. but have an SSL context issue within the asyncio side. Are you familiar with this at all?

tests/test_connect.py Fixed Show fixed Hide fixed
@chayim
Copy link
Contributor Author

chayim commented Jan 10, 2024

Part of redis/hiredis-py#167

@branchvincent
Copy link

fyi, 3.12 also removes distutils so this import will need to be replaced

from distutils.util import strtobool

tests/test_connect.py Dismissed Show dismissed Hide dismissed
@gerzse gerzse requested a review from vladvildanov July 4, 2024 15:02
@gerzse gerzse merged commit d1b4191 into master Jul 11, 2024
55 checks passed
@gerzse gerzse deleted the ckpy312 branch July 11, 2024 10:34
agnesnatasya pushed a commit to agnesnatasya/redis-py that referenced this pull request Jul 20, 2024
Add support for Python 3.12. This required a bunch of changes all
over the place, listed below in a random order.

Fix tests, especially around SSL connections.

Stop requiring typing-extensions.

Enable tracemalloc for tests, and add the possibility to run the tests
with profiling enabled. Fix some issues identified by tracemalloc, like
sockets not being closed in case of SSL handshake failures.

Remove the CI test reporting plugin, it does not work easily with forked
repos anyway.

Fix checking of module versions, make the comparison accurate. Not
sure how it worked before, but it looks like it did not match exactly
the format in the server INFO response, i.e. MMmmPP.

Remove loggers from tests, it's just noise in the output. If we don't use
asserts, nobody will check the log output from CI.

Speed up the computation for slots when initializing a cluster. After
profiling, this turned out to be very slow, when it does not have to be.
It does not make sense to recompute the same thing over and over
in a loop.

Run uvloop tests in matrix, i.e. don't bundle two tests executions
(without uvloop and with it) in the same job. Easier to spot failures
like this, and arguably the jobs can be scheduled in parallel so the 
overall execution is faster.

Unlock urllib version, to be able to use more recent pytest versions.

---------

Co-authored-by: Gabriel Erzse <[email protected]>
vladvildanov pushed a commit that referenced this pull request Sep 27, 2024
Add support for Python 3.12. This required a bunch of changes all
over the place, listed below in a random order.

Fix tests, especially around SSL connections.

Stop requiring typing-extensions.

Enable tracemalloc for tests, and add the possibility to run the tests
with profiling enabled. Fix some issues identified by tracemalloc, like
sockets not being closed in case of SSL handshake failures.

Remove the CI test reporting plugin, it does not work easily with forked
repos anyway.

Fix checking of module versions, make the comparison accurate. Not
sure how it worked before, but it looks like it did not match exactly
the format in the server INFO response, i.e. MMmmPP.

Remove loggers from tests, it's just noise in the output. If we don't use
asserts, nobody will check the log output from CI.

Speed up the computation for slots when initializing a cluster. After
profiling, this turned out to be very slow, when it does not have to be.
It does not make sense to recompute the same thing over and over
in a loop.

Run uvloop tests in matrix, i.e. don't bundle two tests executions
(without uvloop and with it) in the same job. Easier to spot failures
like this, and arguably the jobs can be scheduled in parallel so the 
overall execution is faster.

Unlock urllib version, to be able to use more recent pytest versions.

---------

Co-authored-by: Gabriel Erzse <[email protected]>
vladvildanov pushed a commit that referenced this pull request Sep 27, 2024
Add support for Python 3.12. This required a bunch of changes all
over the place, listed below in a random order.

Fix tests, especially around SSL connections.

Stop requiring typing-extensions.

Enable tracemalloc for tests, and add the possibility to run the tests
with profiling enabled. Fix some issues identified by tracemalloc, like
sockets not being closed in case of SSL handshake failures.

Remove the CI test reporting plugin, it does not work easily with forked
repos anyway.

Fix checking of module versions, make the comparison accurate. Not
sure how it worked before, but it looks like it did not match exactly
the format in the server INFO response, i.e. MMmmPP.

Remove loggers from tests, it's just noise in the output. If we don't use
asserts, nobody will check the log output from CI.

Speed up the computation for slots when initializing a cluster. After
profiling, this turned out to be very slow, when it does not have to be.
It does not make sense to recompute the same thing over and over
in a loop.

Run uvloop tests in matrix, i.e. don't bundle two tests executions
(without uvloop and with it) in the same job. Easier to spot failures
like this, and arguably the jobs can be scheduled in parallel so the 
overall execution is faster.

Unlock urllib version, to be able to use more recent pytest versions.

---------

Co-authored-by: Gabriel Erzse <[email protected]>
vladvildanov pushed a commit that referenced this pull request Sep 27, 2024
Add support for Python 3.12. This required a bunch of changes all
over the place, listed below in a random order.

Fix tests, especially around SSL connections.

Stop requiring typing-extensions.

Enable tracemalloc for tests, and add the possibility to run the tests
with profiling enabled. Fix some issues identified by tracemalloc, like
sockets not being closed in case of SSL handshake failures.

Remove the CI test reporting plugin, it does not work easily with forked
repos anyway.

Fix checking of module versions, make the comparison accurate. Not
sure how it worked before, but it looks like it did not match exactly
the format in the server INFO response, i.e. MMmmPP.

Remove loggers from tests, it's just noise in the output. If we don't use
asserts, nobody will check the log output from CI.

Speed up the computation for slots when initializing a cluster. After
profiling, this turned out to be very slow, when it does not have to be.
It does not make sense to recompute the same thing over and over
in a loop.

Run uvloop tests in matrix, i.e. don't bundle two tests executions
(without uvloop and with it) in the same job. Easier to spot failures
like this, and arguably the jobs can be scheduled in parallel so the 
overall execution is faster.

Unlock urllib version, to be able to use more recent pytest versions.

---------

Co-authored-by: Gabriel Erzse <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance (CI, Releases, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retire wrap_socket from ssl and tests
7 participants