GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — MNT: Compat with pytest 8.1 by pllim · Pull Request #219 · matplotlib/pytest-mpl

Conversation

@pllim

@pllim pllim commented Jan 6, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

To avoid this in pytest 8.1.dev:

pluggy._manager.PluginValidationError: Plugin 'pytest_mpl' for hook 'pytest_report_header'
hookimpl definition: pytest_report_header(config, startdir)
Argument(s) {'startdir'} are declared in the hookimpl but can not be found in the hookspec

See pytest-dev/pytest#11779 (comment)

Fix #216 , xref pytest-dev/pytest#11714 (comment)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pllim pllim mentioned this pull request Jan 6, 2024
TST: Update org for pytest-doctestplus in devinfra astropy/astropy#15820
Merged
1 task
bsipocz
bsipocz reviewed Jan 9, 2024
View reviewed changes

@bsipocz bsipocz left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also revert bd7b5c6, so this could be tested?

(and suggestion for the maintainers: add a job for testing with the 8.0.x branch (RC) just as well with pytestdev)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pllim

pllim commented Jan 9, 2024

Copy link
Copy Markdown
Contributor Author

Good catch; reverted. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pllim

pllim commented Jan 9, 2024

Copy link
Copy Markdown
Contributor Author

I have no idea what this test failure is in pytest-dev job

E                   ValueError: I/O operation on closed file

FAILED ../../tests/test_baseline_path.py::test_config[None-None-dir3-dir3-True]
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pllim

pllim commented Jan 9, 2024

Copy link
Copy Markdown
Contributor Author

That commit I reverted was from #215 by @ConorMacBride . I have no idea what he meant by "Skip pytestdev until hook wrapper issue is fixed" as there is no further explanation in the PR nor any linked issue.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ConorMacBride

ConorMacBride commented Jan 9, 2024

Copy link
Copy Markdown
Member

The hook wrapper issue is #216

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ConorMacBride
ConorMacBride reviewed Jan 9, 2024
View reviewed changes

@ConorMacBride ConorMacBride left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tested a fix for #216 last month, the tests passed with the pytest main branch installed. I did not see any mention of this issue, which seems strange as I would have expected the deprecation warning to be raised as an exception. Have you seen this pytest-mpl hook raise an exception?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pytest_mpl/plugin.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

pllim added 3 commits January 9, 2024 11:34
@pllim
MNT: Compat with pytest 8.1
8d330ec
@pllim
Fix version comparison
267114a
@pllim
Reverts bd7b5c6
2cdaba0
@bsipocz

bsipocz commented Jan 9, 2024

Copy link
Copy Markdown
Contributor

I would have expected the deprecation warning to be raised as an exception

We didn't see deprecation warnings in other plugins either and similar failures popped up when they became actual errors. I haven't dug deep enough to get a full understanding but the plugins/pytest doesn't always behave the same predictable way as a normal test dependency library.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pllim
Remove args from pytest_report_header
e57d11e
and fix up the other pytest 8 compat problem with old-style hook wrapper.
Update flake8 setting to reflect what is actually in the code.
@pllim
pllim force-pushed the patch-1 branch from 0d25df6 to e57d11e Compare January 9, 2024 16:49
@pllim
Auto-cancel duplicate CI
32da10a
and remove unnecessary pytest version check I added earlier.
@pllim

pllim commented Jan 9, 2024

Copy link
Copy Markdown
Contributor Author

pytestdev is green but the log has traceback, is this expected? I don't maintain this plugin so I don't know what the test is supposed to do.

https://github.com/matplotlib/pytest-mpl/actions/runs/7464235520/job/20310772695?pr=219

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pllim

pllim commented Jan 9, 2024

Copy link
Copy Markdown
Contributor Author

Would be nice to get this merged sooner than later if this patch is acceptable. astropy devinfra job is failing without this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pllim pllim mentioned this pull request Jan 9, 2024
TST: tox option to exclude scipy astropy/astropy#15742
Merged
1 task
@pllim

pllim commented Jan 10, 2024

Copy link
Copy Markdown
Contributor Author

@ConorMacBride , does this look good to you now? Can we merge this? I don't have write access to this repo but astropy depends on it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ConorMacBride
ConorMacBride approved these changes Jan 10, 2024
View reviewed changes

@ConorMacBride ConorMacBride left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pllim and @bsipocz!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pllim reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@ConorMacBride
ConorMacBride merged commit db0ea36 into matplotlib:main Jan 10, 2024
@ConorMacBride ConorMacBride added the bug label Jan 10, 2024
@pllim
pllim deleted the patch-1 branch January 10, 2024 21:11
@pllim pllim mentioned this pull request Jan 24, 2024
Pluggy 1.4.0 now warns about deprecated hook wrapper style #221
Closed
@ConorMacBride ConorMacBride mentioned this pull request Jan 24, 2024
Set deterministic to True for vector graphics and warn about change to True in future for PNG #197
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ConorMacBride ConorMacBride ConorMacBride approved these changes
+1 more reviewer
@bsipocz bsipocz bsipocz left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Upgrade to new-style hook wrappers

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@pllim @ConorMacBride @bsipocz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.