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

2.1.0: test suite is usnig unittest2 #54

Open
kloczek opened this issue Sep 27, 2021 · 7 comments · May be fixed by #57
Open

2.1.0: test suite is usnig unittest2 #54

kloczek opened this issue Sep 27, 2021 · 7 comments · May be fixed by #57

Comments

@kloczek
Copy link

kloczek commented Sep 27, 2021

unittest2 is no longer maintained anbd should not be used with python 3.x

+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=9223936
rootdir: /home/tkloczko/rpmbuild/BUILD/deprecation-2.1.0
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, aspectlib-1.5.2, toolbox-0.5, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, flaky-3.7.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, xprocess-0.18.1, black-0.3.12, asyncio-0.15.1, subtests-0.5.0, isort-2.0.0, hypothesis-6.14.6, mock-3.6.1, profiling-1.7.0, randomly-3.8.0, nose2pytest-1.0.8, pyfakefs-4.5.1, tornado-0.8.1, twisted-1.13.3, aiohttp-0.3.0, localserver-0.5.0, anyio-3.3.1, trio-0.7.0, cases-3.6.4, yagot-0.5.0, Faker-8.14.0
collected 0 items / 1 error

================================================================================== ERRORS ==================================================================================
________________________________________________________________ ERROR collecting tests/test_deprecation.py ________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/deprecation-2.1.0/tests/test_deprecation.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_deprecation.py:15: in <module>
    import unittest2
E   ModuleNotFoundError: No module named 'unittest2'
========================================================================= short test summary info ==========================================================================
ERROR tests/test_deprecation.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================= 1 error in 0.28s =============================================================================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'.
@briancurtin
Copy link
Owner

This project supports Python 2, and even though the project is not maintained it is still available on PyPI. I'm not sure how you got into that situation because the package is in test-requirements.txt.

@kloczek
Copy link
Author

kloczek commented Sep 27, 2021

Python 2.x is already EOSed +1.5y.
IIRC none of the even oldest moduels are removed from PyPI.

I'm not sure how you got into that situation because the package is in test-requirements.txt.

I'm trying to package deprecation as rpm and Solaris IPS packages so I'm not using pip.

@briancurtin
Copy link
Owner

Python 2.x is already EOSed +1.5y.
IIRC none of the even oldest moduels are removed from PyPI.

I am well aware of that, but people still have needs for Python 2 and there is nothing gained by breaking the testing of Python 2 here because it costs nothing to support in the codebase.

I'm not sure how you got into that situation because the package is in test-requirements.txt.

I'm trying to package deprecation as rpm and Solaris IPS packages so I'm not using pip.

If you want to submit a patch that wraps import unittest2 in a try/except ImportError in the tests, would that work? I'm not familiar with how the packaging situation would cause breakage.

@kloczek
Copy link
Author

kloczek commented Sep 27, 2021

If you want to submit a patch that wraps import unittest2 in a try/except ImportError in the tests, would that work? I'm not familiar with how the packaging situation would cause breakage.

Sorry at the moment I still have very long list python modules to package. Athis stage I'm only rising tickets if I'm able to spot something :(
Maybe in 2-3 montsh will have tiime to help sort out some found issues.

@briancurtin
Copy link
Owner

I'll see if I can get it fixed at some point this week.

@kloczek
Copy link
Author

kloczek commented Sep 27, 2021

I'll be glad to test that so please let me know if you will have some commit to test :)

@dnadlinger
Copy link

This breaks deprecation for Python 3.10, as unittest2 doesn't run there (MutableMapping is now only in collections.abc).

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.

3 participants