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 shipped a new release (7.4.0) / Upgrade seleniumbase to use it. #1922

Closed
mdmintz opened this issue Jun 23, 2023 · 1 comment · Fixed by #1923
Closed

pytest shipped a new release (7.4.0) / Upgrade seleniumbase to use it. #1922

mdmintz opened this issue Jun 23, 2023 · 1 comment · Fixed by #1923
Assignees
Labels
dependencies Pull requests that update a dependency file enhancement Making things better

Comments

@mdmintz
Copy link
Member

mdmintz commented Jun 23, 2023

The new pytest 7.4.0 release has many changes. Once tested, seleniumbase can refresh dependencies to use that.

pytest 7.4.0 (2023-06-23)
Features
[#10901](https://github.com/pytest-dev/pytest/issues/10901): Added [ExceptionInfo.from_exception()](https://docs.pytest.org/en/stable/reference/reference.html#pytest.ExceptionInfo.from_exception), a simpler way to create an [ExceptionInfo](https://docs.pytest.org/en/stable/reference/reference.html#pytest.ExceptionInfo) from an exception. This can replace [ExceptionInfo.from_exc_info()](https://docs.pytest.org/en/stable/reference/reference.html#pytest.ExceptionInfo.from_exc_info) for most uses.

Improvements
[#10872](https://github.com/pytest-dev/pytest/issues/10872): Update test log report annotation to named tuple and fixed inconsistency in docs for [pytest_report_teststatus](https://docs.pytest.org/en/stable/reference/reference.html#std-hook-pytest_report_teststatus) hook.

[#10907](https://github.com/pytest-dev/pytest/issues/10907): When an exception traceback to be displayed is completely filtered out (by mechanisms such as __tracebackhide__, internal frames, and similar), now only the exception string and the following message are shown:

“All traceback entries are hidden. Pass --full-trace to see hidden and internal frames.”.

Previously, the last frame of the traceback was shown, even though it was hidden.

[#10940](https://github.com/pytest-dev/pytest/issues/10940): Improved verbose output (-vv) of skip and xfail reasons by performing text wrapping while leaving a clear margin for progress output.

Added TerminalReporter.wrap_write() as a helper for that.

[#10991](https://github.com/pytest-dev/pytest/issues/10991): Added handling of %f directive to print microseconds in log format options, such as log-date-format.

[#11005](https://github.com/pytest-dev/pytest/issues/11005): Added the underlying exception to the cache provider’s path creation and write warning messages.

[#11013](https://github.com/pytest-dev/pytest/issues/11013): Added warning when [testpaths](https://docs.pytest.org/en/stable/reference/reference.html#confval-testpaths) is set, but paths are not found by glob. In this case, pytest will fall back to searching from the current directory.

[#11043](https://github.com/pytest-dev/pytest/issues/11043): When --confcutdir is not specified, and there is no config file present, the conftest cutoff directory (--confcutdir) is now set to the [rootdir](https://docs.pytest.org/en/stable/reference/customize.html#rootdir). Previously in such cases, conftest.py files would be probed all the way to the root directory of the filesystem. If you are badly affected by this change, consider adding an empty config file to your desired cutoff directory, or explicitly set --confcutdir.

[#11081](https://github.com/pytest-dev/pytest/issues/11081): The [norecursedirs](https://docs.pytest.org/en/stable/reference/reference.html#confval-norecursedirs) check is now performed in a [pytest_ignore_collect](https://docs.pytest.org/en/stable/reference/reference.html#std-hook-pytest_ignore_collect) implementation, so plugins can affect it.

If after updating to this version you see that your norecursedirs setting is not being respected, it means that a conftest or a plugin you use has a bad pytest_ignore_collect implementation. Most likely, your hook returns False for paths it does not want to ignore, which ends the processing and doesn’t allow other plugins, including pytest itself, to ignore the path. The fix is to return None instead of False for paths your hook doesn’t want to ignore.

[#8711](https://github.com/pytest-dev/pytest/issues/8711): [caplog.set_level()](https://docs.pytest.org/en/stable/reference/reference.html#pytest.LogCaptureFixture.set_level) and [caplog.at_level()](https://docs.pytest.org/en/stable/reference/reference.html#pytest.LogCaptureFixture.at_level) will temporarily enable the requested level if level was disabled globally via logging.disable(LEVEL).

Bug Fixes
[#10831](https://github.com/pytest-dev/pytest/issues/10831): Terminal Reporting: Fixed bug when running in --tb=line mode where pytest.fail(pytrace=False) tests report None.

[#11068](https://github.com/pytest-dev/pytest/issues/11068): Fixed the --last-failed whole-file skipping functionality (“skipped N files”) for [non-python test files](https://docs.pytest.org/en/stable/example/nonpython.html#non-python-tests).

[#11104](https://github.com/pytest-dev/pytest/issues/11104): Fixed a regression in pytest 7.3.2 which caused to [testpaths](https://docs.pytest.org/en/stable/reference/reference.html#confval-testpaths) to be considered for loading initial conftests, even when it was not utilized (e.g. when explicit paths were given on the command line). Now the testpaths are only considered when they are in use.

[#1904](https://github.com/pytest-dev/pytest/issues/1904): Fixed traceback entries hidden with __tracebackhide__ = True still being shown for chained exceptions (parts after “… the above exception …” message).

[#7781](https://github.com/pytest-dev/pytest/issues/7781): Fix writing non-encodable text to log file when using --debug.

Improved Documentation
[#9146](https://github.com/pytest-dev/pytest/issues/9146): Improved documentation for [caplog.set_level()](https://docs.pytest.org/en/stable/reference/reference.html#pytest.LogCaptureFixture.set_level).

Trivial/Internal Changes
[#11031](https://github.com/pytest-dev/pytest/issues/11031): Enhanced the CLI flag for -c to now include --config-file to make it clear that this flag applies to the usage of a custom config file.

The biggest change appears to be pytest-dev/pytest#11043, which caused someone from AWS to open pytest-dev/pytest#11134 (but it appears to be a false bug because they set --rootdir=DIR to a folder that did not contain their conftest.py file). Assuming that's the only breaking change, it'll probably be safe to upgrade seleniumbase to use the newer pytest.

@mdmintz mdmintz self-assigned this Jun 23, 2023
@mdmintz mdmintz added dependencies Pull requests that update a dependency file enhancement Making things better labels Jun 23, 2023
@mdmintz mdmintz changed the title pytest shipped a new release (7.4.0) pytest shipped a new release (7.4.0) / Upgrade seleniumbase to use it. Jun 23, 2023
@mdmintz
Copy link
Member Author

mdmintz commented Jun 30, 2023

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 enhancement Making things better
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant