|
|
|
|
Changelog for python312-pytest-7.0.1-5.49.noarch.rpm :
* Wed Jun 28 2023 Victor Zhestkov - Update to 7.0.1 * Big changelog for 7.x series, see https://docs.pytest.org/en/7.0.x/changelog.html for details- Bug fixes: * #9608: Fix invalid importing of importlib.readers in Python 3.9. * #9610: Restore UnitTestFunction.obj to return unbound rather than bound method. Fixes a crash during a failed teardown in unittest TestCases with non-default __init__. Regressed in pytest 7.0.0. * #9636: The pythonpath plugin was renamed to python_path. This avoids a conflict with the pytest-pythonpath plugin. * #9642: Fix running tests by id with :: in the parametrize portion. * #9643: Delay issuing a PytestWarning about diamond inheritance involving Item and Collector so it can be filtered using standard warning filters. * #9355: Fixed error message prints function decorators when using assert in Python 3.8 and above. * #9396: Ensure pytest.Config.inifile is available during the pytest_cmdline_main hook (regression during 7.0.0rc1). * #7124: Fixed an issue where __main__.py would raise an ImportError when --doctest-modules was provided. * #8061: Fixed failing staticmethod test cases if they are inherited from a parent test class. * #8192: testdir.makefile now silently accepts values which don’t start with . to maintain backward compatibility with older pytest versions. pytester.makefile now issues a clearer error if the . is missing in the ext argument. * #8258: Fixed issue where pytest’s faulthandler support would not dump traceback on crashes if the faulthandler module was already enabled during pytest startup (using python -X dev -m pytest for example). * #8317: Fixed an issue where illegal directory characters derived from getpass.getuser() raised an OSError. * #8367: Fix Class.from_parent so it forwards extra keyword arguments to the constructor. * #8377: The test selection options pytest -k and pytest -m now support matching names containing forward slash (/) characters. * #8384: The AATTpytest.mark.skip decorator now correctly handles its arguments. When the reason argument is accidentally given both positional and as a keyword (e.g. because it was confused with skipif), a TypeError now occurs. Before, such tests were silently skipped, and the positional argument ignored. Additionally, reason is now documented correctly as positional or keyword (rather than keyword-only). * #8394: Use private names for internal fixtures that handle classic setup/teardown so that they don’t show up with the default --fixtures invocation (but they still show up with --fixtures -v). * #8456: The required_plugins config option now works correctly when pre-releases of plugins are installed, rather than falsely claiming that those plugins aren’t installed at all. * #8464: -c now also properly defines rootdir as the directory that contains . * #8503: pytest.MonkeyPatch.syspath_prepend() no longer fails when setuptools is not installed. It now only calls pkg_resources.fixup_namespace_packages() if pkg_resources was previously imported, because it is not needed otherwise. * #8548: Introduce fix to handle precision width in log-cli-format in turn to fix output coloring for certain formats. * #8796: Fixed internal error when skipping doctests. * #8983: The test selection options pytest -k and pytest -m now support matching names containing backslash (\\) characters. Backslashes are treated literally, not as escape characters (the values being matched against are already escaped). * #8990: Fix pytest -vv crashing with an internal exception AttributeError: \'str\' object has no attribute \'relative_to\' in some cases. * #9077: Fixed confusing error message when request.fspath / request.path was accessed from a session-scoped fixture. * #9131: Fixed the URL used by --pastebin to use bpa.st. * #9163: The end line number and end column offset are now properly set for rewritten assert statements. * #9169: Support for the files API from importlib.resources within rewritten files. * #9272: The nose compatibility module-level fixtures setup() and teardown() are now only called once per module, instead of for each test function. They are now called even if object-level setup/teardown is defined.- Deprecations: * #9488: If custom subclasses of nodes like pytest.Item override the __init__ method, they should take * *kwargs. See Constructors of custom pytest.Node subclasses should take * *kwargs for details. * #7259: py.path.local arguments for hooks have been deprecated. py.path.local arguments to Node constructors have been deprecated. * #7469: Directly constructing the following classes is now deprecated: _pytest.mark.structures.Mark _pytest.mark.structures.MarkDecorator _pytest.mark.structures.MarkGenerator _pytest.python.Metafunc _pytest.runner.CallInfo _pytest._code.ExceptionInfo _pytest.config.argparsing.Parser _pytest.config.argparsing.OptionGroup _pytest.pytester.HookRecorder * #8242: Raising unittest.SkipTest to skip collection of tests during the pytest collection phase is deprecated. Use pytest.skip() instead. * #8315: Several behaviors of Parser.addoption are now scheduled for removal in pytest 8 (deprecated since pytest 2.4.0): parser.addoption(..., help=\".. %default ..\") - use %(default)s instead. parser.addoption(..., type=\"int/string/float/complex\") - use type=int etc. instead. * #8447: Defining a custom pytest node type which is both an pytest.Item and a pytest.Collector (e.g. pytest.File) now issues a warning. It was never sanely supported and triggers hard to debug errors. * #8592: pytest_cmdline_preparse has been officially deprecated. It will be removed in a future release. Use pytest_load_initial_conftests instead. * #8645: pytest.warns(None) is now deprecated because many people used it to mean “this code does not emit warnings”, but it actually had the effect of checking that the code emits at least one warning of any type - like pytest.warns() or pytest.warns(Warning). * #8948: pytest.skip(msg=...), pytest.fail(msg=...) and pytest.exit(msg=...) signatures now accept a reason argument instead of msg. Using msg still works, but is deprecated and will be removed in a future release. This was changed for consistency with pytest.mark.skip and pytest.mark.xfail which both accept reason as an argument. * #8174: The following changes have been made to types reachable through pytest.ExceptionInfo.traceback: The path property of _pytest.code.Code returns Path instead of py.path.local. The path property of _pytest.code.TracebackEntry returns Path instead of py.path.local.- Breaking changes: * #7259: The Node.reportinfo() function first return value type has been expanded from py.path.local | str to os.PathLike[str] | str. * #8246: --version now writes version information to stdout rather than stderr. * #8733: Drop a workaround for pyreadline that made it work with --pdb. * #9061: Using pytest.approx() in a boolean context now raises an error hinting at the proper usage. * #9277: The pytest.Instance collector type has been removed. Importing pytest.Instance or _pytest.python.Instance returns a dummy type and emits a deprecation warning. * #9308: PytestRemovedIn7Warning deprecation warnings are now errors by default.- Features: * #5196: Tests are now ordered by definition order in more cases. * #7132: Added two environment variables PYTEST_THEME and PYTEST_THEME_MODE to let the users customize the pygments theme used. * #7259: Added cache.mkdir(), which is similar to the existing cache.makedir(), but returns a pathlib.Path instead of a legacy py.path.local. * #7469: The types of objects used in pytest’s API are now exported so they may be used in type annotations. * #7856: –import-mode=importlib now works with features that depend on modules being on sys.modules, such as pickle and dataclasses. * #8144: The following hooks now receive an additional pathlib.Path argument, equivalent to an existing py.path.local argument: pytest_ignore_collect - The collection_path parameter. pytest_collect_file - The file_path parameter. pytest_pycollect_makemodule - The module_path parameter. pytest_report_header - The start_path parameter. pytest_report_collectionfinish - The start_path parameter. * #8251: Implement Node.path as a pathlib.Path. Both the old fspath and this new attribute gets set no matter whether path or fspath (deprecated) is passed to the constructor. It is a replacement for the fspath attribute (which represents the same path as py.path.local). While fspath is not deprecated yet due to the ongoing migration of methods like reportinfo(), we expect to deprecate it in a future release. * #8421: pytest.approx() now works on Decimal within mappings/dicts and sequences/lists. * #8606: pytest invocations with --fixtures-per-test and --fixtures have been enriched with: Fixture location path printed with the fixture name. First section of the fixture’s docstring printed under the fixture name. Whole of fixture’s docstring printed under the fixture name using --verbose option. * #8761: New pytest.version_tuple attribute, which makes it simpler for users to do something depending on the pytest version (such as declaring hooks which are introduced in later versions). * #8789: Switch TOML parser from toml to tomli for TOML v1.0.0 support in pyproject.toml. * #8920: Added pytest.Stash, a facility for plugins to store their data on Config and Nodes in a type-safe and conflict-free manner. See Storing data on items across hook functions for details. * #8953: RunResult method assert_outcomes now accepts a warnings argument to assert the total number of warnings captured. * #8954: --debug flag now accepts a str file to route debug logs into, remains defaulted to pytestdebug.log. * #9023: Full diffs are now always shown for equality assertions of iterables when CI or BUILD_NUMBER is found in the environment, even when -v isn’t used. * #9113: RunResult method assert_outcomes now accepts a deselected argument to assert the total number of deselected tests. * #9114: Added pythonpath setting that adds listed paths to sys.path for the duration of the test session. If you currently use the pytest-pythonpath or pytest-srcpaths plugins, you should be able to replace them with built-in pythonpath setting.- Improvements: * #7480: A deprecation scheduled to be removed in a major version X (e.g. pytest 7, 8, 9, …) now uses warning category PytestRemovedInXWarning, a subclass of PytestDeprecationWarning, instead of PytestDeprecationWarning directly. * #7864: Improved error messages when parsing warning filters. * #8335: Improved pytest.approx() assertion messages for sequences of numbers. * #8403: By default, pytest will truncate long strings in assert errors so they don’t clutter the output too much, currently at 240 characters by default. * #8509: Fixed issue where unittest.TestCase.setUpClass() is not called when a test has / in its name since pytest 6.2.0. * #8803: It is now possible to add colors to custom log levels on cli log. * #8822: When showing fixture paths in --fixtures or --fixtures-by-test, fixtures coming from pytest itself now display an elided path, rather than the full path to the file in the site-packages directory. * #8898: Complex numbers are now treated like floats and integers when generating parameterization IDs. * #9062: --stepwise-skip now implicitly enables --stepwise and can be used on its own. * #9205: pytest.Cache.set() now preserves key order when saving dicts.- Drop patches * pytest-pr8664-py3.10-test_trial_error-fail.patch * pytest-pr9173-importlib-py310.patch * pytest-pr9417-py3.10.1-fail.patch * Tue Dec 28 2021 Ben Greiner - Add patch pytest-pr9173-importlib-py310.patch * gh#pytest-dev/pytest#9173 * refresh pytest-pr9417-py3.10.1-fail.patch * fixes asdf related errors: gh#asdf-format/asdf#1027 * Mon Dec 20 2021 Matej Cepl - Using URLs for Patches looks like a great idea, but it is too unstable. Please, don\'t. * Sun Dec 19 2021 Ben Greiner - Add pytest-pr8664-py3.10-test_trial_error-fail.patch * gh#pytest-dev/pytest#8664- Add pytest-pr9417-py3.10.1-fail.patch * gh#pytest-dev/pytest#9417- Disable libalternatives usage until all python-pytest * packages are on the same page (see sr#926611) * Wed Oct 20 2021 schubi - Disable all update-alternatives install calls if libalternatives is used. * Fri Oct 01 2021 Stefan Schubert - Use libalternatives instead of update-alternatives. * Tue Sep 14 2021 Ondřej Súkup - update to 6.2.5 * Python 3.10 is now supported. * Enable compatibility with pluggy 1.0 or later. * Fri May 14 2021 Markéta Machová - Update to 6.2.4 * pytest used to create directories under /tmp with world-readable permissions. This means that any user in the system was able to read information written by tests in temporary directories (such as those created by the tmp_path/tmpdir fixture). Now the directories are created with private permissions. * Fixed assertion rewriting on Python 3.10. * Sun Feb 14 2021 Ben Greiner - Don\'t require python36-numpy for testing, because Tumbleweed cannot provide python36-numpy any longer: NumPy 1.20 dropped Python 3.6 support. The tests are skipped automatically. * Thu Feb 11 2021 Michael Ströder - Update to 6.2.2 * #8152: Fixed \"()\" being shown as a skip reason in the verbose test summary line when the reason is empty. * #8249: Fix the faulthandler plugin for occasions when running with twisted.logger and using pytest --capture=no. * Tue Jan 05 2021 Markéta Machová - Update to 6.2.1 * pytest now supports python3.6+ only. * Directly constructing/calling some classes/functions is now deprecated (see upstream changelog) * The AATTpytest.yield_fixture decorator/function is now deprecated. Use pytest.fixture() instead. * No removals so far. * Verbose mode now shows the reason that a test was skipped in the test’s terminal line after the “SKIPPED”, “XFAIL” or “XPASS”. * pytest now warns about unraisable exceptions and unhandled thread exceptions that occur in tests on Python>=3.8. * New pytester fixture, which is identical to testdir but its methods return pathlib.Path when appropriate instead of py.path.local. * It is now possible to construct a MonkeyPatch object directly as pytest.MonkeyPatch(), in cases when the monkeypatch fixture cannot be used. * Many more new features and bugfixes
|
|
|