swift 2.34.0__py2.py3-none-any.whl → 2.34.1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,7 @@ import six
18
18
  from xml.etree.cElementTree import Element, SubElement, tostring
19
19
 
20
20
  from swift.common.constraints import valid_api_version
21
+ from swift.common.header_key_dict import HeaderKeyDict
21
22
  from swift.common.http import HTTP_NO_CONTENT
22
23
  from swift.common.request_helpers import get_param
23
24
  from swift.common.swob import HTTPException, HTTPNotAcceptable, Request, \
@@ -178,52 +179,39 @@ class ListingFilter(object):
178
179
  start_response(status, headers)
179
180
  return resp_iter
180
181
 
181
- header_to_index = {}
182
- resp_content_type = resp_length = None
183
- for i, (header, value) in enumerate(headers):
184
- header = header.lower()
185
- if header == 'content-type':
186
- header_to_index[header] = i
187
- resp_content_type = value.partition(';')[0]
188
- elif header == 'content-length':
189
- header_to_index[header] = i
190
- resp_length = int(value)
191
- elif header == 'vary':
192
- header_to_index[header] = i
193
-
194
182
  if not status.startswith(('200 ', '204 ')):
195
183
  start_response(status, headers)
196
184
  return resp_iter
197
185
 
186
+ headers_dict = HeaderKeyDict(headers)
187
+ resp_content_type = headers_dict.get(
188
+ 'content-type', '').partition(';')[0]
189
+ resp_length = headers_dict.get('content-length')
190
+
198
191
  if can_vary:
199
- if 'vary' in header_to_index:
200
- value = headers[header_to_index['vary']][1]
192
+ if 'vary' in headers_dict:
193
+ value = headers_dict['vary']
201
194
  if 'accept' not in list_from_csv(value.lower()):
202
- headers[header_to_index['vary']] = (
203
- 'Vary', value + ', Accept')
195
+ headers_dict['vary'] = value + ', Accept'
204
196
  else:
205
- headers.append(('Vary', 'Accept'))
197
+ headers_dict['vary'] = 'Accept'
206
198
 
207
199
  if resp_content_type != 'application/json':
208
- start_response(status, headers)
200
+ start_response(status, list(headers_dict.items()))
209
201
  return resp_iter
210
202
 
211
- if resp_length is None or \
212
- resp_length > MAX_CONTAINER_LISTING_CONTENT_LENGTH:
213
- start_response(status, headers)
203
+ if req.method == 'HEAD':
204
+ headers_dict['content-type'] = out_content_type + '; charset=utf-8'
205
+ # proxy logging (and maybe other mw?) seem to be good about
206
+ # sticking this on HEAD/204 but we do it here to be responsible
207
+ # and explicit
208
+ headers_dict['content-length'] = 0
209
+ start_response(status, list(headers_dict.items()))
214
210
  return resp_iter
215
211
 
216
- def set_header(header, value):
217
- if value is None:
218
- del headers[header_to_index[header]]
219
- else:
220
- headers[header_to_index[header]] = (
221
- headers[header_to_index[header]][0], str(value))
222
-
223
- if req.method == 'HEAD':
224
- set_header('content-type', out_content_type + '; charset=utf-8')
225
- set_header('content-length', None) # don't know, can't determine
226
- start_response(status, headers)
212
+ if resp_length is None or \
213
+ int(resp_length) > MAX_CONTAINER_LISTING_CONTENT_LENGTH:
214
+ start_response(status, list(headers_dict.items()))
227
215
  return resp_iter
228
216
 
229
217
  body = b''.join(resp_iter)
@@ -237,7 +225,7 @@ class ListingFilter(object):
237
225
  except ValueError:
238
226
  # Static web listing that's returning invalid JSON?
239
227
  # Just pass it straight through; that's about all we *can* do.
240
- start_response(status, headers)
228
+ start_response(status, list(headers_dict.items()))
241
229
  return [body]
242
230
 
243
231
  if not req.allow_reserved_names:
@@ -257,16 +245,16 @@ class ListingFilter(object):
257
245
  body = json.dumps(listing).encode('ascii')
258
246
  except KeyError:
259
247
  # listing was in a bad format -- funky static web listing??
260
- start_response(status, headers)
248
+ start_response(status, list(headers_dict.items()))
261
249
  return [body]
262
250
 
263
251
  if not body:
264
252
  status = '%s %s' % (HTTP_NO_CONTENT,
265
253
  RESPONSE_REASONS[HTTP_NO_CONTENT][0])
266
254
 
267
- set_header('content-type', out_content_type + '; charset=utf-8')
268
- set_header('content-length', len(body))
269
- start_response(status, headers)
255
+ headers_dict['content-type'] = out_content_type + '; charset=utf-8'
256
+ headers_dict['content-length'] = len(body)
257
+ start_response(status, list(headers_dict.items()))
270
258
  return [body]
271
259
 
272
260
 
@@ -245,7 +245,7 @@ class HTMLViewer(object):
245
245
  if multiple:
246
246
  return value
247
247
  if isinstance(value, list):
248
- return eval(value[0]) if isinstance(default, int) else value[0]
248
+ return int(value[0]) if isinstance(default, int) else value[0]
249
249
  else:
250
250
  return value
251
251
 
@@ -16,6 +16,11 @@
16
16
  """
17
17
  Profiling middleware for Swift Servers.
18
18
 
19
+ .. note::
20
+ This middleware is intended for development and testing environments only,
21
+ not production. No authentication is expected or required for the web UI,
22
+ and profiling may incur noticeable performance penalties.
23
+
19
24
  The current implementation is based on eventlet aware profiler.(For the
20
25
  future, more profilers could be added in to collect more data for analysis.)
21
26
  Profiling all incoming requests and accumulating cpu timing statistics
@@ -1,16 +1,14 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: swift
3
- Version: 2.34.0
3
+ Version: 2.34.1
4
4
  Summary: OpenStack Object Storage
5
5
  Home-page: https://docs.openstack.org/swift/latest/
6
6
  Author: OpenStack
7
7
  Author-email: openstack-discuss@lists.openstack.org
8
- License: UNKNOWN
9
8
  Project-URL: Documentation, https://docs.openstack.org/swift/latest/
10
9
  Project-URL: Bug Tracker, https://bugs.launchpad.net/swift
11
10
  Project-URL: Source Code, https://opendev.org/openstack/swift/
12
11
  Project-URL: Release Notes, https://opendev.org/openstack/swift/src/branch/master/CHANGELOG
13
- Platform: UNKNOWN
14
12
  Classifier: Development Status :: 5 - Production/Stable
15
13
  Classifier: Environment :: OpenStack
16
14
  Classifier: Intended Audience :: Information Technology
@@ -29,38 +27,40 @@ Classifier: Programming Language :: Python :: 3.10
29
27
  Classifier: Programming Language :: Python :: 3.11
30
28
  Classifier: Programming Language :: Python :: 3.12
31
29
  Description-Content-Type: text/x-rst
32
- Requires-Dist: PasteDeploy (>=2.0.0)
33
- Requires-Dist: PyECLib (>=1.3.1)
34
- Requires-Dist: cryptography (>=2.0.2)
35
- Requires-Dist: eventlet (!=0.34.3,>=0.25.0)
36
- Requires-Dist: greenlet (>=0.3.2)
37
- Requires-Dist: lxml (>=4.2.3)
38
- Requires-Dist: requests (>=2.14.2)
39
- Requires-Dist: six (>=1.10.0)
40
- Requires-Dist: xattr (>=0.4) ; (sys_platform!='win32')
30
+ License-File: LICENSE
31
+ License-File: AUTHORS
32
+ Requires-Dist: eventlet !=0.34.3,>=0.25.0
33
+ Requires-Dist: greenlet >=0.3.2
34
+ Requires-Dist: PasteDeploy >=2.0.0
35
+ Requires-Dist: lxml >=4.2.3
36
+ Requires-Dist: requests >=2.14.2
37
+ Requires-Dist: six >=1.10.0
38
+ Requires-Dist: PyECLib >=1.3.1
39
+ Requires-Dist: cryptography >=2.0.2
40
+ Requires-Dist: xattr >=0.4 ; (sys_platform!='win32')
41
41
  Provides-Extra: keystone
42
- Requires-Dist: keystonemiddleware (>=4.17.0) ; extra == 'keystone'
42
+ Requires-Dist: keystonemiddleware >=4.17.0 ; extra == 'keystone'
43
43
  Provides-Extra: kmip_keymaster
44
- Requires-Dist: pykmip (>=0.7.0) ; extra == 'kmip_keymaster'
44
+ Requires-Dist: pykmip >=0.7.0 ; extra == 'kmip_keymaster'
45
45
  Provides-Extra: kms_keymaster
46
- Requires-Dist: castellan (>=0.13.0) ; extra == 'kms_keymaster'
47
- Requires-Dist: oslo.config (!=4.3.0,!=4.4.0,>=4.0.0) ; extra == 'kms_keymaster'
46
+ Requires-Dist: oslo.config !=4.3.0,!=4.4.0,>=4.0.0 ; extra == 'kms_keymaster'
47
+ Requires-Dist: castellan >=0.13.0 ; extra == 'kms_keymaster'
48
48
  Provides-Extra: test
49
- Requires-Dist: bandit (>=1.1.0) ; extra == 'test'
50
- Requires-Dist: boto3 (>=1.9) ; extra == 'test'
51
- Requires-Dist: boto (>=2.32.1) ; extra == 'test'
52
- Requires-Dist: botocore (>=1.12) ; extra == 'test'
53
- Requires-Dist: coverage (>=5.0.4) ; extra == 'test'
54
- Requires-Dist: docutils (>=0.11) ; extra == 'test'
55
- Requires-Dist: hacking (<6.2.0,>=2.0) ; extra == 'test'
56
- Requires-Dist: keystonemiddleware (>=4.17.0) ; extra == 'test'
57
- Requires-Dist: mock (>=3.0) ; extra == 'test'
58
- Requires-Dist: pytest-cov (>=2.12.1) ; extra == 'test'
59
- Requires-Dist: pytest (>=4.6.11) ; extra == 'test'
60
- Requires-Dist: python-keystoneclient (!=2.1.0,>=2.0.0) ; extra == 'test'
61
- Requires-Dist: python-swiftclient (>=3.2.0) ; extra == 'test'
62
- Requires-Dist: requests-mock (>=1.2.0) ; extra == 'test'
63
- Requires-Dist: stestr (>=2.0.0) ; extra == 'test'
49
+ Requires-Dist: hacking <6.2.0,>=2.0 ; extra == 'test'
50
+ Requires-Dist: coverage >=5.0.4 ; extra == 'test'
51
+ Requires-Dist: pytest >=4.6.11 ; extra == 'test'
52
+ Requires-Dist: pytest-cov >=2.12.1 ; extra == 'test'
53
+ Requires-Dist: stestr >=2.0.0 ; extra == 'test'
54
+ Requires-Dist: mock >=3.0 ; extra == 'test'
55
+ Requires-Dist: python-swiftclient >=3.2.0 ; extra == 'test'
56
+ Requires-Dist: python-keystoneclient !=2.1.0,>=2.0.0 ; extra == 'test'
57
+ Requires-Dist: boto >=2.32.1 ; extra == 'test'
58
+ Requires-Dist: boto3 >=1.9 ; extra == 'test'
59
+ Requires-Dist: botocore >=1.12 ; extra == 'test'
60
+ Requires-Dist: requests-mock >=1.2.0 ; extra == 'test'
61
+ Requires-Dist: keystonemiddleware >=4.17.0 ; extra == 'test'
62
+ Requires-Dist: bandit >=1.1.0 ; extra == 'test'
63
+ Requires-Dist: docutils >=0.11 ; extra == 'test'
64
64
 
65
65
  ===============
66
66
  OpenStack Swift
@@ -222,5 +222,3 @@ Thanks,
222
222
 
223
223
  The Swift Development Team
224
224
 
225
-
226
-
@@ -75,7 +75,7 @@ swift/common/middleware/gatekeeper.py,sha256=OlF-Qk1OZ-XKE3tCoKv0TNn-wOnWLHwvqeF
75
75
  swift/common/middleware/healthcheck.py,sha256=3F4UgutBgQpTYfe_Oh2Kh8cQfUbdT0_k4BrmZnjK97M,2075
76
76
  swift/common/middleware/keystoneauth.py,sha256=JUkP2wI8sq3tL6iWYMK_2S9CQvUtnBbB6Jw8J1LOOzI,26901
77
77
  swift/common/middleware/list_endpoints.py,sha256=LkBJhLoREsw7Sy3O0HEOEXO8k2N4sx32hEvILsJzUow,10060
78
- swift/common/middleware/listing_formats.py,sha256=GEKnBQAe3f0_4NQcLahL9aD8UFNzvzkji-GLBdvksB8,10610
78
+ swift/common/middleware/listing_formats.py,sha256=mtxvTW1sRjO3Z6tI-7OdcAlT4DtRjh-U_M7r-HqkfsI,10285
79
79
  swift/common/middleware/memcache.py,sha256=YENYsIaZZ1wM1IWfmlJzVrAfF0Eb0HF8YAwuj1HupoY,1308
80
80
  swift/common/middleware/name_check.py,sha256=K3PzYs7lW1fe7anYFdcC6ijMChcsvNbtw4Sio8Dec_8,5366
81
81
  swift/common/middleware/proxy_logging.py,sha256=43cZKy_fQ8HM0wmC68q8ZVQgx3DLsu3UY_0fmu9m5Ps,22822
@@ -87,7 +87,7 @@ swift/common/middleware/staticweb.py,sha256=oNxI2t9un_osgtDF2Q-hinsGdjHHA7W1sza3
87
87
  swift/common/middleware/symlink.py,sha256=qzKpxDg1400uYCVs2ia0f-cz2Ty--sP70qALymCsWfw,35236
88
88
  swift/common/middleware/tempauth.py,sha256=pNKJpk1KJ2MwePYFQnY-HphjctL6IFTwnRGFiCvBS80,38354
89
89
  swift/common/middleware/tempurl.py,sha256=Ht35uJkxULsTlxPZ8WkY85HAeQt5FL3tU047d_IqgOs,36758
90
- swift/common/middleware/xprofile.py,sha256=zJFFhdvJhKWb02yF-aTZUE2oM2YatDUmfdZgnrg0CG0,9883
90
+ swift/common/middleware/xprofile.py,sha256=rrHv35ms1AngC8dv8VQIeN4c5g0SC5xYWVXAEV1EXUE,10113
91
91
  swift/common/middleware/crypto/__init__.py,sha256=ZI-Tnqg3AMVgDzAhkWFtAlKFJqXGAzYMzSquwK2OnUk,1498
92
92
  swift/common/middleware/crypto/crypto_utils.py,sha256=jKDJEJf-C434dHgLh1X4CWxB95UnHGOOV7JNY-vysjM,11400
93
93
  swift/common/middleware/crypto/decrypter.py,sha256=JmL2tZSCNylS9J3UYl6y0nIaZAZ0FIbUlhj8t2jQ_eM,20408
@@ -145,7 +145,7 @@ swift/common/middleware/versioned_writes/legacy.py,sha256=OLXfy7h_P-zyBDbxRjhrNe
145
145
  swift/common/middleware/versioned_writes/object_versioning.py,sha256=HAxehk0_f7LiLeHEeE3IScxGGfFMNaeEr8weQILNVvc,66014
146
146
  swift/common/middleware/x_profile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
147
  swift/common/middleware/x_profile/exceptions.py,sha256=BRhoEqEl5_XIY_ArhvveRkHMO0xHx8V-H7w7M_Siz-E,1020
148
- swift/common/middleware/x_profile/html_viewer.py,sha256=rY7dFsKNipMh9ohr0x5HY8eCQOg2UE_cYFVA3tokwuQ,21346
148
+ swift/common/middleware/x_profile/html_viewer.py,sha256=SYLIdAk6ahTeoS7WW8sGnlI7n3ot0srJ03nfEtxQFLI,21345
149
149
  swift/common/middleware/x_profile/profile_model.py,sha256=iaje5iihcj52U8jGzLmYwmG0_cJI8JFHXxsBhBJfwCw,10202
150
150
  swift/common/ring/__init__.py,sha256=WgGFseZj8r2UtBCBcZiCgzbUoWCGv4ND1MCEv5IW7aA,758
151
151
  swift/common/ring/builder.py,sha256=N61Pcx2vX7JAnEdXR3HR12vd9iC4htOImo-rBKuswf0,81478
@@ -203,11 +203,11 @@ swift/proxy/controllers/base.py,sha256=JWpkm9MdhtF5Z6VmVp-XCbRpUTTsx1SU6-OQRWWEC
203
203
  swift/proxy/controllers/container.py,sha256=_JXDujs-AgX3eui327WD3vP7jcsKQCEcyyKdiye8rZU,37114
204
204
  swift/proxy/controllers/info.py,sha256=QSvBwBJjwO3QIktINMCjcYgBi-QAi3wHWKmyf4AtQz8,3859
205
205
  swift/proxy/controllers/obj.py,sha256=RZNzjx_UqW_X8qqlRRt8B9600X4VEQUIrFrytSORfD8,149191
206
- swift-2.34.0.dist-info/AUTHORS,sha256=Z7RxslERjvhbWgO8F2cfxn9ccH-AvwpK7v0G52eBAlE,18282
207
- swift-2.34.0.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
208
- swift-2.34.0.dist-info/METADATA,sha256=444qSA2NeCKmr85F7UUtXQwcITY1dlxUsovMbKNG_xU,8742
209
- swift-2.34.0.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
210
- swift-2.34.0.dist-info/entry_points.txt,sha256=-ZUwCyKbiL2gTvd7X2gLEGno319gApVKBENA-5ED4Ko,4925
211
- swift-2.34.0.dist-info/pbr.json,sha256=GKlZK3fFYdawi1EUrXg5yOLWYtKLKMbUyeriZ0ZdklY,48
212
- swift-2.34.0.dist-info/top_level.txt,sha256=nVzNOToyzq0MM7JtrpalfOaPV9UIfm_lXhHX0duhVps,6
213
- swift-2.34.0.dist-info/RECORD,,
206
+ swift-2.34.1.dist-info/AUTHORS,sha256=Z7RxslERjvhbWgO8F2cfxn9ccH-AvwpK7v0G52eBAlE,18282
207
+ swift-2.34.1.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
208
+ swift-2.34.1.dist-info/METADATA,sha256=bLkpfGZZPCracuOS7t0qUPSkGQQPn99n-S8E5OUnijk,8693
209
+ swift-2.34.1.dist-info/WHEEL,sha256=Ll72iyqtt6Rbxp-Q7FSafYA1LeRv98X15xcZWRsFEmY,109
210
+ swift-2.34.1.dist-info/entry_points.txt,sha256=sABN-wA_ikxyB37MhGggO1bY5Tb4hidL-LJBWSb3gKs,4924
211
+ swift-2.34.1.dist-info/pbr.json,sha256=UWz7nqcJdHDGZUsr14JqVppzYxu_mClXPK8lCW4rQCQ,48
212
+ swift-2.34.1.dist-info/top_level.txt,sha256=nVzNOToyzq0MM7JtrpalfOaPV9UIfm_lXhHX0duhVps,6
213
+ swift-2.34.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.34.2)
2
+ Generator: setuptools (75.3.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any
@@ -93,4 +93,3 @@ replication.fs = swift.obj.diskfile:DiskFileManager
93
93
 
94
94
  [swift.object_audit_watcher]
95
95
  dark_data = swift.obj.watchers.dark_data:DarkDataWatcher
96
-
@@ -0,0 +1 @@
1
+ {"git_version": "5f776b6ee", "is_release": true}
@@ -1 +0,0 @@
1
- {"git_version": "0e41e1790", "is_release": true}