Skip to content

Update pytest requirement from ~=6.2 to ~=7.0#5778

Merged
Pierre-Sassoulas merged 2 commits intomainfrom
dependabot/pip/pytest-approx-eq-7.0
Feb 18, 2022
Merged

Update pytest requirement from ~=6.2 to ~=7.0#5778
Pierre-Sassoulas merged 2 commits intomainfrom
dependabot/pip/pytest-approx-eq-7.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Feb 7, 2022

Updates the requirements on pytest to permit the latest version.

Release notes

Sourced from pytest's releases.

7.0.0

pytest 7.0.0 (2022-02-03)

(Please see the full set of changes for this release also in the 7.0.0rc1 notes below)

Deprecations

  • #9488: If custom subclasses of nodes like pytest.Item{.interpreted-text role="class"} override the __init__ method, they should take **kwargs. See uncooperative-constructors-deprecated{.interpreted-text role="ref"} for details.

    Note that a deprection warning is only emitted when there is a conflict in the arguments pytest expected to pass. This deprecation was already part of pytest 7.0.0rc1 but wasn't documented.

Bug Fixes

  • #9355: Fixed error message prints function decorators when using assert in Python 3.8 and above.
  • #9396: Ensure pytest.Config.inifile{.interpreted-text role="attr"} is available during the pytest_cmdline_main <_pytest.hookspec.pytest_cmdline_main>{.interpreted-text role="func"} hook (regression during 7.0.0rc1).

Improved Documentation

  • #9404: Added extra documentation on alternatives to common misuses of [pytest.warns(None)]{.title-ref} ahead of its deprecation.
  • #9505: Clarify where the configuration files are located. To avoid confusions documentation mentions that configuration file is located in the root of the repository.

Trivial/Internal Changes

  • #9521: Add test coverage to assertion rewrite path.

pytest 7.0.0rc1 (2021-12-06)

Breaking Changes

  • #7259: The Node.reportinfo() <non-python tests>{.interpreted-text role="ref"} function first return value type has been expanded from [py.path.local | str]{.title-ref} to [os.PathLike[str] | str]{.title-ref}.

    Most plugins which refer to [reportinfo()]{.title-ref} only define it as part of a custom pytest.Item{.interpreted-text role="class"} implementation. Since [py.path.local]{.title-ref} is a [os.PathLike[str]]{.title-ref}, these plugins are unaffacted.

    Plugins and users which call [reportinfo()]{.title-ref}, use the first return value and interact with it as a [py.path.local]{.title-ref}, would need to adjust by calling [py.path.local(fspath)]{.title-ref}. Although preferably, avoid the legacy [py.path.local]{.title-ref} and use [pathlib.Path]{.title-ref}, or use [item.location]{.title-ref} or [item.path]{.title-ref}, instead.

    Note: pytest was not able to provide a deprecation period for this change.

... (truncated)

Commits
  • 3554b83 Add note to changelog
  • 6ea7f99 Prepare release version 7.0.0
  • 737b220 [7.0.x] releasing: Add template for major releases (#9597)
  • 7fa3972 [7.0.x] releasing: Always set doc_version (#9590)
  • b304499 [7.0.x] Make 'warnings' and 'deselected' in assert_outcomes optional (#9566)
  • f17525d [7.0.x] doc: Add ellipsis to warning usecase list (#9562)
  • 0a7be97 ci: Bump up timeout (#9565)
  • c17908c [7.0.x] doc: Recategorize 7.0.0 changelog items (#9564)
  • ab549bb [7.0.x] Add missing cooperative constructor changelog (#9563)
  • 4b1707f [7.0.x] Autouse linearization graph (#9557)
  • Additional commits viewable in compare view

You can trigger a rebase of this PR 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 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 the dependency Label for github dependabot label Feb 7, 2022
@Pierre-Sassoulas
Copy link
Copy Markdown
Member

@dependabot rebase

Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@6.2.0...7.0.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/pip/pytest-approx-eq-7.0 branch from 01174bb to 628d64b Compare February 7, 2022 15:24
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.13.0 milestone Feb 7, 2022
@DanielNoord
Copy link
Copy Markdown
Collaborator

DanielNoord commented Feb 8, 2022

@cdce8p @Pierre-Sassoulas @jacobtylerwalls @areveny Just tagging some recent contributors as I want to see if anybody recognises the problem:

Test runs seem to randomly take longer than 30 minutes. Tests are currently in their third try and I don't see why they would take longer than 30 minutes. In the first run it was Linux 3.8 and 3.9, in second run it was Linux 3.8, 3.9 and 3.10.
Test pass with pytest==7 locally on my Mac with the same speed (or perhaps even faster) than previously..

Anybody recognises such flakiness from other projects that run or need to update to pytest==7?

@Pierre-Sassoulas
Copy link
Copy Markdown
Member

Could it be due to caching ?

@DanielNoord
Copy link
Copy Markdown
Collaborator

Could it be due to caching ?

What type of caching do you mean? Looking at the log of the run we only fail on the pytest step, restoring the venv etc seems to succeed. I'm wondering if it is something to do with the "benchmark" tests? Those might take longer because of change in 7.0? Although I'm not sure.. You're on Linux right? Do test pass in normal time locally for you with 7.0?

@Pierre-Sassoulas
Copy link
Copy Markdown
Member

Looking at the log of the run we only fail on the pytest step, restoring the venv etc seems to succeed

Right, not caching then.

You're on Linux right? Do test pass in normal time locally for you with 7.0?

Yes (latest ubuntu LTS). pytest 7.0 takes 02:43 from 02:10 with pytest 6.2.5.

@Pierre-Sassoulas
Copy link
Copy Markdown
Member

Here's the result of git diff --word-diff of pytest . --durations=0 6.2.5 (before) vs 7.0.0 (new value) for the test taking more than half a second.

[-35.14s-]{+35.12s+} call     tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_benchmark_j1_single_working_checker
[-4.83s call     tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_benchmark_j10_single_working_checker-]
[-4.81s-]{+4.97s+} call     tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_benchmark_j1_all_checks_lots_of_files
[-4.15s-]{+4.78s+} call     [-tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_lots_of_files_j10-]
[-4.01s-]{+tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_benchmark_j10_single_working_checker+}
{+3.70s+} call     tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_lots_of_files_j10_empty_checker
[-2.43s-]{+3.49s+} call     [-tests/test_pylint_runners.py::test_runner[run_epylint]-]
[-2.24s-]{+tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_lots_of_files_j10+}
{+2.15s+} call     tests/test_pylint_runners.py::test_runner_with_arguments[run_epylint]
[-1.84s-]{+2.09s+} call     [-tests/test_functional.py::test_functional[nan_comparison_check]-]
[-1.67s-]{+tests/test_pylint_runners.py::test_runner[run_epylint]+}
{+1.77s+} call     [-tests/test_self.py::TestRunTC::test_do_not_import_files_from_local_directory-]
[-1.61s-]{+tests/test_functional.py::test_functional[nan_comparison_check]+}
{+1.55s+} call     tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_benchmark_j1
[-1.54s call     tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_benchmark_j10-]
[-1.46s-]{+1.41s+} call     tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_benchmark_check_parallel_j10
[-1.37s-]{+1.40s+} call     [-tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_lots_of_files_j1-]
[-1.32s-]{+tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_benchmark_j10+}
{+1.35s+} call     tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_lots_of_files_j1_empty_checker
[-1.25s-]{+1.32s call     tests/test_self.py::TestRunTC::test_do_not_import_files_from_local_directory+}
{+1.29s call     tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_lots_of_files_j1+}
{+0.96s+} call     tests/test_functional.py::test_functional[consider_using_with]
[-1.02s-]{+0.94s+} call     tests/test_functional.py::test_functional[stop_iteration_inside_generator]
[-0.96s-]{+0.92s+} call     tests/benchmark/test_baseline_benchmarks.py::TestEstablishBaselineBenchmarks::test_baseline_benchmark_j1_all_checks_single_file
[-0.93s-]{+0.89s+} call     tests/checkers/unittest_imports.py::TestImportsChecker::test_relative_beyond_top_level_two
[-0.87s-]{+0.78s+} call     tests/test_functional.py::test_functional[ungrouped_imports]
[-0.86s call     tests/test_functional.py::test_functional[deprecated_methods_py38]-]
[-0.83s-]{+0.77s+} call     tests/test_functional.py::test_functional[no_name_in_module][-0.81s call     tests/test_regr.py::test_pylint_config_attr-]
0.71s call     [-tests/test_functional.py::test_functional[ungrouped_imports_isort_compatible]-]{+tests/test_regr.py::test_crash[file_names0]+}
0.65s call     {+tests/test_functional.py::test_functional[ungrouped_imports_isort_compatible]+}
{+0.59s call+}     tests/test_functional.py::test_functional[no_member_if_statements]
[-0.63s-]{+0.59s+} call     tests/test_functional.py::test_functional[regression_4612_crash_pytest_fixture][-0.62s call     tests/test_epylint.py::test_epylint_strange_command-]
[-0.61s call     tests/config/test_functional_config_loading.py::test_functional_config_loading[toml/issue_3181/toml_decode_error.toml]-]
[-0.58s call     tests/test_epylint.py::test_epylint_good_command-]
0.54s call     [-tests/test_functional.py::test_functional[wrong_import_position11]-]{+tests/test_epylint.py::test_epylint_strange_command+}
0.53s call     [-tests/test_self.py::TestRunTC::test_do_not_import_files_from_local_directory_with_pythonpath-]{+tests/test_functional.py::test_functional[wrong_import_order]+}
0.52s call     [-tests/test_self.py::TestRunTC::test_import_plugin_from_local_directory_if_pythonpath_cwd-]

@DanielNoord
Copy link
Copy Markdown
Collaborator

See pytest-dev/pytest#9652 for discussion about this as well. We have not completely figured out was is causing this, it might not even be 7.0

@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.13.0, 2.14.0 Feb 10, 2022
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 1858073858

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 88 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.06%) to 93.991%

Files with Coverage Reduction New Missed Lines %
pylint/pyreverse/diadefslib.py 1 98.32%
pylint/utils/linterstats.py 5 96.36%
pylint/checkers/stdlib.py 7 94.64%
pylint/lint/run.py 19 72.79%
pylint/checkers/variables.py 25 96.41%
pylint/lint/pylinter.py 31 94.6%
Totals Coverage Status
Change from base Build 1806840834: 0.06%
Covered Lines: 14921
Relevant Lines: 15875

💛 - Coveralls

@DanielNoord
Copy link
Copy Markdown
Collaborator

@dependabot recreate

@DanielNoord
Copy link
Copy Markdown
Collaborator

@dependabot recreate

Please remove my own commit 😅

@Pierre-Sassoulas
Copy link
Copy Markdown
Member

This bot is too clever 😄

@Pierre-Sassoulas Pierre-Sassoulas merged commit ea8645e into main Feb 18, 2022
@Pierre-Sassoulas Pierre-Sassoulas deleted the dependabot/pip/pytest-approx-eq-7.0 branch February 18, 2022 09:07
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.14.0, 2.13.0 Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependency Label for github dependabot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants