154 Commits

Author SHA1 Message Date
Cyril Roelandt
c4363aa6ea Python3: Fix test/unit/common/test_container_sync_realms.py
Change-Id: I9bb6e55691821891172d375d0bf097148d66010d
2019-01-29 09:04:36 -06:00
Pete Zaitcev
5b5ed29ab4 py3: object server
This does not do anything about replicator or other daemons,
only ports the server.

- wsgi_to_bytes(something.get('X-Foo')) assumes that None is possible
- Dunno if del-in-for-in-dict calls for clone or list(), using list()
- Fixed the zero-copy with EventletPlungerString(bytes)
- Yet another reminder that Request.blank() takes a WSGI string path

Curiously enough, the sleep(0) before checking for logging was
already present in the tests. The py3 scheduling merely forces us
to do it consistently throughout.

Change-Id: I203a54fddddbd4352be0e6ea476a628e3f747dc1
2019-01-11 09:18:08 -06:00
Pete Zaitcev
0d29b01d2b py3: Port the acl, account_quotas, cname_lookup, container_sync
These are trivial, but need to be done sooner or later.

About the isEnabledFor, our FakeLogger causes this on py3:
  AttributeError: 'FakeLogger' object has no attribute '_cache'
Adding the isEnabledFor short-cuts a need for that private member.

Change-Id: I4d1df857a24801fe2a396dc003719f54d099f72c
2018-12-27 18:55:47 +00:00
Zuul
a7aa232958 Merge "Add a comment about the module list for py3 in tox.ini" 2018-12-20 05:03:06 +00:00
Pete Zaitcev
9856d6eb23 Add a comment about the module list for py3 in tox.ini
As our PTL said, "adding some comments" "in lieu of setting up more
comprehensive projet tracking systems".

Change-Id: Ic38ff2b74366f9839e999d11050eefa753c71be3
2018-12-18 21:35:22 -06:00
Pete Zaitcev
0f505ad968 py3: adapt the account server completely
This version scatters the cancer of WSGI strings around, but
reduces the size of the patch. In particular, we can continue
to iterate strings.

Change-Id: Ia5815602d05925c5de110accc4dfb1368203bd8d
2018-12-18 20:45:35 -06:00
Zuul
d645e216c0 Merge "Python3: fix test_xprofile.py" 2018-12-13 20:33:16 +00:00
Cyril Roelandt
f98d5d16ff Py3: Add working tests to tox.ini
Change-Id: Ifb737a0d3ba263b69945f30d9a31a42cb3ab645a
2018-12-13 16:42:47 +01:00
Cyril Roelandt
7458f234a6 Python3: fix test_xprofile.py
Change-Id: Ie8d28218b974a1b6b7b7b691f786ff1d6bdded05
2018-12-12 20:26:10 +01:00
Zuul
17e2a0c456 Merge "Py3: Port test/unit/test_ringcomposer.py" 2018-12-08 10:05:29 +00:00
Cyril Roelandt
010cdc2a0c Py3: Fix test_memcache
Change-Id: I864de1d7ef0df07246388c7c108e1bb753e15de3
2018-12-03 12:52:00 +01:00
Cyril Roelandt
6c8b4c87a5 Py3: Port test/unit/test_ringcomposer.py
Change-Id: I6cfa6aa87b00f3edecdd2dd8b3e5ef66380e36ae
2018-12-01 03:28:52 +01:00
Tim Burke
37b814657e py3: port encryption
This got away from me a bit with the functional tests masquerading as
unit tests.

Change-Id: I1237c02eff96e53fff8f9661a2d85c4695b73371
2018-11-20 01:30:04 -06:00
Zuul
168dc91bd9 Merge "py3: port account/container replicators" 2018-11-09 19:43:50 +00:00
liuyamin
34e48d50bf Remove setup.py check from pep8 job
Using "python setup.py check -r -s" method of checking the package has
been deprecated with the new recommendation to build the sdist and
wheel, then running "twine check" against the output.

Luckily, there is already a job that covers this that only runs when the
README, setup.py, or setup.cfg files change, making running this in the
pep8 job redundant. This covered by the test-release-openstack-python3
that is defined in the publish-to-pypi-python3 template.

More details can be found in this mailing list post:

http://lists.openstack.org/pipermail/openstack-dev/2018-October/136136.html

Change-Id: I6ff57e0146da44ec736cfe7a61d45dd31ea65b90
2018-11-08 10:26:41 +08:00
Tim Burke
bc4494f24d py3: port account/container replicators
Change-Id: Ia2662d8f75883e1cc41b9277c65f8b771f56f902
2018-11-06 16:54:20 -08:00
whoami-rajat
7a21272627 Update min tox version to 2.3.2
The commands used by constraints need at least tox 2.3.2.  Update to
reflect reality, which should help with local running of constraints
targets.

Change-Id: I0051938d70bdb3060981e8ce1cd2a72ca8d292ff
2018-11-02 19:01:06 +00:00
Zuul
a13e44b39d Merge "py3: adapt common/db_replicator.py" 2018-11-01 10:34:00 +00:00
Zuul
d75c29a63b Merge "py3: port internal_client" 2018-10-27 01:04:32 +00:00
Pete Zaitcev
654187e1fe py3: adapt common/db_replicator.py
Another one of those almost-empty patches. This time my excuse is
that this one is needed in a couple of places (account & container).

Change-Id: Ieb8960763c64f88981b68884bfec92c17ebb4708
2018-10-22 21:42:58 -05:00
Pete Zaitcev
6676d74f8f py3: everything account except the real things
The the 80% of the work still remain in server and replicator,
but let's knock this out.

Change-Id: I1e1dee8f8c77212183b0ef2b574b57ad1051d57e
2018-10-17 23:28:47 -05:00
Pete Zaitcev
28a582f3f4 py3: adapt account/backend.py and utils.py
Gradatim Ferociter

Change-Id: I6f3fac450c14f8dbc549ab2b0645a31aa0cece89
2018-10-15 22:42:22 -05:00
Pete Zaitcev
e3a5b63cc7 py3: Adapt db.py
Change-Id: I0dab4ff013f300396cff7313bc27b9d5644fe8a7
2018-10-04 17:09:34 -05:00
Tim Burke
c90d34bd02 py3: port tempauth
Note that the user DB is stored in-memory as native strings, so we do
some crazy-decoding to make comparisons for auth decisions. Seems to
keep the config handling mostly sane, though.

I maybe need to look harder at container ACLs?

Change-Id: Ia58698c9b30d2211eeee8ecb3bbdd1c26fa4034d
2018-10-01 12:52:22 -07:00
Tim Burke
ae496630b6 py3: port internal_client
Change-Id: I4e69beac30be1d8726849aacb603af5e2aeecaf8
2018-09-25 13:46:59 -07:00
Tim Burke
ddd5cc1592 py3: port direct_client
I wanna see how far I can get *without* mucking around in swob and
request_helpers. Maybe eventually we can get some helpers out there to
make working with UTF-8-pretending-to-be-Latin-1 strings better, but for
the time being, I feel more at ease *embracing* the crazy.

Change-Id: I0b9983a182daedd9dbec483b805d263238fcfac7
Co-Authored-By: Pete Zaitcev <zaitcev@kotori.zaitcev.us>
2018-09-25 13:46:59 -07:00
Zuul
ec66c6cbbe Merge "py3: Port listing_formats middleware" 2018-09-25 20:13:28 +00:00
Zuul
fc9ab28927 Merge "py3: port request_helpers" 2018-09-25 20:01:10 +00:00
Tim Burke
1b0172f5d3 py3: Port listing_formats middleware
Change-Id: I4e2712a4a38b5cab3e31cc75bb162e73b4f5dafb
2018-09-17 13:08:12 -07:00
Zuul
956172623c Merge "fixed a manpage and added the manpage syntax checker to pep8 jobs" 2018-09-15 17:48:49 +00:00
John Dickinson
0c97888bcb fixed a manpage and added the manpage syntax checker to pep8 jobs
also a drive-by fix to the bindep job--it doesn't need to install

Change-Id: Ic9b68bc60bfbf21b45a1b7f9d7ff9998e01ddd26
2018-09-15 10:31:49 -06:00
Zuul
bfa4c6295d Merge "py3: include test_base_storage_server" 2018-09-15 08:04:42 +00:00
Tim Burke
2ef21ac05d py3: port request_helpers
Change-Id: I6be1a1c618e4b4fa03b34dad96f378aca01e8e08
2018-09-15 01:33:34 -06:00
Tim Burke
b4567e66ec py3: include test_base_storage_server
Apparently this was already passing? Not a whole lot there...

Change-Id: I029fe2e7f4162765eee0a390793402523d0975fa
2018-09-15 00:47:35 -06:00
Samuel Merritt
114220279b py3: port list_endpoints
Change-Id: Ic6d0532f9f42b4d57a12aafeec5d34baffab6e23
2018-09-14 13:53:06 -06:00
Tim Burke
df954e2709 py3: port bufferedhttp (hopefully)
I've at least tried it out with a py3 proxy, and it seems to work out
OK. I haven't tried killing the socket and verifying that it's actualy
dead, but getting a hold of _real_close *seems like* what we want?

At least the three (!!) tests pass.

Change-Id: Ic08c26185d63a36a5422793d81f621e0698fa572
2018-08-24 11:30:26 +00:00
Doug Hellmann
ba8447e056 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: Iac4a202a1d723822d10f4d34a397eff9de3f2108
add the job in project-config:
Depends-On: https://review.openstack.org/555034
remove branch optimiazation in check and add swift exclusions (series):
Depends-On: https://review.openstack.org/560109
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Co-Authored-By: Nguyen Hai <nguyentrihai93@gmail.com>
2018-07-27 01:59:30 +00:00
Tim Burke
783c7f6117 py3: port proxy/controllers/info.py
Yes, this means you can now start a proxy-server process on py3! And it
will give you something useful on /info!

Apparently you can even get auth tokens from tempauth, although the
tempauth unit tests don't pass yet.

Change-Id: I86ead2989b5934a7584cdd75719ce239826e01ec
2018-06-28 09:58:44 -07:00
Samuel Merritt
306f9a150f py3: port domain_remap tests
The domain_remap middleware didn't need to change, only its tests.

Change-Id: I5edf05b609ce263708f851219c38c1bd1b645a6f
2018-06-26 13:20:49 -07:00
Samuel Merritt
081ff36e6e py3: port crossdomain
Change-Id: I83a35f066d69edf39c74fd22c7fb248b5320d21f
2018-06-26 13:20:49 -07:00
Samuel Merritt
50ea4e1e08 py3: port healthcheck
Typed "b" in a half-dozen places and fixed a typo in a test name.

Change-Id: Idcb8b2eeef5b545eb0944cc22b7c7961e8c2f8f0
2018-06-26 13:20:49 -07:00
Samuel Merritt
3920b88daa py3: port catch_errors
Today's diff is brought to you by the letter "b".

Change-Id: I074c1ff3f1232a899c101f2856dff4a881a6fe77
2018-06-21 17:23:41 -07:00
Samuel Merritt
e0b4eb225c py3: fix test_proxy_logging.py
Only the tests needed to change, and it was nearly all just prepending
"b" to a bunch of string literals.

Change-Id: Id5317e471c04a05627438c281bb0d6a97cf6a8a4
2018-06-21 17:18:42 -07:00
Tim Burke
2b19c26498 py3: Port common/swob
Change-Id: I31408f525ba9836f634a35581d4aee6fa2c9428f
2018-06-20 16:52:02 -07:00
Tim Burke
0694e51eb7 py3: Port common/constraints
Alternate approach to https://review.openstack.org/#/c/559902

Change-Id: I1e244c231753b8f4b6f1cf95cb0ae4c3c959ae0f
2018-06-20 16:51:25 -07:00
Tim Burke
2637fec004 Add py36 testenv
Ubuntu 18.04 ships 3.6.5; may as well have a testenv handy for it.

Change-Id: Ibea05bc879685fab148cde1b19510e83f0639f5d
2018-06-20 16:51:25 -07:00
John Dickinson
fb3b43f713 Added PyPI validation check for the readme.
See https://review.openstack.org/#/c/571007/ and
https://review.openstack.org/#/c/570999/ for context.

Change-Id: Ib6045de3cb9097ed7e6d48646109f35612cbbc74
2018-05-30 07:55:42 -07:00
Zuul
3313392462 Merge "Import swift3 into swift repo as s3api middleware" 2018-04-30 16:00:56 +00:00
Kota Tsuyuzaki
636b922f3b Import swift3 into swift repo as s3api middleware
This attempts to import openstack/swift3 package into swift upstream
repository, namespace. This is almost simple porting except following items.

1. Rename swift3 namespace to swift.common.middleware.s3api
1.1 Rename also some conflicted class names (e.g. Request/Response)

2. Port unittests to test/unit/s3api dir to be able to run on the gate.

3. Port functests to test/functional/s3api and setup in-process testing

4. Port docs to doc dir, then address the namespace change.

5. Use get_logger() instead of global logger instance

6. Avoid global conf instance

Ex. fix various minor issue on those steps (e.g. packages, dependencies,
  deprecated things)

The details and patch references in the work on feature/s3api are listed
at https://trello.com/b/ZloaZ23t/s3api (completed board)

Note that, because this is just a porting, no new feature is developed since
the last swift3 release, and in the future work, Swift upstream may continue
to work on remaining items for further improvements and the best compatibility
of Amazon S3. Please read the new docs for your deployment and keep track to
know what would be changed in the future releases.

Change-Id: Ib803ea89cfee9a53c429606149159dd136c036fd
Co-Authored-By: Thiago da Silva <thiago@redhat.com>
Co-Authored-By: Tim Burke <tim.burke@gmail.com>
2018-04-27 15:53:57 +09:00
Samuel Merritt
80858077e5 py3: port gatekeeper
There were a couple of cleanups in swob as part of this.  First,
status lines are always native str objects (as PEP 3333 wants), rather
than being encoded to bytes under py3. Second, _resp_body_property
now works (only) with bytestrings from the app iter.

In gatekeeper, we now deal with dict.items() returning an object of
type "dict_items" in py3, not a list. Also fixed a NameError caused by
py2's list comprehensions leaking variables to function scope where
py3's don't.

Change-Id: I6da8eceb91edb2b47aa345d61b825c7199a5569b
2018-04-20 13:15:03 -07:00