-
-
Notifications
You must be signed in to change notification settings - Fork 777
Inform pants about 3rd party dependencies and constraints #5789
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
Changes from all commits
971fa1e
06db521
b790022
8c174ae
4ba4cc9
702dd95
fb2bd1d
3fcd0cb
fefc94d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| python_requirement( | ||
| name="winrm", | ||
| requirements=["pywinrm"], | ||
| # modules can be removed once pants is released with | ||
| # https://github.com/pantsbuild/pants/pull/17390 | ||
| modules=["winrm"], | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| # Add/remove version constraints for transitive dependencies in this file | ||
| # (transitive dependencies are dependencies of our direct dependencies). | ||
| # | ||
| # Direct dependencies should be recorded in `requirements-pants.txt`, not here. | ||
|
|
||
| # please document each version constraint as follows: | ||
| # | ||
| # REQUIRED BY: <package>, <package>, ... | ||
| # REASON: <why do we need to constrain this transitive dep?> | ||
| # NOTE: <status of this constraint / when can we remove it?> | ||
| # DROPS RESOLVED VERSION: <which version pip resolved without this constraint> | ||
| #<package><version constraint> | ||
|
|
||
| # ############################################ # | ||
| # pinned transitive deps from requirements.txt # | ||
| # ############################################ # | ||
|
|
||
| # REQUIRED BY: jinja2 | ||
| # REASON: Fix MarkupSafe to < 2.1.0 as 2.1.0 removes soft_unicode >=0.23 was from jinja2 | ||
| # NOTE: try to remove constraint later. | ||
| # DROPS RESOLVED VERSION: unknown | ||
| MarkupSafe<2.1.0,>=0.23 | ||
|
Contributor
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'm a bit confused by this file. The only requirement that doesn't seem to be commented out is MarkupSafe.
Member
Author
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. Because I'm not sure if they're still valid. With The same thing applies with As we enable other tools like pylint, we'll get additional feedback about whether or not we need some of these constraints. And, after we have the lockfile, we can start "exporting" a virtualenv with pants. That way we can run all of our tests using a virtualenv generated by the lockfile which will tell us if there are any functional issues where we still need these constraints. Does that make sense? I suppose we could also uncomment all of these constraints, and then comment one or more of them, if needed, to generate the lockfile.
Member
Author
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. Another issue with our current approach vs using the pants+pex lockfile: generating the lockfile does not support the legacy pip resolver. Our current set of "pinned" dependencies does not work with the newer resolver (which is why we have a really old version of pip pinned), so we need to loosen our requirements to give the resolver room to figure out which versions are actually compatible. I have successfully tested generating the lockfile with the requirements+constraints in this PR. I will try uncommenting the rest of these transitive dep constraints and see if that still resolves.
Member
Author
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. OK. I uncommented many of the constraints and I can still generate the lockfile. I left only a few commented. I really hope we can just delete all of these constraints, hopefully sooner rather than later.
Member
Author
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 just tried to cleanup / standardize the documentation of all of these constraints. @amanda11 does that help?
Contributor
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. Thanks for the answers. I seem to remember there being some problems going up further on the pip version - but that maybe resolved. But if we do end up upping the pip version might need to find the old PR from when I last upped the version - as I seem to recall having to downgrade it. |
||
|
|
||
| # REQUIRED BY: kombu | ||
| # REASON: unknown -- this looks like a lockfile-style pin | ||
| # NOTE: try to remove constraint later. | ||
| # DROPS RESOLVED VERSION: 5.1.1 | ||
| amqp==5.0.6 | ||
|
|
||
| # REQUIRED BY: cryptography, paramiko, passlib | ||
| # REASON: unknown -- this looks like a lockfile-style pin | ||
| # NOTE: try to remove constraint later. | ||
| # DROPS RESOLVED VERSION: 4.0.1 | ||
| bcrypt==3.2.0 | ||
|
|
||
| # REQUIRED BY: bcrypt, cryptography, pynacl, zstandard | ||
| # REASON: unknown | ||
| # NOTE: try to remove constraint later. | ||
| # DROPS RESOLVED VERSION: 1.15.1 | ||
| cffi<1.15.0 | ||
|
|
||
| # REQUIRED BY: orquesta, prance, requests | ||
| # REASON: requests 2.23 requires chardet < 3.1.0 | ||
| # NOTE: orquesta already constrains this, so this is just documentation. | ||
| # DROPS RESOLVED VERSION: 3.0.4 | ||
| #chardet<3.1.0 | ||
|
|
||
| # REQUIRED BY: jsonpath-rw, networkx | ||
| # REASON: | ||
| # networkx requires decorator>=4.3,<5 which should resolve to version 4.4.2 | ||
| # but the wheel on pypi does not say it supports python3.8, so pip gets | ||
| # confused. For now, pin decorator to work around pip's confusion. | ||
| # NOTE: Since pants/pex use a newer version of pip, this is not an issue. | ||
| # DROPS RESOLVED VERSION: 4.4.2 | ||
| #decorator==4.4.2 | ||
|
|
||
| # REQUIRED BY: eventlet, pymongo | ||
| # REASON: 2.0 version breaks pymongo work with hosts | ||
| # NOTE: try to remove this later | ||
| # DROPS RESOLVED VERSION: 1.16 | ||
| dnspython>=1.16.0,<2.0.0 | ||
|
|
||
| # REQUIRED BY: eventlet | ||
| # REASON: unknown -- this looks like a lockfile-style pin | ||
| # NOTE: We are having a hard time upgrading eventlet, so this pin is commented | ||
| # out to see if that will help. If any tests fail, uncomment this. | ||
| # DROPS RESOLVED VERSION: 1.1.3.post0 | ||
| #greenlet==1.0.0 | ||
|
|
||
| # REQUIRED BY: argcomplete, click, debtcollector, kombu, pluggy, prettytable, | ||
| # pytest, virtualenv | ||
| # REASON: unknown | ||
| # NOTE: This pinned version (3.10.1) actually conflicts with other requirements. | ||
| # So, it is commented out. If there are issues with newer versions, | ||
| # update this with a range of valid versions. | ||
| # DROPS RESOLVED VERSION: 4.8.3 | ||
| #importlib-metadata==3.10.1 | ||
|
|
||
| # REQUIRED BY: tooz | ||
| # REASON: unknown | ||
| # NOTE: try to remove constraint later. | ||
| # DROPS RESOLVED VERSION: 4.13 | ||
| oslo.utils<5.0,>=4.0.0 | ||
|
|
||
| # REQUIRED BY: tooz | ||
| # REASON: unknown | ||
| # NOTE: try to remove constraint later. | ||
| # DROPS RESOLVED VERSION: 8.1 | ||
| tenacity>=3.2.1,<7.0.0 | ||
|
|
||
| # REQUIRED BY: st2-auth-backend-flat-file | ||
| # REASON: unknown -- this looks like a lockfile-style pin | ||
| # NOTE: st2-auth-backend-flat-file has a version range >=1.7.1,<1.8.0 | ||
| # If we need to narrow that range, we should do so in: | ||
| # https://github.com/StackStorm/st2-auth-backend-flat-file/blob/master/requirements.txt | ||
| # DROPS RESOLVED VERSION: 1.7.4 | ||
| #passlib==1.7.4 | ||
|
|
||
| # pyOpenSSL required by: pymongo[ocsp], redis[ocsp], urllib3[secure] | ||
| # but we don't use any of those, so skip copying from fixed-requirements.txt | ||
|
|
||
| # REQUIRED BY: httplib2, oslo.utils, packaging | ||
| # REASON: unknown -- It looks like <3 was only needed for python2 compatibility. | ||
| # NOTE: this is still here, commented, until we can validate that all test are | ||
| # passing without it. | ||
| # DROPS RESOLVED VERSION: 3.0.7 | ||
| #pyparsing<3 | ||
|
|
||
| # REQUIRED BY: async-timeout, gitpython, importlib-metadata, redis | ||
| # REASON: importlib-metadata requires typing-extensions but v4.2.0 requires py3.7+ | ||
| # NOTE: try to remove constraint later. | ||
| # DROPS RESOLVED VERSION: 4.1.1 | ||
| typing-extensions<4.2 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # Add/remove direct 3rd party dependencies here, with version constraints if necessary. | ||
| # | ||
| # Please do not add transitive dependencies in this file (ie dependencies of our dependencies). | ||
| # Use `lockfiles/st2-constraints.txt` to constrain the version of these transitive dependencies. | ||
| # | ||
| # Please keep this list alphabetical, with tooz backends in a separate list. | ||
|
|
||
| apscheduler | ||
| argcomplete | ||
| ciso8601 | ||
| cryptography | ||
| # eventlet 0.31+ and gunicorn 20.1.0 are not compatible | ||
| eventlet<0.31 | ||
| # flex parses the openapi 2 spec in our router | ||
| flex | ||
| # gitpython & gitdb are used for pack management | ||
| gitdb | ||
| gitpython | ||
| # st2common/tests/integration/test_util_green.py requires greenlet (as does eventlet) | ||
| greenlet | ||
| gunicorn | ||
| jinja2 | ||
| jsonpath-rw | ||
| jsonschema | ||
| kombu | ||
| lockfile | ||
| mock | ||
| mongoengine | ||
| # Note: networkx v2.6 dropped support for Python3.6 | ||
| # networkx version is constrained in orquesta. | ||
| networkx | ||
| orjson | ||
| orquesta @ git+https://github.com/StackStorm/[email protected] | ||
| # NOTE: Recent version substantially affect the performance and add big import time overhead | ||
| # See https://github.com/StackStorm/st2/issues/4160#issuecomment-394386433 for details | ||
| oslo.config>=1.12.1,<1.13 | ||
| paramiko | ||
| # prance is used by st2-validate-api-spec to validate the openapi spec | ||
| # prance needs flex, but do not use the extra as that gets an old version. | ||
| prance | ||
| prettytable | ||
| # For st2client: prompt-toolkit v2+ does not have prompt_toolkit.token.Token | ||
| prompt-toolkit<2 | ||
| psutil | ||
| pymongo | ||
| # pyrabbit used in an integration test | ||
| pyrabbit | ||
| pytest | ||
| python-dateutil | ||
| python-editor | ||
| # pythonjsonlogger referenced in st2actions/conf/logging.conf | ||
| python-json-logger | ||
| python-statsd | ||
| pytz | ||
| PyYAML | ||
| # RandomWords used in some tests | ||
| RandomWords | ||
| requests[security] | ||
| retrying | ||
| routes | ||
| semver | ||
| # setuptools provides pkg_resources | ||
| setuptools | ||
| simplejson | ||
| six | ||
| # NOTE: we use sseclient-py instead of sseclient because sseclient | ||
| # has various issues which sometimes hang the connection for a long time, etc. | ||
| sseclient-py | ||
| # bandit doesn't work w/ stevedore 3+ | ||
| stevedore<3 | ||
| # For backward compatibility reasons, flat file backend is installed by default | ||
| st2-auth-backend-flat-file @ git+https://github.com/StackStorm/st2-auth-backend-flat-file.git@master | ||
| st2-auth-ldap @ git+https://github.com/StackStorm/st2-auth-ldap.git@master | ||
| st2-rbac-backend @ git+https://github.com/StackStorm/st2-rbac-backend.git@master | ||
| # tabulate used by tools/log_watcher.py | ||
| tabulate | ||
| tooz | ||
| udatetime | ||
| ujson | ||
| unittest2 | ||
| virtualenv | ||
| webob | ||
| webtest | ||
| # zstandard is used for micro benchmarks | ||
| zstandard | ||
|
|
||
| # tooz backends | ||
| redis | ||
| zake | ||
|
|
||
| # was in fixed-requirements.txt, but not in requirements-pants.txt | ||
| # keyczar is used by a python2-only test. | ||
| #python-keyczar | ||
|
|
||
| ########### | ||
|
|
||
| # not needed with switch to pytest | ||
| #nose | ||
| #nose-timer | ||
| #nose-parallel | ||
| #rednose | ||
|
Comment on lines
+91
to
+101
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. Should these be deleted then?
Member
Author
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 think we should delete them once we drop the old requirements infra. We still need to keep both sets of requirements in sync until that happens, so having a note about requirements that we don't need to include is helpful. |
||
Uh oh!
There was an error while loading. Please reload this page.