Skip to content

CI: fix pytest scripts #53727

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

Merged
merged 3 commits into from
Jun 19, 2023
Merged

CI: fix pytest scripts #53727

merged 3 commits into from
Jun 19, 2023

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Jun 19, 2023

seems that

def pytest_addoption(parser):
    parser.addoption(
        "--strict-data-files",
        action="store_true",
        help="Unused. For compat with setup.cfg.",
    )

isn't needed anymore, and actually errors now:

ValueError: option names {'--strict-data-files'} already added

@MarcoGorelli MarcoGorelli requested a review from mroeschke as a code owner June 19, 2023 15:41
"pytest": "7.0.0",
"pytest": "7.3.2",
Copy link
Member Author

Choose a reason for hiding this comment

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

@kathleenhang I'd have forgotten this one, but your script caught it, thanks 🙌

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the ping! It's really cool to see how it's helpful.

@phofl phofl added the Testing pandas testing functions or related to the test suite label Jun 19, 2023
@phofl phofl added this to the 2.0.3 milestone Jun 19, 2023
@phofl phofl merged commit 3fb757b into pandas-dev:main Jun 19, 2023
@lumberbot-app
Copy link

lumberbot-app bot commented Jun 19, 2023

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 2.0.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 3fb757beb6ca6bb30007ba1db130cc83f27f9363
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #53727: CI: fix `pytest scripts`'
  1. Push to a named branch:
git push YOURFORK 2.0.x:auto-backport-of-pr-53727-on-2.0.x
  1. Create a PR against branch 2.0.x, I would have named this PR:

"Backport PR #53727 on branch 2.0.x (CI: fix pytest scripts)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@phofl
Copy link
Member

phofl commented Jun 19, 2023

thx @MarcoGorelli

I guess we should backport?

@MarcoGorelli
Copy link
Member Author

yeah probs

MarcoGorelli added a commit to MarcoGorelli/pandas that referenced this pull request Jun 19, 2023
(cherry picked from commit 3fb757b)
MarcoGorelli added a commit to MarcoGorelli/pandas that referenced this pull request Jun 19, 2023
(cherry picked from commit 3fb757b)
MarcoGorelli added a commit to MarcoGorelli/pandas that referenced this pull request Jun 19, 2023
(cherry picked from commit 3fb757b)
@mroeschke
Copy link
Member

Why did pytest needed to be bumped? Technically we call out bumping these dev dependencies in the minor/major release whatsnews

MarcoGorelli added a commit that referenced this pull request Jun 20, 2023
CI: fix `pytest scripts` (#53727)

(cherry picked from commit 3fb757b)
@MarcoGorelli
Copy link
Member Author

thanks @mroeschke , I'll make a PR to update this in the whatsnew

the reason is that the

def pytest_addoption(parser):
    parser.addoption(
        "--strict-data-files",
        action="store_true",
        help="Unused. For compat with setup.cfg.",
    )

options in scripts/conftest.py fail with a more modern pytest, so I figured it was easiest to just remove that and bump pytest

@mroeschke
Copy link
Member

I think I am getting a related error in some PRs: https://github.com/pandas-dev/pandas/actions/runs/5383684555/jobs/9770736568?pr=53828

ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --strict-data-files
  inifile: /home/runner/work/pandas/pandas/pyproject.toml
  rootdir: /home/runner/work/pandas/panda

Do you know why this is happening?

Also it appears minversion = "7.0" is still specified in pyproject.toml

@MarcoGorelli
Copy link
Member Author

the logs show that that job is using:

pytest                         7.4.0 

My guess is that the issue might be in the pytest-localserver plugin?

Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants