Commit e510d39
authored
simplify python requirements (#261)
i was inspired to do this while working on #245
specifying both project.requires-python and tool.poetry.dependencies.python comes from #242 where we wanted to specify requires-python to get nice features from the PR description like:
> - Removed the version specific classifiers. Those are added by poetry-core automatically based on `requires-python`.
> - Removed `tool.black.target-version` since black is able to infer the value from `project.requires-python`.
the [initial version of that PR](b366342) removed both tool.poetry.dependencies.python and the upper bound on the python version. ohemorange correctly noted [here](#242 (comment)) that we need the upper bound on the python version for poetry's locking algorithm. this was fixed by following the suggestion from poetry's docs of specifying the python version in both places using slightly different values
poetry's docs make this recommendation for folks who want to avoid to avoid specifying an upper bound in their package's metadata, but i don't think that's something we need to do. as you can see by the metadata diff from the [PR description](#242 (comment)), we previously were defining an upper bound:
> ```diff
> ...
> -License: Apache-2.0
> +License-Expression: Apache-2.0
> License-File: LICENSE.txt
> ...
> -Requires-Python: >=3.9.2,<4.0
> +Requires-Python: >=3.9.2
> ...
> -Classifier: License :: OSI Approved :: Apache Software License
> ...
> ```
to my knowledge, no one ever complained. not only does that approach duplicate information that we need to keep in sync, but project.requires-python and tool.poetry.dependencies.python take slightly different syntax with the ^3.10 [caret requirement](https://python-poetry.org/docs/dependency-specification/#caret-requirements) suggested in the comment above project.requires-python not being a valid value there
because of these downsides, this PR takes a slightly different approach and unifies everything in one place to hopefully make things a little simpler and cleaner for us1 parent 29bb4cb commit e510d39
2 files changed
+3
-7
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
| 18 | + | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
| |||
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
46 | | - | |
47 | | - | |
48 | 44 | | |
49 | 45 | | |
50 | 46 | | |
| |||
0 commit comments