Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pytest to 4.3.1 #2441

Merged
merged 1 commit into from
Oct 2, 2019
Merged

Bump pytest to 4.3.1 #2441

merged 1 commit into from
Oct 2, 2019

Conversation

kolyshkin
Copy link
Contributor

Pytest 4.3.1 includes the fix from pytest-dev/pytest#4795

which should fix the following failure:

INFO: Building docker-sdk-python3:4.0.2...
sha256:c7a40413c985b6e75df324fae39b1c30cb78a25df71b7892f1a4a15449537fb3
INFO: Starting docker-py tests...
Traceback (most recent call last):
File "/usr/local/bin/pytest", line 10, in
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/_pytest/config/init.py", line 61, in main
config = _prepareconfig(args, plugins)
File "/usr/local/lib/python3.6/site-packages/_pytest/config/init.py", line 182, in _prepareconfig
config = get_config()
File "/usr/local/lib/python3.6/site-packages/_pytest/config/init.py", line 156, in get_config
pluginmanager.import_plugin(spec)
File "/usr/local/lib/python3.6/site-packages/_pytest/config/init.py", line 530, in import_plugin
import(importspec)
File "/usr/local/lib/python3.6/site-packages/_pytest/tmpdir.py", line 25, in
class TempPathFactory(object):
File "/usr/local/lib/python3.6/site-packages/_pytest/tmpdir.py", line 35, in TempPathFactory
lambda p: Path(os.path.abspath(six.text_type(p)))
TypeError: attrib() got an unexpected keyword argument 'convert'
Sending interrupt signal to process
Terminated
script returned exit code 143

Signed-off-by: Kir Kolyshkin [email protected]

Pytest 4.3.1 includes the fix from

	pytest-dev/pytest#4795

which should fix the following failure:

> INFO: Building docker-sdk-python3:4.0.2...
> sha256:c7a40413c985b6e75df324fae39b1c30cb78a25df71b7892f1a4a15449537fb3
> INFO: Starting docker-py tests...
> Traceback (most recent call last):
>   File "/usr/local/bin/pytest", line 10, in <module>
>     sys.exit(main())
>   File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 61, in main
>     config = _prepareconfig(args, plugins)
>   File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 182, in _prepareconfig
>     config = get_config()
>   File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 156, in get_config
>     pluginmanager.import_plugin(spec)
>   File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 530, in import_plugin
>     __import__(importspec)
>   File "/usr/local/lib/python3.6/site-packages/_pytest/tmpdir.py", line 25, in <module>
>     class TempPathFactory(object):
>   File "/usr/local/lib/python3.6/site-packages/_pytest/tmpdir.py", line 35, in TempPathFactory
>     lambda p: Path(os.path.abspath(six.text_type(p)))
> TypeError: attrib() got an unexpected keyword argument 'convert'
> Sending interrupt signal to process
> Terminated
> script returned exit code 143

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin
Copy link
Contributor Author

This should fix make test-docker-py in moby/moby master. Steps to repro:

git clone https://github.com/moby/moby && cd moby && make test-docker-py

Result:

...
Starting dockerd
.
INFO: Building docker-sdk-python3:4.0.2...
sha256:5b2a11356e6f6a1bc78568cde08d47132fa81805d86cc955a8435a96d6d188bb
INFO: Starting docker-py tests...
Traceback (most recent call last):
  File "/usr/local/bin/pytest", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 61, in main
    config = _prepareconfig(args, plugins)
  File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 182, in _prepareconfig
    config = get_config()
  File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 156, in get_config
    pluginmanager.import_plugin(spec)
  File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 530, in import_plugin
    __import__(importspec)
  File "/usr/local/lib/python3.6/site-packages/_pytest/tmpdir.py", line 25, in <module>
    class TempPathFactory(object):
  File "/usr/local/lib/python3.6/site-packages/_pytest/tmpdir.py", line 35, in TempPathFactory
    lambda p: Path(os.path.abspath(six.text_type(p)))
TypeError: attrib() got an unexpected keyword argument 'convert'

@kolyshkin
Copy link
Contributor Author

@shin- PTAL

@thaJeztah
Copy link
Member

Failure looks to be unrelated; https://ci.docker.com/public/blue/rest/organizations/jenkins/pipelines/docker-py/branches/PR-2441/runs/1/nodes/68/log/?start=0


=================================== FAILURES ===================================
______________________ PruneImagesTest.test_prune_images _______________________
tests/integration/api_image_test.py:327: in test_prune_images
    img_id = self.client.inspect_image('hello-world')['Id']
docker/utils/decorators.py:19: in wrapped
    return f(self, resource_id, *args, **kwargs)
docker/api/image.py:246: in inspect_image
    self._get(self._url("/images/{0}/json", image)), True
docker/api/client.py:267: in _result
    self._raise_for_status(response)
docker/api/client.py:263: in _raise_for_status
    raise create_api_error_from_http_exception(e)
docker/errors.py:31: in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
E   ImageNotFound: 404 Client Error: Not Found ("no such image: hello-world: No such image: hello-world:latest")

@thaJeztah
Copy link
Member

I wonder if py-test should pin its dependencies to major versions, as this clearly broke older versions of py-test?

@thaJeztah
Copy link
Member

@chris-crone @ulyssessouza PTAL

Copy link
Contributor

@ulyssessouza ulyssessouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kolyshkin
Copy link
Contributor Author

I wonder if py-test should pin its dependencies to major versions, as this clearly broke older versions of py-test?

Ideally, yes, they should, although in this case once it's broken it's too late

@kolyshkin
Copy link
Contributor Author

@ulyssessouza @rumpl @shin- is it possible to prepare/tag a release containing this PR?

@shin-
Copy link
Contributor

shin- commented Oct 2, 2019

@kolyshkin I'm going to be offline for a couple of weeks starting tomorrow, so if @ulyssessouza or @rumpl can take the lead on that that'd be ideal! Thanks guys :)

@thaJeztah
Copy link
Member

thaJeztah commented Oct 2, 2019

@shin- I see there's one (unresolved) issue on the 4.1.0 milestone; #2355 - is that a blocker for 4.1.0, or was it just put on the milestone "tentatively" ?

To check what the next tag should be (4.1.0 or 4.0.3); looking through the changes, most changes are fixes;

I think (may want to double-check) that #2333 is the only feature that was added; if that's indeed a feature, then it should be 4.1.0

@ulyssessouza @shin- ^^

@shin-
Copy link
Contributor

shin- commented Oct 2, 2019

@shin- I see there's one (unresolved) issue on the 4.1.0 milestone; #2355 - is that a blocker for 4.1.0, or was it just put on the milestone "tentatively" ?

Not a blocker, more of a wish 😅

To check what the next tag should be (4.1.0 or 4.0.3); looking through the changes, most changes are fixes;

I think (may want to double-check) that #2333 is the only feature that was added; if that's indeed a feature, then it should be 4.1.0

@ulyssessouza @shin- ^^

I'd go ahead and release 4.1.0 without #2355 (which we can move into the next milestone)

@thaJeztah
Copy link
Member

Thanks! Looks like we have a way forward 👍

@chris-crone chris-crone added this to the 4.1.0 milestone Oct 3, 2019
@chris-crone
Copy link
Member

@kolyshkin @thaJeztah We'll do a release ASAP.

@chris-crone
Copy link
Member

Release is up

@thaJeztah
Copy link
Member

awesome, thanks!

@thaJeztah
Copy link
Member

PR opened in moby; moby/moby#40034

@kolyshkin
Copy link
Contributor Author

Awesome, thank you everyone! 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants