Skip to content

Commit 0151ab3

Browse files
authored
Merge pull request #135 from stackhpc/upstream/master-2025-10-20
Synchronise master with upstream
2 parents 63107f2 + 01e147e commit 0151ab3

17 files changed

+67
-681
lines changed

README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55
.. image:: https://governance.openstack.org/tc/badges/requirements.svg
66
:target: https://governance.openstack.org/tc/reference/tags/index.html
77

8+
Security Warning
9+
================
10+
11+
OpenStack makes no security guarantees about third-party
12+
dependencies listed here, and does not keep track of any
13+
vulnerabilities they contain. Versions of these dependencies are
14+
frozen at each coordinated release in order to stabilize upstream
15+
testing, and can contain known vulnerabilities. Consumers are
16+
*STRONGLY* encouraged to rely on curated distributions of OpenStack
17+
or manage security patching of dependencies themselves.
18+
819
Resources and Documentation
920
===========================
1021

global-requirements.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
### WARNING: OpenStack makes no security guarantees about third-party
2+
### dependencies listed here, and does not keep track of any
3+
### vulnerabilities they contain. Versions of these dependencies are
4+
### frozen at each coordinated release in order to stabilize upstream
5+
### testing, and can contain known vulnerabilities. Consumers are
6+
### *STRONGLY* encouraged to rely on curated distributions of OpenStack
7+
### or manage security patching of dependencies themselves.
8+
19
## section:general
210

311
aiomysql # MIT License
@@ -72,7 +80,6 @@ influxdb!=5.3.0 # MIT
7280
influxdb-client # MIT
7381
infoblox-client # Apache-2.0
7482
iso8601 # MIT
75-
jaeger-client # Apache-2.0
7683
Jinja2 # BSD License (3 clause)
7784
jira # BSD License (2 clause)
7885
jmespath # MIT
@@ -81,7 +88,6 @@ jsonschema # MIT
8188
kazoo # Apache-2.0
8289
kombu!=4.0.2 # BSD
8390
kubernetes # Apache-2.0
84-
ldap3 # LGPLv3
8591
libsass # MIT
8692
libvirt-python!=4.1.0,!=4.2.0 # LGPLv2+
8793
lxml!=3.7.0 # BSD
@@ -137,7 +143,6 @@ python-ldap # PSF
137143
python-memcached # PSF
138144
pytz # MIT
139145
pyudev # LGPLv2.1+
140-
pywinrm # MIT
141146
PyYAML # MIT
142147
pyzabbix # LGPL
143148
qrcode # BSD
@@ -277,6 +282,7 @@ types-simplejson # Apache-2.0
277282
typing # PSF
278283
typing-extensions # PSF
279284
tzdata # MIT
285+
valkey # MIT
280286
virtualbmc # Apache-2.0
281287
virtualenv!=16.3.0 # MIT
282288
WebTest # MIT
@@ -329,6 +335,7 @@ ironic-lib!=4.6.0 # Apache-2.0
329335
keystoneauth1 # Apache-2.0
330336
keystonemiddleware # Apache-2.0
331337
kuryr-lib # Apache-2.0
338+
lark # MIT
332339
metalsmith # Apache-2.0
333340
microversion-parse # Apache-2.0
334341
mistral-lib # Apache-2.0
@@ -384,7 +391,7 @@ pbr!=2.1.0 # Apache-2.0
384391
sherlock # MIT
385392
stevedore!=3.0.0 # Apache-2.0
386393
tap-as-a-service # Apache-2.0
387-
taskflow # Apache-2.0
394+
taskflow!=6.0.0 # Apache-2.0
388395
tempest # Apache-2.0
389396
tooz # Apache-2.0
390397
tosca-parser # Apache-2.0

openstack_requirements/cmds/build_lower_constraints.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

openstack_requirements/cmds/check_py2.py

Lines changed: 0 additions & 77 deletions
This file was deleted.

openstack_requirements/cmds/edit_constraint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def main(argv=None, stdout=None):
6868
content = open(args[0], 'rt').read()
6969
reqs = requirement.parse(content, permit_urls=True)
7070
out_reqs = edit(reqs, args[1], args[2])
71-
out = requirement.to_content(out_reqs, prefix=False)
71+
out = requirement.to_content(out_reqs)
7272
with open(args[0] + '.tmp', 'wt') as f:
7373
f.write(out)
7474
if os.path.exists(args[0]):

openstack_requirements/cmds/generate.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@
2626
from openstack_requirements import requirement
2727

2828

29+
SECURITY_WARNING = [
30+
"# WARNING: OpenStack makes no security guarantees about third-party",
31+
"# dependencies listed here, and does not keep track of any",
32+
"# vulnerabilities they contain. Versions of these dependencies are",
33+
"# frozen at each coordinated release in order to stabilize upstream",
34+
"# testing, and can contain known vulnerabilities. Consumers are",
35+
"# *STRONGLY* encouraged to rely on curated distributions of OpenStack",
36+
"# or manage security patching of dependencies themselves.",
37+
]
38+
39+
2940
def _parse_freeze(text):
3041
"""Parse a freeze into structured data.
3142
@@ -257,5 +268,5 @@ def main(argv=None, stdout=None):
257268
denylist = _parse_denylist(options.denylist)
258269
frozen = [
259270
*sorted(_combine_freezes(freezes, denylist), key=_make_sort_key)]
260-
stdout.writelines(frozen)
271+
stdout.writelines(SECURITY_WARNING + frozen)
261272
stdout.flush()

openstack_requirements/project.py

Lines changed: 0 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,11 @@
1515

1616
"""The project abstraction."""
1717

18-
import collections
1918
import configparser
2019
import errno
2120
import io
2221
import os
2322

24-
from parsley import makeGrammar
25-
26-
from openstack_requirements import requirement
27-
28-
# PURE logic from here until the IO marker below.
29-
30-
31-
_Comment = collections.namedtuple('Comment', ['line'])
32-
_Extra = collections.namedtuple('Extra', ['name', 'content'])
33-
34-
35-
_extras_grammar = """
36-
ini = (line*:p extras?:e line*:l final:s) -> (''.join(p), e, ''.join(l+[s]))
37-
line = ~extras <(~'\\n' anything)* '\\n'>
38-
final = <(~'\\n' anything)* >
39-
extras = '[' 'e' 'x' 't' 'r' 'a' 's' ']' '\\n'+ body*:b -> b
40-
body = comment | extra
41-
comment = <'#' (~'\\n' anything)* '\\n'>:c '\\n'* -> comment(c)
42-
extra = name:n ' '* '=' line:l cont*:c '\\n'* -> extra(n, ''.join([l] + c))
43-
name = <(anything:x ?(x not in '\\n \\t='))+>
44-
cont = ' '+ <(~'\\n' anything)* '\\n'>
45-
"""
46-
_extras_compiled = makeGrammar(
47-
_extras_grammar, {"comment": _Comment, "extra": _Extra})
48-
49-
50-
Error = collections.namedtuple('Error', ['message'])
51-
File = collections.namedtuple('File', ['filename', 'content'])
52-
StdOut = collections.namedtuple('StdOut', ['message'])
53-
Verbose = collections.namedtuple('Verbose', ['message'])
54-
5523

5624
def extras(project):
5725
"""Return a dict of extra-name:content for the extras in setup.cfg."""
@@ -64,41 +32,6 @@ def extras(project):
6432
return dict(c.items('extras'))
6533

6634

67-
def merge_setup_cfg(old_content, new_extras):
68-
# This is ugly. All the existing libraries handle setup.cfg's poorly.
69-
prefix, extras, suffix = _extras_compiled(old_content).ini()
70-
out_extras = []
71-
if extras is not None:
72-
for extra in extras:
73-
if type(extra) is _Comment:
74-
out_extras.append(extra)
75-
elif type(extra) is _Extra:
76-
if extra.name not in new_extras:
77-
out_extras.append(extra)
78-
continue
79-
e = _Extra(
80-
extra.name,
81-
requirement.to_content(
82-
new_extras[extra.name], ':', ' ', False))
83-
out_extras.append(e)
84-
else:
85-
raise TypeError('unknown type %r' % extra)
86-
if out_extras:
87-
extras_str = ['[extras]\n']
88-
for extra in out_extras:
89-
if type(extra) is _Comment:
90-
extras_str.append(extra.line)
91-
else:
92-
extras_str.append(extra.name + ' =')
93-
extras_str.append(extra.content)
94-
if suffix:
95-
extras_str.append('\n')
96-
extras_str = ''.join(extras_str)
97-
else:
98-
extras_str = ''
99-
return prefix + extras_str + suffix
100-
101-
10235
# IO from here to the end of the file.
10336

10437
def _safe_read(project, filename, output=None):
@@ -143,47 +76,3 @@ def read(root):
14376
result['lower-constraints.txt'] = None
14477
_safe_read(result, 'lower-constraints.txt')
14578
return result
146-
147-
148-
def write(project, actions, stdout, verbose, noop=False):
149-
"""Write actions into project.
150-
151-
:param project: A project metadata dict.
152-
:param actions: A list of action tuples - File or Verbose - that describe
153-
what actions are to be taken.
154-
Error objects write a message to stdout and trigger an exception at
155-
the end of _write_project.
156-
File objects describe a file to have content placed in it.
157-
StdOut objects describe a message to write to stdout.
158-
Verbose objects will write a message to stdout when verbose is True.
159-
:param stdout: Where to write content for stdout.
160-
:param verbose: If True Verbose actions will be written to stdout.
161-
:param noop: If True nothing will be written to disk.
162-
:return None:
163-
:raises IOError: If the IO operations fail, IOError is raised. If this
164-
happens some actions may have been applied and others not.
165-
"""
166-
error = False
167-
for action in actions:
168-
if type(action) is Error:
169-
error = True
170-
stdout.write(action.message + '\n')
171-
elif type(action) is File:
172-
if noop:
173-
continue
174-
fullname = os.path.join(project['root'], action.filename)
175-
tmpname = fullname + '.tmp'
176-
with open(tmpname, 'wt') as f:
177-
f.write(action.content)
178-
if os.path.exists(fullname):
179-
os.remove(fullname)
180-
os.rename(tmpname, fullname)
181-
elif type(action) is StdOut:
182-
stdout.write(action.message)
183-
elif type(action) is Verbose:
184-
if verbose:
185-
stdout.write(u"%s\n" % (action.message,))
186-
else:
187-
raise Exception("Invalid action %r" % (action,))
188-
if error:
189-
raise Exception("Error occurred processing %s" % (project['root']))

0 commit comments

Comments
 (0)