Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 17 additions & 26 deletions global-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ aiomysql # MIT License
aiosqlite # MIT License
alembic!=1.2.0,!=1.6.3 # MIT
amqp!=2.1.4,!=5.0.4 # BSD
appdirs # MIT License
anycrc # Zlib
apscheduler # MIT License
autobahn # MIT License
automaton # Apache-2.0
Expand All @@ -24,11 +24,8 @@ bcrypt # Apache-2.0
beautifulsoup4 # MIT
betamax # Apache-2.0
boto # MIT
# Capped until https://bugs.launchpad.net/glance/+bug/2121144 is resolved
boto3<1.36 # Apache-2.0
botocore<1.36 # Apache-2.0
# indirect from boto3/botocore
s3transfer<0.11 # Apache-2.0
boto3 # Apache-2.0
botocore # Apache-2.0
cachetools # MIT License
cassandra-driver!=3.6.0 # Apache-2.0
cffi # MIT
Expand Down Expand Up @@ -92,6 +89,7 @@ jsonschema # MIT
kazoo # Apache-2.0
kombu!=4.0.2 # BSD
kubernetes # Apache-2.0
ldappool # MPL
libsass # MIT
libvirt-python!=4.1.0,!=4.2.0 # LGPLv2+
lxml!=3.7.0 # BSD
Expand All @@ -109,21 +107,22 @@ opentelemetry-exporter-otlp-proto-grpc # Apache-2.0
opentelemetry-exporter-otlp-proto-http # Apache-2.0
opentelemetry-sdk # Apache-2.0
ovs # Apache-2.0
ovsdbapp # Apache-2.0
packaging!=20.5,!=20.6,!=20.7 # Apache-2.0
paramiko!=2.9.0,!=2.9.1 # LGPLv2.1+
passlib # BSD
Paste # MIT
PasteDeploy # MIT
pecan!=1.0.2,!=1.0.3,!=1.0.4,!=1.2,!=1.4.0 # BSD
pexpect!=3.3 # ISC License
pika # BSD
Pillow # PIL License
Pint # BSD
platformdirs # MIT License
PrettyTable!=3.4.0 # BSD
prometheus-client # Apache-2.0
protobuf # BSD License (3 clause)
psutil # BSD
psycopg2 # LGPL/ZPL
pyasn1!=0.2.3 # BSD
pyasn1-modules # BSD
pycadf!=2.0.0 # Apache-2.0
Expand All @@ -150,11 +149,13 @@ pytz # MIT
pyudev # LGPLv2.1+
PyYAML # MIT
pyzabbix # LGPL
pyzmq # LGPL+BSD
qrcode # BSD
rbd-iscsi-client # Apache-2.0
redis!=4.0.0 # MIT
requests!=2.20.0,!=2.24.0 # Apache-2.0
requests-kerberos # ISC
requestsexceptions # Apache-2.0
retrying!=1.3.0 # Apache-2.0
rfc3986 # Apache-2.0
Routes # MIT
rtslib-fb # Apache-2.0
Expand All @@ -165,21 +166,27 @@ scipy # BSD
semantic-version # BSD
setproctitle # BSD
SQLAlchemy # MIT
SQLAlchemy-Utils # BSD License
sshtunnel # MIT
statsd # MIT
suds-community # LGPLv3+
sushy!=1.9.0 # Apache-2.0
sympy # BSD
systemd-python # LGPLv2+
sysv-ipc # BSD License
tabulate # MIT
tenacity # Apache-2.0
uhashring # BSD
urllib3 # MIT
valkey # MIT
voluptuous # BSD License
warlock # Apache-2.0
WebOb # MIT
websocket-client # LGPLv2+
websockify # LGPLv3
Werkzeug!=2.2.0 # BSD License
wrapt # BSD License
xattr;sys_platform!='win32' # MIT
xmltodict # MIT
XStatic # MIT License
XStatic-Angular # MIT License
XStatic-Angular-Bootstrap # MIT License
Expand Down Expand Up @@ -232,7 +239,6 @@ freezegun # Apache-2.0
# NOTE(tkajinam): block 2.5.0 because of https://github.com/cdent/gabbi/issues/309
gabbi!=2.5.0 # Apache-2.0
keyring # MIT/PSF
ldappool # MPL
# Do not make mock conditional on Python version: we depend on newer code than
# in [most] releases of the Python std library.
# https://github.com/testing-cabal/mock/issues/487 for 4.0.[0-1] denylist
Expand All @@ -243,44 +249,32 @@ nodeenv # BSD
openstack-doc-tools # Apache-2.0
os-testr # Apache-2.0
oslotest # Apache-2.0
ovsdbapp # Apache-2.0
pifpaf # Apache-2.0
playwright # Apache-2.0
psycopg2 # LGPL/ZPL
psycopg2-binary # LGPL/ZPL
py-consul # MIT License
pytest # MIT
pytest-cov # MIT
pytest-django # BSD (3 clause)
pytest-html #MPL-2.0
pytest-subtests # MIT
pytest-xdist # MIT
python-subunit # Apache-2.0/BSD
pyzmq # LGPL+BSD
redis!=4.0.0 # MIT
requests-mock # Apache-2.0
respx # BSD-3-Clause
retrying!=1.3.0 # Apache-2.0
sadisplay # BSD
selenium # Apache-2.0
stestr!=2.3.0,!=3.0.0 # Apache-2.0
sushy!=1.9.0 # Apache-2.0
tabulate # MIT
tenacity # Apache-2.0
testrepository # Apache-2.0/BSD
testresources # Apache-2.0/BSD
testscenarios # Apache-2.0/BSD
testtools # MIT
typing-extensions # PSF
tzdata # MIT
valkey # MIT
virtualbmc # Apache-2.0
virtualenv!=16.3.0 # MIT
WebTest # MIT
Werkzeug!=2.2.0 # BSD License
whereto # Apache-2.0
wrapt # BSD License
wsgi-intercept # MIT License
xmltodict # MIT
xvfbwrapper #license: MIT

## section:docs
Expand Down Expand Up @@ -352,7 +346,6 @@ os-resource-classes # Apache-2.0
os-service-types # Apache-2.0
os-traits # Apache-2.0
os-vif!=1.8.0,!=1.12.0,!=3.0.0 # Apache-2.0
os-win # Apache-2.0
osc-lib # Apache-2.0
osc-placement # Apache-2.0
oslo.cache!=1.31.1,!=2.1.0 # Apache-2.0
Expand Down Expand Up @@ -486,8 +479,6 @@ wheel # MIT

jsonpath-rw # Apache-2.0
jsonpath-rw-ext # Apache-2.0
py-consul # MIT License
python-consul2 # MIT License
simplejson # MIT
six # MIT
zake # Apache-2.0
10 changes: 6 additions & 4 deletions openstack_requirements/cmds/check_exists.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.

"""Check to see if a package from a project's requrements file exist in g-r or
u-c.
"""Check for a package dependency.

Check to see if a package from a project's dependencies exists in g-r or u-c.
"""

import argparse
Expand All @@ -28,7 +28,9 @@
def main(args=None):
parser = argparse.ArgumentParser()
parser.add_argument(
'project', default='', help='path to the project source root folder.'
'project',
default='',
help='path to the project source root folder.',
)
parser.add_argument(
'-u',
Expand Down Expand Up @@ -115,7 +117,7 @@ def main(args=None):
print(
f'Specifier {spec.version} from {name} is '
f'failing check from global-requirements '
f'specifiers {str(spec_gr)}'
f'specifiers {spec_gr!s}'
)
error_count += 1
continue
Expand Down
2 changes: 1 addition & 1 deletion openstack_requirements/cmds/edit_constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def main(argv=None, stdout=None):
if stdout is None:
stdout = sys.stdout
_validate_options(options, args)
args = args + [""]
args = [*args, ""]
content = open(args[0]).read()
reqs = requirement.parse(content, permit_urls=True)
out_reqs = edit(reqs, args[1], args[2])
Expand Down
10 changes: 4 additions & 6 deletions openstack_requirements/cmds/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _freeze(requirements, python):
b'\n'.join(output).decode('utf-8'),
exc,
)
)
) from exc
finally:
# log job results
with tempfile.NamedTemporaryFile(
Expand Down Expand Up @@ -162,7 +162,7 @@ def _combine_freezes(freezes, denylist=None):
# version ranges for these
for idx, (version, py_versions) in enumerate(
sorted(versions.items())
): # noqa: E501
):
if idx == 0: # lower-bound
marker = f"python_version<='{py_versions[-1]}'"
elif idx + 1 != len(versions): # intermediate version(s)
Expand All @@ -174,9 +174,7 @@ def _combine_freezes(freezes, denylist=None):
elif list(versions.values())[0] != reference_versions:
# markers for packages with a single version - these are usually
# version specific so we use strict python versions for these
for idx, (version, py_versions) in enumerate(
sorted(versions.items())
): # noqa: E501
for version, py_versions in sorted(versions.items()):
for py_version in sorted(py_versions):
marker = f"python_version=='{py_version}'"
yield f'{package}==={version};{marker}\n'
Expand Down Expand Up @@ -294,7 +292,7 @@ def main(argv=None, stdout=None):
'installed'
),
)
options, args = parser.parse_args(argv)
options, _ = parser.parse_args(argv)
if stdout is None:
stdout = sys.stdout
_validate_options(options)
Expand Down
3 changes: 1 addition & 2 deletions openstack_requirements/project_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
import requests
import yaml


ZUUL_PROJECTS_URL = 'https://git.openstack.org/cgit/openstack-infra/project-config/plain/zuul.d/projects.yaml' # noqa
ZUUL_PROJECTS_URL = 'https://git.openstack.org/cgit/openstack-infra/project-config/plain/zuul.d/projects.yaml'
ZUUL_PROJECTS_FILENAME = 'openstack-infra/project-config/zuul.d/projects.yaml'


Expand Down
6 changes: 3 additions & 3 deletions playbooks/files/project-requirements-change.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
import sys
import tempfile

from openstack_requirements import check # noqa
from openstack_requirements import project # noqa
from openstack_requirements import requirement # noqa
from openstack_requirements import check
from openstack_requirements import project
from openstack_requirements import requirement


def run_command(cmd):
Expand Down
4 changes: 1 addition & 3 deletions projects.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
openstack/hacking
openstack/pbr
openstack/requestsexceptions
openstack/shade
openstack/ansible-config_template
openstack/ansible-hardening
Expand All @@ -17,6 +16,7 @@ openstack/castellan
openstack/cinder
openstack/cinder-tempest-plugin
openstack/cliff
openstack/cursive
openstack/debtcollector
openstack/designate
openstack/designate-dashboard
Expand All @@ -39,7 +39,6 @@ openstack/heat-translator
openstack/horizon
openstack/i18n
openstack/ironic
openstack/ironic-inspector
openstack/ironic-python-agent
openstack/ironic-tempest-plugin
openstack/ironic-ui
Expand Down Expand Up @@ -173,7 +172,6 @@ openstack/python-designateclient
openstack/python-freezerclient
openstack/python-glanceclient
openstack/python-heatclient
openstack/python-ironic-inspector-client
openstack/python-ironicclient
openstack/python-keystoneclient
openstack/python-magnumclient
Expand Down
14 changes: 10 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,14 @@ quote-style = "preserve"
docstring-code-format = true

[tool.ruff.lint]
select = ["E", "F", "UP"]
select = ["B", "E", "F", "RUF", "UP"]
ignore = [
# next(iter(x)) is harder to read than list(x)[0]
"RUF015",
]

# [tool.ruff.lint.per-file-ignores]
# "openstack/tests/*" = ["S"]
# "examples/*" = ["S"]
[tool.ruff.lint.per-file-ignores]
"openstack_requirements/tests/*" = [
# don't want to annotate testscenarios scenarios
"RUF012"
]
Loading