Commit Graph

7 Commits

Author SHA1 Message Date
wangzihao 81352d08e9 Remove six.PY3
The Python 2.7 Support has been dropped since Ussuri.
So remove hacking rules for compatibility between python 2 and 3.

Change-Id: Idd6a1efd1857a70fc7d960b365bfc58d6cbe00d3
2020-09-30 16:34:20 +08:00
Hervé Beraud 9caec06faf Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I79f231823939e421a04377ca19e2e65b12d9b26a
2020-06-02 20:40:20 +02:00
Andreas Jaeger 4445f3296b Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Change-Id: If75153300f07e6d1c5bf433af35a0dd4d98e6c7f
2020-04-02 15:05:26 +02:00
Brian Haley cfc7838f8c Update to support running benchmark on python3
Fixed a TypeError when running with python3, and also added
a 'benchmark3' target to run it on python3 explicitly.

Change-Id: Ia3514465f7d1e97845891cf9aaabcf93e36e0f57
2018-04-04 11:40:23 -04:00
Doug Hellmann bdb739e249 Move files out of the namespace package
Move the public API out of oslo.rootwrap to oslo_rootwrap. Retain
the ability to import from the old namespace package for backwards
compatibility for this release cycle.

bp/drop-namespace-packages

Change-Id: Ifed1a99e5ea6d999760731867c4294707698d41c
2014-12-18 16:08:01 -05:00
Yuriy Taraday 0c6ba4bbe3 Add daemon mode to benchmark
Change-Id: I9dbd71abc9cb7cca75582910be0eeefc27a1a174
2014-08-13 20:52:57 +04:00
Yuriy Taraday 196bdc0fa2 Add basic benchmark
Benchmark shows performance penalty rootwrap introduces compared to one of
plain sudo.

To run benchmark, issue: tox -e benchmark

Example output:

Running 'ip a':
        method          :    min       avg       max       dev
                   ip a :   4.185ms   4.570ms   5.657ms 187.705us
              sudo ip a :  13.564ms  14.437ms  28.452ms   1.470ms
sudo rootwrap conf ip a : 148.839ms 192.424ms 254.043ms  19.219ms
Running 'ip netns exec bench_ns ip a':
                    method                     :    min       avg       max       dev
              sudo ip netns exec bench_ns ip a : 109.772ms 151.627ms 209.943ms  22.991ms
sudo rootwrap conf ip netns exec bench_ns ip a : 289.345ms 345.471ms 463.807ms  32.873ms

Change-Id: Id8e41be6602fa8dcff48a8a4ba44d35dd3043731
2014-07-28 13:46:52 +04:00