man-group / pytest-plugins

A grab-bag of nifty pytest plugins
MIT License
568 stars 85 forks source link

pytest-shutil: Replace deprecated imp module #219

Closed mgorny closed 3 weeks ago

mgorny commented 1 year ago

Replace the use of the deprecated imp module with `importlib.util', as the former has been removed from Python 3.12.

wpbonelli commented 12 months ago

If no further maintenance is planned (cf #214, #218) I'm wondering about re-homing pytest-virtualenv as a standalone project.

mmerickel commented 11 months ago

Is pytest-venv an alternative? It also seems unmaintained, maybe @mmerickel has insight

pytest-venv is not unmaintained, it's just going at the speed of free... :-) But yes, I'm not looking to change the scope of the library much past what it is right now. I did just release 0.3 with several improvements including Python 3.12 support. I'm not clear why pytest-venv is being pinged on this issue about pytest-shutil - I do not use pytest-shutil - but regardless hopefully this serves as my insight!

If a new project is needed, should it continue to use virtualenv or builtin venv?

Well pytest-venv uses virtualenv so that it can create virtualenvs with different versions of Python if desired. venv is limited to the interpreter executing the command. I do not see the problem with continuing to depend on virtualenv to create virtualenvs - it's a great library with more features than the builtin venv.

mgorny commented 3 weeks ago

Thanks!