Bug 2356170

Summary: conda fails to build with Python 3.14: tests/test_shell.py: TypeError: 'str' object cannot be interpreted as an integer
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: condaAssignee: Zbigniew Jędrzejewski-Szmek <zbyszek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fabianagcris, ksurma, mhroncok, orion, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: conda-25.11.0-1.fc44 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-11-27 01:22:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2322407, 2339432, 2373702    

Description Karolina Surma 2025-03-31 09:03:00 UTC
conda fails to build with Python 3.14.0a6.

_____________________ ERROR collecting tests/test_shell.py _____________________
Traceback (most recent call last):
  File "/builddir/build/BUILD/conda-24.11.3-build/conda-24.11.3/conda/common/path/windows.py", line 92, in _path_to
    converted = subprocess.run(
                ~~~~~~~~~~~~~~^
        [cygpath, cygpath_arg, "--path", joined],
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
        check=True,
        ^^^^^^^^^^^
    ).stdout.strip()
    ^
  File "/usr/lib64/python3.14/subprocess.py", line 554, in run
    with Popen(*popenargs, **kwargs) as process:
         ~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/subprocess.py", line 1035, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                        pass_fds, cwd, env,
                        ^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
                        gid, gids, uid, umask,
                        ^^^^^^^^^^^^^^^^^^^^^^
                        start_new_session, process_group)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/subprocess.py", line 1849, in _execute_child
    self._posix_spawn(args, executable, env, restore_signals, close_fds,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      p2cread, p2cwrite,
                      ^^^^^^^^^^^^^^^^^^
                      c2pread, c2pwrite,
                      ^^^^^^^^^^^^^^^^^^
                      errread, errwrite)
                      ^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/subprocess.py", line 1793, in _posix_spawn
    self.pid = os.posix_spawn(executable, args, env, **kwargs)
               ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/cygpath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 341, in from_call
    result: TResult | None = func()
                             ~~~~^^
  File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 389, in collect
    return list(collector.collect())
                ~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 549, in collect
    self._register_setup_module_fixture()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 562, in _register_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
    ^^^^^^^^
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 284, in obj
    self._obj = obj = self._getobj()
                      ~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 546, in _getobj
    return importtestmodule(self.path, self.config)
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 493, in importtestmodule
    mod = import_path(
        path,
    ...<2 lines>...
        consider_namespace_packages=config.getini("consider_namespace_packages"),
    )
  File "/usr/lib/python3.14/site-packages/_pytest/pathlib.py", line 587, in import_path
    importlib.import_module(module_name)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1395, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1368, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1339, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "/usr/lib/python3.14/site-packages/_pytest/assertion/rewrite.py", line 184, in exec_module
    exec(co, module.__dict__)
    ~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/conda-24.11.3-build/conda-24.11.3/tests/test_shell.py", line 89, in <module>
    class InteractiveShellType(type):
    ...<96 lines>...
            )
  File "/builddir/build/BUILD/conda-24.11.3-build/conda-24.11.3/tests/test_shell.py", line 90, in InteractiveShellType
    EXE = quote_for_shell(native_path_to_unix(sys.executable))
                          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/conda-24.11.3-build/conda-24.11.3/conda/common/path/windows.py", line 149, in win_path_to_unix
    return _path_to(paths, prefix=prefix, cygdrive=cygdrive, to_unix=True)
  File "/builddir/build/BUILD/conda-24.11.3-build/conda-24.11.3/conda/common/path/windows.py", line 100, in _path_to
    log.warning("cygpath is not available, fallback to manual path conversion")
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/logging/__init__.py", line 1531, in warning
    self._log(WARNING, msg, args, **kwargs)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/logging/__init__.py", line 1664, in _log
    self.handle(record)
    ~~~~~~~~~~~^^^^^^^^
  File "/usr/lib64/python3.14/logging/__init__.py", line 1680, in handle
    self.callHandlers(record)
    ~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/usr/lib64/python3.14/logging/__init__.py", line 1736, in callHandlers
    hdlr.handle(record)
    ~~~~~~~~~~~^^^^^^^^
  File "/usr/lib64/python3.14/logging/__init__.py", line 1021, in handle
    rv = self.filter(record)
  File "/usr/lib64/python3.14/logging/__init__.py", line 866, in filter
    result = f.filter(record)
  File "/builddir/build/BUILD/conda-24.11.3-build/conda-24.11.3/conda/gateways/logging.py", line 66, in filter
    record.msg = self.TOKEN_REPLACE(record.msg)
                 ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
TypeError: 'str' object cannot be interpreted as an integer

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08837200-conda/

For all our attempts to build conda with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/conda/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2025-06-22 18:27:06 UTC
This still fails this way when unbootstrapped.

Comment 2 Orion Poplawski 2025-08-06 16:55:27 UTC
The above is the least of our worries.  Looks like conda has its own thread worker that mucks with the _WorkItem internal.  I suspect that will take more work.  Reported upstream at least.

Comment 3 Miro Hrončok 2025-08-26 11:08:43 UTC
Hello. This is a bulk comment.

This package still needs to be rebuilt and/or shipped with Python 3.14.0rc2+ bytecode in Fedora 43.

The Beta Freeze of Fedora 43 is scheduled to start today. Please prioritize this bugzilla accordingly.

Thanks.

Comment 4 Orion Poplawski 2025-08-26 13:54:33 UTC
Upstream or someone else is going to need to fix this package for Python 3.14, I don't have the time or the knowledge for it.  It's pretty tough supporting an update to an unreleased version of Python when many projects don't care about new versions until after they are released.

Comment 5 Karolina Surma 2025-09-29 14:22:56 UTC
Hello. This is a bulk comment.

This package still needs to be rebuilt and/or shipped with Python 3.14.0rc3+ bytecode in Fedora 43.

The Final Freeze of Fedora 43 is scheduled to start next week. Please prioritize this bugzilla accordingly.

Thanks.

Comment 6 Orion Poplawski 2025-11-25 02:54:06 UTC
*** Bug 2412178 has been marked as a duplicate of this bug. ***

Comment 7 Fedora Update System 2025-11-27 01:17:30 UTC
FEDORA-2025-20b067c475 (conda-25.11.0-1.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-20b067c475

Comment 8 Fedora Update System 2025-11-27 01:22:13 UTC
FEDORA-2025-20b067c475 (conda-25.11.0-1.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.