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 dependency issue #215

Closed
gospodima opened this issue Nov 12, 2024 · 12 comments · Fixed by #216
Closed

pytest dependency issue #215

gospodima opened this issue Nov 12, 2024 · 12 comments · Fixed by #216

Comments

@gospodima
Copy link

gospodima commented Nov 12, 2024

Hello,

I just saw CI pipeline of my project failed due to new 1.0.0 release. Looks like in #214 pytest import was added in patsy/eval.py. Since pytest is an optional requirement for tests, it results with ModuleNotFoundError: No module named 'pytest' in case patsy was installed without test dependencies.

@bashtage
Copy link
Contributor

Thanks for reporting it to us. We'll need to do a point release very quickly.

@tdekelver-bd
Copy link

This also causes issue with statsmodels package that has patsy as depencency.

@bashtage bashtage reopened this Nov 12, 2024
@bashtage
Copy link
Contributor

Patch in master. Leaving this open until 1.0.1. @matthewwardrop would be great if you could post a release when you have a chance.

@xbarra
Copy link

xbarra commented Nov 12, 2024

Thank you @bashtage!

We are also affected by the issue, so a 1.0.1 release will be greatly appreciated,

@bashtage
Copy link
Contributor

Release 1.0.1 is now on PyPI.

@bguillod
Copy link

Is this going to be released to conda and conda-forge soon as well?

@bashtage
Copy link
Contributor

The conda forge bot should handle this in the next few hours.

@matthewwardrop
Copy link
Collaborator

Ugh... Apologies folks. And thanks @bashtage .

@matthewwardrop
Copy link
Collaborator

I have yanked the 1.0.0 release from PyPI, submitted a broken PR request to conda-forge to prevent continued use of the patsy 1.0.0 package, and expedited the release of 1.0.1 into conda PR.

I suppose the lesson here is not to publish packages late at night, especially for code-bases which you have grown only distantly familiar. Thanks again @bashtage for the quick fix.

@bashtage
Copy link
Contributor

I would worry too much about it. I think the very out-of-date style that patsy uses where tests are integrated into the main package is probably more at fault than letting this one slip through.

@bollwyvl
Copy link

Thanks for the quick response and thinking of us poor schlubs over on CF.

A quick CI win is a "clean room" job that downloads the whl/sdist and installs it...

pip install --find-links=dist --no-index-url patsy
pip check
python -c "import patsy"

@matthewwardrop
Copy link
Collaborator

@bollwyvl Yeah... @bashtage added a check here that should test that things work sans pytest; but a clean-room install at the end of the CI job is a nice generic solution. Thanks for your quick conda-forge responses, btw.

Of course, this project is heading the way of the dodo just as soon as I can find some time to port statsmodels and a few other projects onto formulaic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants