-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Switch to PEP 517 packaging using hatchling #2930
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
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6ec837b
Switch to PEP 517 packaging using hatchling
akx 8e467b7
Use a single source of truth for version info
akx 7327e73
Uninstall redis wheel installed as redis-entraid dep
akx 9cb7ac4
Add build as dev_requirement
akx 34bedf9
Get rid of requirements.txt
akx 66f344c
Get rid of setuptools and wheel deps
akx ec06358
Move pytest configuration to pyproject.toml
akx a025277
Retain tests and dev_requirements.txt in sdist
akx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: pypa/[email protected] | ||
with: | ||
inputs: requirements.txt dev_requirements.txt | ||
inputs: dev_requirements.txt | ||
ignore-vulns: | | ||
GHSA-w596-4wvx-j9j6 # subversion related git pull, dependency for pytest. There is no impact here. | ||
|
||
|
@@ -54,6 +54,7 @@ jobs: | |
- name: run code linters | ||
run: | | ||
pip install -r dev_requirements.txt | ||
pip uninstall -y redis # uninstall Redis package installed via redis-entraid | ||
invoke linters | ||
|
||
redis_version: | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "redis" | ||
dynamic = ["version"] | ||
description = "Python client for Redis database and key-value store" | ||
readme = "README.md" | ||
license = "MIT" | ||
requires-python = ">=3.8" | ||
authors = [ | ||
{ name = "Redis Inc.", email = "[email protected]" }, | ||
] | ||
keywords = [ | ||
"Redis", | ||
"database", | ||
"key-value-store", | ||
] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
dependencies = [ | ||
'async-timeout>=4.0.3; python_full_version<"3.11.3"', | ||
petyaslavova marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"PyJWT~=2.9.0", | ||
] | ||
|
||
[project.optional-dependencies] | ||
hiredis = [ | ||
"hiredis>=3.0.0", | ||
] | ||
ocsp = [ | ||
"cryptography>=36.0.1", | ||
"pyopenssl==20.0.1", | ||
"requests>=2.31.0", | ||
] | ||
|
||
[project.urls] | ||
Changes = "https://github.com/redis/redis-py/releases" | ||
Code = "https://github.com/redis/redis-py" | ||
Documentation = "https://redis.readthedocs.io/en/latest/" | ||
Homepage = "https://github.com/redis/redis-py" | ||
"Issue tracker" = "https://github.com/redis/redis-py/issues" | ||
|
||
[tool.hatch.version] | ||
path = "redis/__init__.py" | ||
|
||
[tool.hatch.build.targets.sdist] | ||
include = [ | ||
petyaslavova marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"/redis", | ||
"/tests", | ||
"dev_requirements.txt", | ||
] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
include = [ | ||
"/redis", | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "-s" | ||
markers = [ | ||
"redismod: run only the redis module tests", | ||
"graph: run only the redisgraph tests", | ||
"pipeline: pipeline tests", | ||
"onlycluster: marks tests to be run only with cluster mode redis", | ||
"onlynoncluster: marks tests to be run only with standalone redis", | ||
"ssl: marker for only the ssl tests", | ||
"asyncio: marker for async tests", | ||
"replica: replica tests", | ||
"experimental: run only experimental tests", | ||
"cp_integration: credential provider integration tests", | ||
] | ||
asyncio_mode = "auto" | ||
timeout = 30 | ||
filterwarnings = [ | ||
"always", | ||
"ignore:RedisGraph support is deprecated as of Redis Stack 7.2:DeprecationWarning", | ||
# Ignore a coverage warning when COVERAGE_CORE=sysmon for Pythons < 3.12. | ||
"ignore:sys.monitoring isn't available:coverage.exceptions.CoverageWarning", | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.