Skip to content

pytest should not have any external python requirements #10683

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

Closed
zefr0x opened this issue Jan 22, 2023 · 1 comment
Closed

pytest should not have any external python requirements #10683

zefr0x opened this issue Jan 22, 2023 · 1 comment

Comments

@zefr0x
Copy link

zefr0x commented Jan 22, 2023

What's the problem?

At this point of time pytest use at most 7 external python requirements to work:

iniconfig
packaging
pluggy>=0.12,<2.0
colorama;sys_platform=="win32"
exceptiongroup>=1.0.0rc8;python_version<"3.11"
importlib-metadata>=0.12;python_version<"3.8"
tomli>=1.0.0;python_version<"3.11"

There is a chance that we will face a conflict in some projects, since one of those requirements might be used in them with other version ranges. In most cases we can't run pytest without the project we want to test satisfying it's own requirements.

With a quick search, this has been historically problematic: #3381

Describe the solution you'd like

pytest is a tool that will be used in a lot of different projects, it is intended as a utility and should has nothing to do with the project itself. I think it should be portable. It might be possible to just not use unnecessary requirements (they were not added for some trivial reason so this is not a solution). For other important ones we can just include them as a git submodule and ship them embedded with pytest it self.

I think that the git submodule solution is the best one.

Anyway, this is what I think from my point of view, I might be wrong.

@RonnyPfannschmidt
Copy link
Member

most of those are backports for old pythons and managed in a responsible manner
then comes packaging, which is just leaving standard implementations where

colorama is there bacause for about a decade colors on windows where a mess vendoring it would just break even more things

then there is iniconfig and pluggy, which are intentionally externalized

so nope

additionally git submodules are a very error prone an huer hostile way to manage vendored packages 👎

@RonnyPfannschmidt RonnyPfannschmidt closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2023
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

No branches or pull requests

2 participants