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 from 7.4.4 to 8.0.0 #177

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Bump pytest from 7.4.4 to 8.0.0 #177

merged 1 commit into from
Feb 12, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 29, 2024

Bumps pytest from 7.4.4 to 8.0.0.

Release notes

Sourced from pytest's releases.

pytest 8.0.0 (2024-01-27)

See 8.0.0rc1 and 8.0.0rc2 for the full changes since pytest 7.4!

Bug Fixes

  • #11842: Properly escape the reason of a skip <pytest.mark.skip ref>{.interpreted-text role="ref"} mark when writing JUnit XML files.
  • #11861: Avoid microsecond exceeds 1_000_000 when using log-date-format with %f specifier, which might cause the test suite to crash.

8.0.0rc2

pytest 8.0.0rc2 (2024-01-17)

Improvements

  • #11233: Improvements to -r for xfailures and xpasses:
    • Report tracebacks for xfailures when -rx is set.
    • Report captured output for xpasses when -rX is set.
    • For xpasses, add - in summary between test name and reason, to match how xfail is displayed.
  • #11825: The pytest_plugin_registered{.interpreted-text role="hook"} hook has a new plugin_name parameter containing the name by which plugin is registered.

Bug Fixes

  • #11706: Fix reporting of teardown errors in higher-scoped fixtures when using [--maxfail]{.title-ref} or [--stepwise]{.title-ref}.

  • #11758: Fixed IndexError: string index out of range crash in if highlighted[-1] == "\n" and source[-1] != "\n". This bug was introduced in pytest 8.0.0rc1.

  • #9765, #11816: Fixed a frustrating bug that afflicted some users with the only error being assert mod not in mods. The issue was caused by the fact that str(Path(mod)) and mod.__file__ don't necessarily produce the same string, and was being erroneously used interchangably in some places in the code.

    This fix also broke the internal API of PytestPluginManager.consider_conftest by introducing a new parameter -- we mention this in case it is being used by external code, even if marked as private.

pytest 8.0.0rc1 (2023-12-30)

See https://docs.pytest.org/en/latest/changelog.html#pytest-8-0-0rc1-2023-12-30 for the rendered changelog.

Breaking Changes

Old Deprecations Are Now Errors

  • #7363: PytestRemovedIn8Warning deprecation warnings are now errors by default.

    Following our plan to remove deprecated features with as little disruption as possible, all warnings of type PytestRemovedIn8Warning now generate errors instead of warning messages by default.

    The affected features will be effectively removed in pytest 8.1, so please consult the deprecations{.interpreted-text role="ref"} section in the docs for directions on how to update existing code.

    In the pytest 8.0.X series, it is possible to change the errors back into warnings as a stopgap measure by adding this to your pytest.ini file:

    [pytest]

... (truncated)

Commits
  • 478f823 Prepare release version 8.0.0
  • 6085900 [8.0.x] fix: avoid rounding microsecond to 1_000_000 (#11863)
  • 3b41c65 [8.0.x] Escape skip reason in junitxml (#11845)
  • 747072a [8.0.x] Update docstring of scripts/generate-gh-release-notes.py (#11768)
  • 011a475 Properly attach packages to the GH release notes (#11839) (#11840)
  • 97960bd Merge pull request #11835 from pytest-dev/release-8.0.0rc2
  • 6be0a3c Prepare release version 8.0.0rc2
  • 44ffe07 Merge pull request #11837 from pytest-dev/backport-11836-to-8.0.x
  • 14ecb04 [8.0.x] testing: temporarily disable test due to hypothesis issue
  • 41c8dab Merge pull request #11831 from bluetech/backport-11825-to-8.0.x
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jan 29, 2024
@cclauss
Copy link
Contributor

cclauss commented Jan 30, 2024

There are three Python syntax warnings in python-memcached that have been fixed so perhaps upgrading that dependency is a good idea.

pytest output...

Installing the current project: pytest-celery (1.0.0b1)
xdist: commands[0]> poetry run pytest tests --exitfirst -n auto --dist=loadscope --reruns 5 --rerun-except AssertionError
/home/runner/work/pytest-celery/pytest-celery/.tox/xdist/lib/python3.12/site-packages/memcache.py:110: SyntaxWarning: invalid escape sequence '\ '
"""Object representing a pool of memcache servers.
/home/runner/work/pytest-celery/pytest-celery/.tox/xdist/lib/python3.12/site-packages/memcache.py:1303: SyntaxWarning: "is" with 'str' literal. Did you mean "=="?
if key is '':
/home/runner/work/pytest-celery/pytest-celery/.tox/xdist/lib/python3.12/site-packages/memcache.py:1304: SyntaxWarning: "is" with 'int' literal. Did you mean "=="?
if key_extra_len is 0:

@cclauss
Copy link
Contributor

cclauss commented Jan 30, 2024

The main issue seems to be AttributeError: 'CallSpec2' object has no attribute 'funcargs'...

@Nusnus Nusnus self-requested a review January 30, 2024 18:42
@Nusnus Nusnus self-assigned this Jan 30, 2024
@Nusnus
Copy link
Member

Nusnus commented Jan 30, 2024

There are three Python syntax warnings in python-memcached that have been fixed so perhaps upgrading that dependency is a good idea.

pytest output...

Installing the current project: pytest-celery (1.0.0b1)
xdist: commands[0]> poetry run pytest tests --exitfirst -n auto --dist=loadscope --reruns 5 --rerun-except AssertionError
/home/runner/work/pytest-celery/pytest-celery/.tox/xdist/lib/python3.12/site-packages/memcache.py:110: SyntaxWarning: invalid escape sequence '\ '
"""Object representing a pool of memcache servers.
/home/runner/work/pytest-celery/pytest-celery/.tox/xdist/lib/python3.12/site-packages/memcache.py:1303: SyntaxWarning: "is" with 'str' literal. Did you mean "=="?
if key is '':
/home/runner/work/pytest-celery/pytest-celery/.tox/xdist/lib/python3.12/site-packages/memcache.py:1304: SyntaxWarning: "is" with 'int' literal. Did you mean "=="?
if key_extra_len is 0:

This is coming from celery[pymemcache].
As the latest Celery release uses python-memcached v1.59 (which has these warnings) and Celery main uses python-memcached v1.62 (which fixes it), without releasing Celery it will not take the updated version, and without a valid argument, I prefer to avoid adding an explicit dep to manually take the updated version as it will force us to sync this project’s dep’s versions with Celery, instead of “inheriting” it from the extras.

This means that after releasing Celery, the pytest-celery[celery] will take the updated version of python-memcached, which will cause these warnings to disappear without making any change.

celery = { version = "<6.0.0", extras = [
    "redis",
    "pymemcache",
], optional = true }

If the version here was for example version = “>=5.4.0rc1”, then the above will apply and the warnings will go away.

@dependabot dependabot bot force-pushed the dependabot/pip/pytest-8.0.0 branch from 421a5ca to 0d43dd3 Compare February 2, 2024 13:54
@cclauss
Copy link
Contributor

cclauss commented Feb 2, 2024

The culprit seems to be pytest-lazy-fixture being installed via pyproject.toml...

celery[pymemcache] does NOT import pymemcache but instead imports python-memcached which is counterintuitive.

@Nusnus
Copy link
Member

Nusnus commented Feb 3, 2024

@cclauss

celery[pymemcache] does NOT import pymemcache but instead imports python-memcached which is counterintuitive.

This is a celery issue, but I agree it's confusing.
I also fell for it 😉

@cclauss cclauss mentioned this pull request Feb 4, 2024
@dependabot dependabot bot force-pushed the dependabot/pip/pytest-8.0.0 branch 2 times, most recently from 447e9ac to 8848a59 Compare February 12, 2024 15:57
@Nusnus
Copy link
Member

Nusnus commented Feb 12, 2024

@dependabot rebase

Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.4 to 8.0.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@7.4.4...8.0.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/pip/pytest-8.0.0 branch from 8848a59 to fcc6720 Compare February 12, 2024 22:38
Copy link

codecov bot commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (90ed9a2) 28.36% compared to head (fcc6720) 28.36%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #177   +/-   ##
=======================================
  Coverage   28.36%   28.36%           
=======================================
  Files          36       36           
  Lines        1040     1040           
  Branches      209      209           
=======================================
  Hits          295      295           
  Misses        717      717           
  Partials       28       28           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Nusnus Nusnus merged commit c78c2cf into main Feb 12, 2024
29 checks passed
@Nusnus Nusnus deleted the dependabot/pip/pytest-8.0.0 branch February 12, 2024 23:01
@Nusnus
Copy link
Member

Nusnus commented Feb 12, 2024

FYI @cclauss

@cclauss
Copy link
Contributor

cclauss commented Feb 13, 2024

Rock and roll!!🎸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants