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

pytest 6.2 release planning #8101

Closed
bluetech opened this issue Dec 5, 2020 · 18 comments · Fixed by #8130
Closed

pytest 6.2 release planning #8101

bluetech opened this issue Dec 5, 2020 · 18 comments · Fixed by #8130
Assignees
Milestone

Comments

@bluetech
Copy link
Member

bluetech commented Dec 5, 2020

I'd like to release pytest 6.2 next Saturday (2020-12-12). Please let me know if you have any comments or reservations.

One thing is #7695, I plan to take care of it until then (probably by merging).

@bluetech bluetech added this to the 6.2 milestone Dec 5, 2020
@bluetech bluetech self-assigned this Dec 5, 2020
@nicoddemus
Copy link
Member

Sounds good! I meant to bring this up this week, but didn't have the time, thanks for stepping in. 👍

@bluetech
Copy link
Member Author

@pytestbot please prepare release from 6.2.x

@pytestbot
Copy link
Contributor

Found features or breaking changes in 6.2.x, and feature releases can only be
created from master:

  • 5299.feature.rst
  • 7425.feature.rst
  • 7695.feature.rst
  • 7808.breaking.rst
  • 8006.feature.rst

@bluetech
Copy link
Member Author

@pytestbot please prepare release from master

@pytestbot
Copy link
Contributor

The request to prepare release 6.2.0 from master failed with:

CalledProcessError
output:

stderr:
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.6/x64/bin/tox", line 8, in <module>
    sys.exit(cmdline())
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/tox/session/__init__.py", line 44, in cmdline
    main(args)
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/tox/session/__init__.py", line 65, in main
    config = load_config(args)
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/tox/session/__init__.py", line 81, in load_config
    config = parseconfig(args)
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/tox/config/__init__.py", line 278, in parseconfig
    ParseIni(config, config_file, content)
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/tox/config/__init__.py", line 1201, in __init__
    self.handle_provision(config, reader)
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/tox/config/__init__.py", line 1275, in handle_provision
    deps = self.ensure_requires_satisfied(config, requires_list, min_version)
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/tox/config/__init__.py", line 1324, in ensure_requires_satisfied
    raise tox.exception.Error(msg.format(sys.executable, missing_requirements))
tox.exception.Error: Error: break infinite loop provisioning within /opt/hostedtoolcache/Python/3.8.6/x64/bin/python missing ['pip>=20.3.1']

See: https://github.com/pytest-dev/pytest/actions/runs/417584552.

@bluetech
Copy link
Member Author

@pytestbot please prepare release from master

@pytestbot
Copy link
Contributor

The request to prepare release 6.2.0 from master failed with:

CalledProcessError
output:
release create: /home/runner/work/pytest/pytest/.tox/release
release installdeps: colorama, github3.py, pre-commit>=2.9.3, wheel, towncrier
release develop-inst: /home/runner/work/pytest/pytest
release installed: appdirs==1.4.4,argcomplete==1.12.2,attrs==20.3.0,certifi==2020.12.5,cffi==1.14.4,cfgv==3.2.0,chardet==3.0.4,click==7.1.2,colorama==0.4.4,cryptography==3.3.1,distlib==0.3.1,elementpath==2.0.5,filelock==3.0.12,github3.py==1.3.0,hypothesis==5.43.3,identify==1.5.10,idna==2.10,incremental==17.5.0,iniconfig==1.1.1,Jinja2==2.11.2,jwcrypto==0.8,MarkupSafe==1.1.1,mock==4.0.3,nodeenv==1.5.0,nose==1.3.7,packaging==20.8,pluggy==0.13.1,pre-commit==2.9.3,py==1.10.0,pycparser==2.20,pyparsing==2.4.7,-e git+https://github.com/pytest-dev/pytest@d51ecbd44d7e2f4f8c21f246fe9ed034bc8bae5b#egg=pytest,python-dateutil==2.8.1,PyYAML==5.3.1,requests==2.25.0,six==1.15.0,sortedcontainers==2.3.0,toml==0.10.2,towncrier==19.2.0,uritemplate==3.0.1,urllib3==1.26.2,virtualenv==20.2.2,xmlschema==1.3.1
release run-test-pre: PYTHONHASHSEED='2070991850'
release run-test: commands[0] | python scripts/release.py 6.2.0 --skip-check-links
[generate.announce] Generated release-6.2.0.rst
[generate.announce] Updated index.rst
[generate.regen] Updating docs
.package create: /home/runner/work/pytest/pytest/.tox/.package
.package installdeps: setuptools>=42.0, setuptools-scm[toml]>=3.4, wheel
regen create: /home/runner/work/pytest/pytest/.tox/regen
regen installdeps: dataclasses, PyYAML, regendoc>=0.6.1, sphinx
ERROR: invocation failed (exit code 1), logfile: /home/runner/work/pytest/pytest/.tox/regen/log/regen-1.log
================================== log start ===================================
Collecting dataclasses
  Downloading dataclasses-0.6-py3-none-any.whl (14 kB)
Collecting PyYAML
  Using cached PyYAML-5.3.1-cp38-cp38-linux_x86_64.whl
Collecting regendoc>=0.6.1
  Downloading regendoc-0.6.1.tar.gz (5.8 kB)
ERROR: Requested regendoc>=0.6.1 from https://files.pythonhosted.org/packages/a8/5d/206e4951420bf5bbe1475c66eb06ec40d9177035e223858fee890eed0188/regendoc-0.6.1.tar.gz#sha256=db1e8c9ae02c1af559eae105bfd77ba41ed07fc8ca7030ea59db5f3f161236a4 has different version in metadata: '6.2.0'

=================================== log end ====================================
ERROR: could not install deps [dataclasses, PyYAML, regendoc>=0.6.1, sphinx]; v = InvocationError("/home/runner/work/pytest/pytest/.tox/regen/bin/python -m pip install dataclasses PyYAML 'regendoc>=0.6.1' sphinx", 1)
___________________________________ summary ____________________________________
ERROR:   regen: could not install deps [dataclasses, PyYAML, regendoc>=0.6.1, sphinx]; v = InvocationError("/home/runner/work/pytest/pytest/.tox/regen/bin/python -m pip install dataclasses PyYAML 'regendoc>=0.6.1' sphinx", 1)
Traceback (most recent call last):
  File "scripts/release.py", line 120, in <module>
    main()
  File "scripts/release.py", line 116, in main
    pre_release(options.version, skip_check_links=options.skip_check_links)
  File "scripts/release.py", line 87, in pre_release
    regen(version)
  File "scripts/release.py", line 64, in regen
    check_call(
  File "/opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['tox', '-e', 'regen']' returned non-zero exit status 1.
ERROR: InvocationError for command /home/runner/work/pytest/pytest/.tox/release/bin/python scripts/release.py 6.2.0 --skip-check-links (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   release: commands failed

stderr:

See: https://github.com/pytest-dev/pytest/actions/runs/417633005.

@bluetech
Copy link
Member Author

The problem above is described in this commit message:

tox: workaround SETUPTOOLS_SCM_PRETEND_VERSION failing pip install regendoc

The env var effects all of the pip installs, including regendoc which
also uses setuptools-scm, so it gets the wrong version, and fails to
install with the new pip resolver:

    ERROR: Requested regendoc from https://files.pythonhosted.org/packages/a8/5d/206e4951420bf5bbe1475c66eb06ec40d9177035e223858fee890eed0188/regendoc-0.6.1.tar.gz#sha256=db1e8c9ae02c1af559eae105bfd77ba41ed07fc8ca7030ea59db5f3f161236a4 has different version in metadata: '6.2.0'

The fix in that commit is to use SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST instead of SETUPTOOLS_SCM_PRETEND_VERSION. But I found out that @RonnyPfannschmidt only added this feature to setuptools-scm very recently and it's not released yet, so doesn't work yet.

@bluetech
Copy link
Member Author

@pytestbot please prepare release from master

@pytestbot
Copy link
Contributor

As requested, opened a PR for release 6.2.0: #8127.

@RonnyPfannschmidt
Copy link
Member

@bluetech let me do that release then right now

@RonnyPfannschmidt
Copy link
Member

@bluetech the release is now available in setuptools_scm 5.0.0

@bluetech
Copy link
Member Author

@RonnyPfannschmidt great, thanks.

I figure that in order for CI to to pick it up I'll need to require it somewhere, or maybe it always picks the latest? Let me try.

And there was also another problem in the PR pytestbot created that I need to take care of... I have thoroughly bad luck with pytest releases 😁

@bluetech
Copy link
Member Author

@RonnyPfannschmidt I can't quite get it to work, I'll leave it for the next time. For reference here's what I tried:

diff --git a/pyproject.toml b/pyproject.toml
index dd4be6c22..444c92537 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -2,7 +2,7 @@
 requires = [
   # sync with setup.py until we discard non-pep-517/518
   "setuptools>=42.0",
-  "setuptools-scm[toml]>=3.4",
+  "setuptools-scm[toml]>=5.0",
   "wheel",
 ]
 build-backend = "setuptools.build_meta"
diff --git a/scripts/release.py b/scripts/release.py
index 798e42e1f..5bd8f9efb 100644
--- a/scripts/release.py
+++ b/scripts/release.py
@@ -63,7 +63,7 @@ def regen(version):
     print(f"{Fore.CYAN}[generate.regen] {Fore.RESET}Updating docs")
     check_call(
         ["tox", "-e", "regen"],
-        env={**os.environ, "SETUPTOOLS_SCM_PRETEND_VERSION": version},
+        env={**os.environ, "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST": version},
     )
 
 
diff --git a/setup.cfg b/setup.cfg
index 09c07d5bb..70dd3703e 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -53,7 +53,7 @@ package_dir =
     =src
 setup_requires =
     setuptools>=>=42.0
-    setuptools-scm>=3.4
+    setuptools-scm>=5.0
 zip_safe = no
 
 [options.entry_points]
diff --git a/tox.ini b/tox.ini
index f0cfaa460..4107560d1 100644
--- a/tox.ini
+++ b/tox.ini
@@ -84,10 +84,7 @@ commands =
 [testenv:regen]
 changedir = doc/en
 basepython = python3
-passenv = SETUPTOOLS_SCM_PRETEND_VERSION
-# TODO: When setuptools-scm 5.0.0 is released, use SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST
-# and remove the next line.
-install_command=python -m pip --use-deprecated=legacy-resolver install {opts} {packages}
+passenv = SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST
 deps =
     dataclasses
     PyYAML
@@ -114,7 +111,7 @@ deps = -rtesting/plugins_integration/requirements.txt
 setenv =
     PYTHONPATH=.
     # due to pytest-rerunfailures requiring 6.2+; can be removed after 6.2.0
-    SETUPTOOLS_SCM_PRETEND_VERSION=6.2.0a1
+    SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST=6.2.0a1
 commands =
     pip check
     pytest bdd_wallet.py

@RonnyPfannschmidt
Copy link
Member

@bluetech given this year i would consider it a plus if the bad luck falls onto releasing instead the rest of the hellscape

Should I dig into the details tommorow to see if its a issue with pip or setuptools_scm?

@bluetech
Copy link
Member Author

@RonnyPfannschmidt hehe

Should I dig into the details tommorow to see if its a issue with pip or setuptools_scm?

If you could check it that would be great, I assume there is some place else where the >=5.0.0 needs to be specified but I'm using the existing workaround for now.

@bluetech
Copy link
Member Author

@pytestbot please prepare release from master

@pytestbot
Copy link
Contributor

As requested, opened a PR for release 6.2.0: #8130.

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 a pull request may close this issue.

4 participants