Issues updating Python-Future

Hi,
Just running an update this morning with yay and got a unique looking error.

Successfully built future-1.0.0-py3-none-any.whl
==> Starting check()…
=================================================================================================================================================== test session starts ====================================================================================================================================================
platform linux – Python 3.13.1, pytest-8.3.4, pluggy-1.5.0 – /usr/bin/python
cachedir: .pytest_cache
rootdir: /home/user/.cache/yay/python-future/src/future-1.0.0
configfile: pytest.ini
collected 99 items / 1 error

========================================================================================================================================================== 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.

Thanks!

Read the comments on the python-future package’s AUR page. Start at the bottom and read your way up.

Basically, it looks like:

this package is not compatible with Python 3.13

You could try installing the AUR package python311:

yay -S python311

Then try building python-future again.

2 Likes

No, please do not post bullshit. Installing python311 will not help this at all, that package does not provide python despite what it says.

2 weeks ago there was same thread with correct solution.

@Joe_Mama please try to remove this package first as in the post above.

1 Like

I’m not sure how suggesting “you could try” is “posting bullshit.” It was a suggestion.

But thanks for helping the user :+1:.

1 Like

Because it is a fruitless suggestion that will only lead to wasted time (building said python311 package).

I had a the same issue with python-future several days ago. What I did was this…

CLEAN CACHE (All Packages): paccache -r
then CLEAN CACHE (Uninstalled Packages): paccache -ruk0
then REMOVE ORPHANS: yay -Yc
then yay -Syyu

No issues afterwards.

  • EDIT: This worked for ME. Obviously, your mileage may vary.
14 Likes

Hello all,

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?

Thanks in advance!

To all questions in your post: yes.

2 Likes

I can confirm this worked for me. I’ve rebooted just as a test and everything appears to be stable. Thanks for taking the time to post this!

1 Like

You’re welcome! Glad it worked!

I removed the package python-future and the world is still here. Not really sure why it would be needed.

4 Likes

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.

2 Likes

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?:

  1. People with existing or new Python 3 codebases who wish to provide ongoing Python 2.7 support easily and with little maintenance burden.
  2. 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.

It is similar to python-six, which Arch Linux is also trying to reduce dependency on: https://archlinux.org/todo/reduce-dependencies-on-python-six/

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.