From Fedora Project Wiki

Pytest 8

Summary

Update to a new upstream release of pytest that is not completely compatible with previous releases. Pytest 8 is a major upstream release removing a lot of deprecated functions and introducing breaking changes.

Owner


Current status

  • Targeted release: Fedora Linux 41
  • Last updated: 2024-04-03
  • FESCo issue:
  • Tracker bug:
  • Release notes tracker:

Detailed Description

Pytest is a popular Python framework for writing tests. The 8th major release brings various improvements. The most notable enhancements are:

  • The diffs that pytest prints when an assertion fails were improved.
  • Added the new verbosity_assertions configuration option for fine-grained control of failed assertions verbosity.
  • Additional support for exception groups and __notes__
  • custom directory collectors
  • “new-style” hook wrappers are now used internally

Breaking changes:

  • PytestRemovedIn8Warning deprecation warnings are now errors by default
  • Several breaking changes to pytest’s collection phase, particularly around how filesystem directories and Python packages are collected, fixing deficiencies and allowing for cleanups and improvements to pytest’s internals.
  • Sanitized the handling of the default parameter when defining configuration options
  • pytest’s setup.py file is removed
  • warns() now re-emits unmatched warnings when the context closes – previously it would consume all warnings, hiding those that were not matched by the function
  • The internal FixtureManager.getfixtureclosure method has changed. Plugins which use this method or which subclass FixtureManager and overwrite that method will need to adapt to the change.

List of packages that will likely fail to build. Maintainers by package: cffconvert iztokf cloud-init dustymabe gholms larsks mhayden otubo copr-backend frostyx msuchy praiskup copr-frontend frostyx msuchy praiskup copr-rpmbuild frostyx praiskup fedmsg kevin git-up ekohl h5py orion stevetraylen terjeros httpie churchyard codeblock mikelo2 ipython churchyard cstratak ignatenkobrain lbalhar mrunge salimma tomspur jrnl music mu churchyard kushal pg_activity mikelo2 python-APScheduler mmassari zuul python-aiohttp-cors kwizart python-alembic frantisekz python-ase besser82 marcindulak python-astropy orion sergiopr python-atpublic abompard jonathanspw python-attrs churchyard lbalhar python-aws-sam-translator music python-bluepyopt ankursinha python-boto3 cstratak fale limb python-chalice dcavalca python-contextily qulogic python-cssutils kevin python-dbus-next alebastr python-dirhash cottsay python-django-extensions aekoroglu ngompa salimma python-earthpy iztokf python-ecdsa brouhaha jonathanspw orion python-efel ankursinha python-fastjsonschema thrnciar python-fiona qulogic python-fslpy ankursinha python-geopandas qulogic python-geoplot qulogic python-glob2 jujens python-graphviz eclipseo mairacanal python-hid-parser rathann python-ipykernel churchyard pcpa python-ipywidgets lbalhar python-josepy nb python-kombu fab frantisekz mrunge ngompa pingou pjp python-lexicon mhayden pghmcfc python-libpysal qulogic python-mapclassify qulogic python-marshmallow-enum fab python-mathics-pygments dcavalca python-mirrors-countme asaleh nphilipp python-mne ankursinha ignatenkobrain python-mplcursors qulogic python-networkx jjames plautrba python-nibabel ankursinha ignatenkobrain python-nikola jamatos maxamillion python-notebook churchyard ksurma lbalhar python-oci mhayden python-openapi-core mattia music python-opentelemetry mhayden music pwouters rominf python-papermill ankursinha python-paramiko ignatenkobrain limb orion pghmcfc sgallagh python-parsel jonathanspw python-pem mhayden python-pint jcapitao lzachar mrunge python-prettytable apevec clalance python-pydantic gotmax23 music nikromen python-pymeeus fab python-pynwb lbazan python-pysaml2 apevec python-pytest-cases zbyszek python-pytest-forked swt2c python-pytest-lazy-fixture ankursinha mikelo2 python-pytest-mpi orion python-pytest-postgresql mikelo2 python-pytest-relaxed jkucera python-pytest-xdist swt2c python-qudida thunderbirdtr python-rasterio qulogic python-remoto branto fsimonce jcaratzas ktdreyer python-requests abompard cstratak jcline sagarun python-requests-credssp fab python-responses athoscr fschwarz salimma python-sentry-sdk edward-evans-aiven elisre italomga nickfarrell pwouters rominf rommell python-service-identity carlwgeorge eclipseo python-sybil fab python-textual jonathanspw python-tpm2-pytss jjelen python-trustme carlwgeorge jcaratzas python-uranium churchyard gferon python-uvicorn carlwgeorge python-vine frantisekz mrunge ngompa pingou python-virtualenv churchyard cstratak lbalhar mhayden mrunge orion python-werkzeug abompard codeblock frantisekz hguemar tdawson python-willow lyessaadi rpy alexlan jamatos scipy cstratak mmuzila nforro orion psimovec tomspur ttomecek thefuck principis yt-dlp gotmax23 mikelo2 yubikey-manager gbcox orion

Packages by maintainer: abompard python-atpublic python-requests python-werkzeug aekoroglu python-django-extensions alebastr python-dbus-next alexlan rpy ankursinha python-bluepyopt python-efel python-fslpy python-mne python-nibabel python-papermill python-pytest-lazy-fixture apevec python-prettytable python-pysaml2 asaleh python-mirrors-countme athoscr python-responses besser82 python-ase branto python-remoto brouhaha python-ecdsa carlwgeorge python-service-identity python-trustme python-uvicorn churchyard httpie ipython mu python-attrs python-ipykernel python-notebook python-uranium python-virtualenv clalance python-prettytable codeblock httpie python-werkzeug cottsay python-dirhash cstratak ipython python-boto3 python-requests python-virtualenv scipy dcavalca python-chalice python-mathics-pygments dustymabe cloud-init eclipseo python-graphviz python-service-identity edward-evans-aiven python-sentry-sdk ekohl git-up elisre python-sentry-sdk fab python-kombu python-marshmallow-enum python-pymeeus python-requests-credssp python-sybil fale python-boto3 frantisekz python-alembic python-kombu python-vine python-werkzeug frostyx copr-backend copr-frontend copr-rpmbuild fschwarz python-responses fsimonce python-remoto gbcox yubikey-manager gferon python-uranium gholms cloud-init gotmax23 python-pydantic yt-dlp hguemar python-werkzeug ignatenkobrain ipython python-mne python-nibabel python-paramiko italomga python-sentry-sdk iztokf cffconvert python-earthpy jamatos python-nikola rpy jcapitao python-pint jcaratzas python-remoto python-trustme jcline python-requests jjames python-networkx jjelen python-tpm2-pytss jkucera python-pytest-relaxed jonathanspw python-atpublic python-ecdsa python-parsel python-textual jujens python-glob2 kevin fedmsg python-cssutils ksurma python-notebook ktdreyer python-remoto kushal mu kwizart python-aiohttp-cors larsks cloud-init lbalhar ipython python-attrs python-ipywidgets python-notebook python-virtualenv lbazan python-pynwb limb python-boto3 python-paramiko lyessaadi python-willow lzachar python-pint mairacanal python-graphviz marcindulak python-ase mattia python-openapi-core maxamillion python-nikola mhayden cloud-init python-lexicon python-oci python-opentelemetry python-pem python-virtualenv mikelo2 httpie pg_activity python-pytest-lazy-fixture python-pytest-postgresql yt-dlp mmassari python-APScheduler mmuzila scipy mrunge ipython python-kombu python-pint python-vine python-virtualenv msuchy copr-backend copr-frontend music jrnl python-aws-sam-translator python-openapi-core python-opentelemetry python-pydantic nb python-josepy nforro scipy ngompa python-django-extensions python-kombu python-vine nickfarrell python-sentry-sdk nikromen python-pydantic nphilipp python-mirrors-countme orion h5py python-astropy python-ecdsa python-paramiko python-pytest-mpi python-virtualenv scipy yubikey-manager otubo cloud-init pcpa python-ipykernel pghmcfc python-lexicon python-paramiko pingou python-kombu python-vine pjp python-kombu plautrba python-networkx praiskup copr-backend copr-frontend copr-rpmbuild principis thefuck psimovec scipy pwouters python-opentelemetry python-sentry-sdk qulogic python-contextily python-fiona python-geopandas python-geoplot python-libpysal python-mapclassify python-mplcursors python-rasterio rathann python-hid-parser rominf python-opentelemetry python-sentry-sdk rommell python-sentry-sdk sagarun python-requests salimma ipython python-django-extensions python-responses sergiopr python-astropy sgallagh python-paramiko stevetraylen h5py swt2c python-pytest-forked python-pytest-xdist tdawson python-werkzeug terjeros h5py thrnciar python-fastjsonschema thunderbirdtr python-qudida tomspur ipython scipy ttomecek scipy zbyszek python-pytest-cases zuul python-APScheduler

Benefit to Fedora

Fedora offers cutting-edge technologies for Python and pytest is one of the most important Python packages. By doing this update we bring users the latest features that pytest offers and also we enable Fedora 41 to receive future updates as well.

Scope

  • Proposal owners: update pytest to 8.x.x, provide help
  • Policies and guidelines: N/A (not needed for this Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives:

Upgrade/compatibility impact

There is a clean upgrade path from current version to pytest 8.x.x. Fedora users using RPM-packaged Pytest will use pytest 8.x.x by default.


How To Test

  • Find the package you want to update in this copr repository and check the build logs to determine the fail cause.
  • Work with the upstream to resolve the issue.
  • When updating the package, you can test it using the same copr repository where the latest version of pytest has been built.
  • Let us know if something doesn't work as it should.

User Experience

Regular distro users shouldn't notice any change in pytest behaviour, except for packages using removed functions. Such packages will fail and should be fixed by their maintainers.

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change)

Documentation

Pytest changelog

This page is the documentation.

Release Notes