Skip to content

Add python 3.15 support#304

Draft
haswee wants to merge 16 commits into
bloomberg:mainfrom
haswee:add-support-3_15
Draft

Add python 3.15 support#304
haswee wants to merge 16 commits into
bloomberg:mainfrom
haswee:add-support-3_15

Conversation

@haswee
Copy link
Copy Markdown
Contributor

@haswee haswee commented May 19, 2026

*Issue number of the reported bug or feature request: #289 *

Describe your changes
Add pystack support for python3.15.

Testing performed

  • install python3.15
  • create venv
  • run (pystack-env-315) root@codespaces-0213cb:/workspaces/pystack# python3 -m pip install -e . to build and install latest version in venv
  • run (pystack-env-315) root@codespaces-0213cb:/workspaces/pystack# pystack core <core file> on corefile

Testing results:

  • python3.12 coredump file
(pystack-env-315) root@codespaces-0213cb:/workspaces/pystack# pystack core core.4308 
Error in import line from /workspaces/pystack-env-315/lib/python3.15/site-packages/sphinxcontrib_jsmath-1.0.1-py3.7-nspkg.pth: import sys, types, os;has_mfs = sys.version_info > (3, 5);p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('sphinxcontrib',));importlib = has_mfs and __import__('importlib.util');has_mfs and __import__('importlib.machinery');m = has_mfs and sys.modules.setdefault('sphinxcontrib', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('sphinxcontrib', [os.path.dirname(p)])));m = m or sys.modules.setdefault('sphinxcontrib', types.ModuleType('sphinxcontrib'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p)
  Traceback (most recent call last):
    File "<frozen site>", line 334, in _exec_imports
    File "<string>", line 1, in <module>
  KeyError: "local variable ''sitedir'' is not defined"
Error in import line from /workspaces/pystack-env-315/lib/python3.15/site-packages/sphinxcontrib_jsmath-1.0.1-py3.7-nspkg.pth: import sys, types, os;has_mfs = sys.version_info > (3, 5);p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('sphinxcontrib',));importlib = has_mfs and __import__('importlib.util');has_mfs and __import__('importlib.machinery');m = has_mfs and sys.modules.setdefault('sphinxcontrib', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('sphinxcontrib', [os.path.dirname(p)])));m = m or sys.modules.setdefault('sphinxcontrib', types.ModuleType('sphinxcontrib'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p)
  Traceback (most recent call last):
    File "<frozen site>", line 334, in _exec_imports
    File "<string>", line 1, in <module>
  KeyError: "local variable ''sitedir'' is not defined"
Using executable found in the core file: /venv/bin/python

Core file information:
state: t zombie: True niceness: 0
pid: 4308 ppid: 4096 sid: 4096
uid: 0 gid: 0 pgrp: 4308
executable: python arguments: python

The process died due receiving signal SIGSTOP
Traceback for thread 4308 [] (most recent call last):
    (Python) File "<frozen runpy>", line 198, in _run_module_as_main
    (Python) File "<frozen runpy>", line 88, in _run_code
    (Python) File "/usr/lib/python3.12/http/server.py", line 1329, in <module>
        test(
    (Python) File "/usr/lib/python3.12/http/server.py", line 1284, in test
        httpd.serve_forever()
    (Python) File "/usr/lib/python3.12/socketserver.py", line 235, in serve_forever
        ready = selector.select(poll_interval)
    (Python) File "/usr/lib/python3.12/selectors.py", line 415, in select
        fd_event_list = self._selector.poll(timeout)

  • python3.15 coredump file
(pystack-env-315) root@codespaces-0213cb:/workspaces/pystack# pystack core core.22576 
Error in import line from /workspaces/pystack-env-315/lib/python3.15/site-packages/sphinxcontrib_jsmath-1.0.1-py3.7-nspkg.pth: import sys, types, os;has_mfs = sys.version_info > (3, 5);p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('sphinxcontrib',));importlib = has_mfs and __import__('importlib.util');has_mfs and __import__('importlib.machinery');m = has_mfs and sys.modules.setdefault('sphinxcontrib', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('sphinxcontrib', [os.path.dirname(p)])));m = m or sys.modules.setdefault('sphinxcontrib', types.ModuleType('sphinxcontrib'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p)
  Traceback (most recent call last):
    File "<frozen site>", line 334, in _exec_imports
    File "<string>", line 1, in <module>
  KeyError: "local variable ''sitedir'' is not defined"
Error in import line from /workspaces/pystack-env-315/lib/python3.15/site-packages/sphinxcontrib_jsmath-1.0.1-py3.7-nspkg.pth: import sys, types, os;has_mfs = sys.version_info > (3, 5);p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('sphinxcontrib',));importlib = has_mfs and __import__('importlib.util');has_mfs and __import__('importlib.machinery');m = has_mfs and sys.modules.setdefault('sphinxcontrib', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('sphinxcontrib', [os.path.dirname(p)])));m = m or sys.modules.setdefault('sphinxcontrib', types.ModuleType('sphinxcontrib'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p)
  Traceback (most recent call last):
    File "<frozen site>", line 334, in _exec_imports
    File "<string>", line 1, in <module>
  KeyError: "local variable ''sitedir'' is not defined"
Using executable found in the core file: /workspaces/pystack-env-315/bin/python

Core file information:
state: t zombie: True niceness: 0
pid: 22576 ppid: 10630 sid: 10630
uid: 0 gid: 0 pgrp: 22576
executable: python arguments: python

The process died due receiving signal SIGSTOP
Traceback for thread 22576 (python) [] (most recent call last):
    (Python) File "<frozen runpy>", line 201, in _run_module_as_main
    (Python) File "<frozen runpy>", line 87, in _run_code
    (Python) File "/root/.local/share/uv/python/cpython-3.15.0b1-linux-x86_64-gnu/lib/python3.15/http/server.py", line 1173, in <module>
        _main()
    (Python) File "/root/.local/share/uv/python/cpython-3.15.0b1-linux-x86_64-gnu/lib/python3.15/http/server.py", line 1150, in _main
        test(
    (Python) File "/root/.local/share/uv/python/cpython-3.15.0b1-linux-x86_64-gnu/lib/python3.15/http/server.py", line 1074, in test
        httpd.serve_forever()
    (Python) File "/root/.local/share/uv/python/cpython-3.15.0b1-linux-x86_64-gnu/lib/python3.15/socketserver.py", line 232, in serve_forever
        ready = selector.select(poll_interval)
    (Python) File "/root/.local/share/uv/python/cpython-3.15.0b1-linux-x86_64-gnu/lib/python3.15/selectors.py", line 398, in select
        fd_event_list = self._selector.poll(timeout)

Additional context
Add any other context about your contribution here.

haswee added 2 commits May 18, 2026 19:24
Signed-off-by: haswee <hasweebanoth@gmail.com>
Signed-off-by: haswee <hasweebanoth@gmail.com>
@haswee haswee changed the title Add support python 3.15 support Add python 3.15 support May 19, 2026
haswee added 8 commits May 19, 2026 19:01
Signed-off-by: haswee <hasweebanoth@gmail.com>
Signed-off-by: haswee <hasweebanoth@gmail.com>
Signed-off-by: haswee <hasweebanoth@gmail.com>
Signed-off-by: haswee <hasweebanoth@gmail.com>
Signed-off-by: haswee <hasweebanoth@gmail.com>
Signed-off-by: haswee <hasweebanoth@gmail.com>
Signed-off-by: haswee <hasweebanoth@gmail.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 19, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.19%. Comparing base (4bcc46b) to head (16b5d20).

Files with missing lines Patch % Lines
src/pystack/_pystack/version.cpp 0.00% 2 Missing ⚠️
src/pystack/types.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #304      +/-   ##
==========================================
- Coverage   79.22%   79.19%   -0.04%     
==========================================
  Files          51       51              
  Lines        5550     5556       +6     
  Branches      581      582       +1     
==========================================
+ Hits         4397     4400       +3     
- Misses       1153     1156       +3     
Flag Coverage Δ
cpp 79.19% <50.00%> (-0.04%) ⬇️
python 79.19% <50.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

haswee added 5 commits May 19, 2026 21:03
Signed-off-by: haswee <hasweebanoth@gmail.com>
Signed-off-by: haswee <hasweebanoth@gmail.com>
…lvm. suffix

Signed-off-by: haswee <hasweebanoth@gmail.com>
Signed-off-by: haswee <hasweebanoth@gmail.com>
Signed-off-by: haswee <hasweebanoth@gmail.com>
CIBW_BUILD: "cp3{9..14}{t,}-${{ matrix.wheel_type }}"
CIBW_BUILD: "cp3{9..15}{t,}-${{ matrix.wheel_type }}"
CIBW_ARCHS_LINUX: auto
CIBW_ENABLE: cpython-prerelease cpython-freethreading
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks Wheels / test_wheels (3.13t) (pull_request) as cpython-freethreading is experimental in 3.13t.
As experimental cpython-freethreading is uninstalled, removing the flag breaks python3.13t test

Signed-off-by: haswee <hasweebanoth@gmail.com>
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 this pull request may close these issues.

2 participants