========================================================================================================================================================== ERRORS ==========================================================================================================================================================
___________________________________________________________________________________________________________________________________ ERROR collecting tests/test_past/test_translation.py ___________________________________________________________________________________________________________________________________
ImportError while importing test module ‘/home/user/.cache/yay/python-future/src/future-1.0.0/tests/test_past/test_translation.py’.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/init.py:88: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_past/test_translation.py:21: in
from past.translation import install_hooks, remove_hooks, common_substring
build/lib/past/translation/init.py:44: in
from lib2to3.pgen2.parse import ParseError
E ModuleNotFoundError: No module named ‘lib2to3’
===================================================================================================================================================== warnings summary =====================================================================================================================================================
build/lib/future/backports/test/support.py:1945
/home/user/.cache/yay/python-future/src/future-1.0.0/build/lib/future/backports/test/support.py:1945: SyntaxWarning: invalid escape sequence ‘\d’
m = re.match(“2.6.(\d{1,2})”, kernel_version)
– Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================================================================================= short test summary info ==================================================================================================================================================
ERROR tests/test_past/test_translation.py
!!! Interrupted: 1 error during collection !!!
=============================================================================================================================================== 1 warning, 1 error in 0.16s ================================================================================================================================================
==> ERROR: A failure occurred in check().
Aborting…
→ error making: python-future-exit status 4
→ Failed to install the following packages. Manual intervention is required:
python-future - exit status 4
Never seen anything like this before so I thought I’d seek some guidance before i go breaking something.
I believe I’m having the same issue as the OP of this thread. For brevity, I’ve not included the error as it is the same as the OP’s error.Please be advised I’m new to arch based OS’s along with troubleshooting package issues.
@micwoj92 You’ve stated that we should try to remove python-future package, is this correct?
When I use the following command pacman -Qi python-future I receive the following output:
Name : python-future
Version : 1.0.0-2
Description : Clean single-source support for Python 3 and 2
Architecture : any
URL : https://python-future.org/
Licenses : MIT
Groups : None
Provides : futurize pasteurize
Depends On : python
Optional Deps : python-setuptools: futurize and pasteurize scripts
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 4.75 MiB
Packager : Unknown Packager
Build Date : Mon 23 Dec 2024 03:56:25 PM CST
Install Date : Mon 23 Dec 2024 03:57:06 PM CST
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : None
Based on the above output “Required By: None” is it safe to assume that if I remove this specific package I will not break numerous other packages?
Is the following command pacman -R python-future ideal to remove said package?
If I understand its purpose (and the package maintainer @micwoj92 may be able to confirm), it was to provide cross compatibility between Python 2 and Python 3 code.
Python 2 code running in a Python 3 environment.
Python 3 code running in a Python 2 environment.
As projects have migrated to Python 3, or been replaced or deprecated through that transition, the reliance on tools such as python-future will diminish until no longer needed.
This is a tool/library/utility that allows to (more easily) support both python2 and python3 code with a single codebase. From upstream FAQ: Who is this for?:
People with existing or new Python 3 codebases who wish to provide ongoing Python 2.7 support easily and with little maintenance burden.
People who wish to ease and accelerate migration of their Python 2 codebases to Python 3.3+, module by module, without giving up Python 2 compatibility.