-
Notifications
You must be signed in to change notification settings - Fork 388
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
Migrate to declarative Python package config #767
Open
deronnax
wants to merge
1
commit into
kevin1024:master
Choose a base branch
from
deronnax:declarative-package-config
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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 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 |
---|---|---|
|
@@ -26,3 +26,82 @@ target-version = "py38" | |
|
||
[tool.ruff.isort] | ||
known-first-party = ["vcr"] | ||
|
||
[build-system] | ||
requires = ["setuptools>=61.2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "vcrpy" | ||
version = "5.1.0" | ||
authors = [{name = "Kevin McCarthy", email = "[email protected]"}] | ||
license = {text = "MIT"} | ||
description = "Automatically mock your HTTP interactions to simplify and speed up testing" | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"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 :: Only", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Topic :: Software Development :: Testing", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"License :: OSI Approved :: MIT License", | ||
] | ||
urls = {Homepage = "https://github.com/kevin1024/vcrpy"} | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"PyYAML", | ||
"wrapt", | ||
"yarl", | ||
# Support for urllib3 >=2 needs CPython >=3.10 | ||
# so we need to block urllib3 >=2 for Python <3.10 and PyPy for now. | ||
# Note that vcrpy would work fine without any urllib3 around, | ||
# so this block and the dependency can be dropped at some point | ||
# in the future. For more Details: | ||
# https://github.com/kevin1024/vcrpy/pull/699#issuecomment-1551439663 | ||
"urllib3 <2; python_version <'3.10'", | ||
# https://github.com/kevin1024/vcrpy/pull/775#issuecomment-1847849962 | ||
"urllib3 <2; platform_python_implementation =='PyPy'", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't speak for the package, but if this gets wind in the sails now and gets merged, there's a third case for urllib3 added to |
||
] | ||
|
||
[project.readme] | ||
file = "README.rst" | ||
content-type = "text/x-rst" | ||
|
||
[project.optional-dependencies] | ||
testing = [ | ||
"aiohttp", | ||
"boto3", | ||
"httplib2", | ||
"httpx", | ||
"pytest", | ||
"pytest-aiohttp", | ||
"pytest-httpbin", | ||
"requests>=2.16.2", | ||
"tornado", | ||
# Needed to un-break httpbin 0.7.0. For httpbin >=0.7.1 and after, | ||
# this pin and the dependency itself can be removed, provided | ||
# that the related bug in httpbin has been fixed: | ||
# https://github.com/kevin1024/vcrpy/issues/645#issuecomment-1562489489 | ||
# https://github.com/postmanlabs/httpbin/issues/673 | ||
# https://github.com/postmanlabs/httpbin/pull/674 | ||
"Werkzeug==2.0.3", | ||
] | ||
|
||
[tool.distutils.bdist_wheel] | ||
universal = 1 | ||
|
||
[tool.setuptools] | ||
include-package-data = false | ||
|
||
[tool.setuptools.packages.find] | ||
exclude = ["tests*"] | ||
namespaces = false |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what I don't like about this approach, is that it does not attempt to lock. If the non-locking is to preserve some old use-cases for python 3.8, then I suggest making those explicit.
This wild west, "go grab whatever versions of these packages!" is what caused the most breakages, and uncertainty, because it's harder for a dependency resolver to pick the right thing for all the packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LewisCowlesMotive that's likely a misunderstanding:
pyproject.toml
is meant to not lock, to be compatible and play well with the neighbors in a pot of multiple Python packages: a virtualenv, a Linux distro, Homebrew etc. Else you quickly have packages that can no longer be installed side by side. The place to lock isrequirements.txt
or something similar for a single deployment, not a package ecosystem.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if you are misinterpreting my request to have version constraints as asking to make pyproject.toml a lock-file.
It's the lack of any version information I am complaining about to be clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave this PR to migrate the config as is without changes, we can have a follow up PR to change the config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the benefits of the PR? It declares the same things as the imperative code. Is that the benefit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes