1. no_voting for lower-constraints CI
2.pep8 create: /home/zuul/src/opendev.org/openstack/freezer/.tox/pep8
pep8 installdeps: -c/home/zuul/src/opendev.org/openstack/requirements/upper-constraints.txt, -r/home/zuul/src/opendev.org/openstack/freezer/test-requirements.txt
ERROR: invocation failed (exit code 1), logfile: /home/zuul/src/opendev.org/openstack/freezer/.tox/pep8/log/pep8-1.log
================================== log start ===================================
Looking in indexes: https://mirror.bhs1.ovh.opendev.org/pypi/simple, https://mirror.bhs1.ovh.opendev.org/wheel/ubuntu-20.04-x86_64
Collecting astroid==2.1.0
Downloading 8809bc008b36396c0cff6279841e8a/astroid-2.1.0-py3-none-any.whl (176 kB)
Collecting pylint==2.3.1
Downloading b3f73f4ac00277237721ef1c151f0d/pylint-2.3.1-py3-none-any.whl (765 kB)
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of astroid to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r /home/zuul/src/opendev.org/openstack/freezer/test-requirements.txt (line 23) and astroid==2.1.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested astroid==2.1.0
pylint 2.3.1 depends on astroid<3 and >=2.2.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
WARNING: You are using pip version 20.3.3; however, version 21.0 is available.
You should consider upgrading via the '/home/zuul/src/opendev.org/openstack/freezer/.tox/pep8/bin/python -m pip install --upgrade pip' command.
================================ log end ===============================
Change-Id: I898d03d716ebc6c6285c4589cd30f7875b0c51d2
1. The bug.
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/opt/stack/freezer/freezer/tests/unit/openstack/test_backup.py", line 37, in test_backup_cinder_by_glance
self.bakup_os.backup_cinder_by_glance(35)
File "/opt/stack/freezer/freezer/openstack/backup.py", line 79, in backup_cinder_by_glance
self.storage.add_stream(stream, package, headers=headers)
File "/opt/stack/freezer/freezer/storage/swift.py", line 163, in add_stream
for el in stream:
TypeError: iter() returned non-iterator of type 'ReSizeStream'
2. Fix
In python3.x , a iterator object should be difined two funs " __iter__()" and "__next__()".
Update ReSizeSteam.next() to ReSizeSteam.__next__().
Change-Id: I940841b94789d024d3b9447f96158963fe3e16ee
The "file_head" is a 'bytes-like object ,not 'str'.
Update file_head.split() to file_head.decode('utf-8').split()
Change-Id: Ic912cc86d9a5afbdbcd63f27e1f91d2140f9b9ba
1. the bug:
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/opt/stack/freezer/freezer/tests/unit/scheduler/test_utils.py", line 53, in test_find_config_files_path
ret = utils.find_config_files(temp_path)
File "/opt/stack/freezer/freezer/scheduler/utils.py", line 53, in find_config_files
for fname in os.walk(expanded_path).next()[2]:
AttributeError: 'generator' object has no attribute 'next'
2. fix:
To get iterobject next element is changed to next(iterobject,defalt) in python3.x.
Change-Id: I558bbfecb4a9670a10b1fc649821d88619b7917c
The default type of the string is str in python3.x,
if want use the type of byte ,should be delcare b'xxxx' .
Change-Id: Ia03aef1f5e51403f5ef1fdba65d0fa231b8889fd