redis-py icon indicating copy to clipboard operation
redis-py copied to clipboard

Switch to PEP 517 packaging using hatchling

Open akx opened this issue 2 years ago • 5 comments

Pull Request check-list

Please make sure to review and check all of these items:

  • [ ] Do tests pass?
  • [ ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • [ ] Is the new or changed code fully tested?
  • [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [ ] Is there an example added to the examples folder (if applicable)?
  • [ ] Was the change added to CHANGES file?

Description of change

  • Refs #1316
  • Refs #1649
  • ♻️ Remake of #2388, a year later *❗Contains dependency changes from #2928

Quoting the description from #2388, a year later...

This PR shifts redis-py from legacy setup.py packaging to PEP 517 compliant packaging using hatchling from PyPA.

Essentially, this does what was discussed in #1658 but with the increasingly standard hatchling tool instead of poetry's idiosyncracies.

As with #2388, python -m build does create a working wheel with all modules included.

akx avatar Sep 04 '23 10:09 akx

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (2f88840) 91.84% compared to head (835daaa) 91.84%. Report is 5 commits behind head on master.

Files Patch % Lines
redis/asyncio/connection.py 83.33% 1 Missing :warning:

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2930      +/-   ##
==========================================
- Coverage   91.84%   91.84%   -0.01%     
==========================================
  Files         128      127       -1     
  Lines       33232    33270      +38     
==========================================
+ Hits        30523    30557      +34     
- Misses       2709     2713       +4     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Feb 15 '24 12:02 codecov-commenter

Rebased.

akx avatar Jun 12 '24 06:06 akx

Rebased. Cc @gerzse @vladvildanov.

akx avatar Aug 27 '24 09:08 akx

@akx Thanks for your contribution! I'll review this PR in near time

vladvildanov avatar Sep 02 '24 11:09 vladvildanov

@vladvildanov Good to hear. Rebased once again.

akx avatar Oct 16 '24 05:10 akx

@vladvildanov Rebased. I'll fix the tests if there's any interest in this.

akx avatar Feb 20 '25 10:02 akx

Could you add "closes https://github.com/redis/redis-py/issues/3463 "?

woutdenolf avatar Feb 20 '25 12:02 woutdenolf

Btw: the tests failing in

FAILED tests/test_asyncio/test_commands.py::TestRedisCommands::test_client_setinfo[single] - AssertionError: assert '5.3.0b5' == '5.2.1'
    
    - 5.2.1
    + 5.3.0b5

is very curious – given the string "5.3.0b5" does not appear in the source here at all, it almost looks like the CI pipeline is installing an entirely different version of the package...

and indeed:

  Downloading redis-5.3.0b5-py3-none-any.whl (271 kB)

IOW, the CI pipeline seems to be confused about which libraries it's using...

akx avatar Feb 21 '25 06:02 akx

Thanks for getting this finally merged!

1 year, 5 months 3 weeks – could easily be a personal record for PR perseverance for me.

akx avatar Feb 25 '25 11:02 akx

@akx Thanks for your efforts, I'm so sorry that It took so long from our side

vladvildanov avatar Feb 25 '25 13:02 vladvildanov