Skip to content

Commit 8887343

Browse files
authored
Merge branch 'main' into main
2 parents c854218 + ef2a9c6 commit 8887343

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1605
-116
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.18.0
2+
current_version = 1.19.1
33
commit = True
44
message =
55
Prepare for {new_version} release

.github/workflows/build.yml

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -37,35 +37,6 @@ jobs:
3737
exit 1
3838
fi
3939
40-
test_with_coverage:
41-
name: "Test with coverage"
42-
runs-on: ubuntu-latest
43-
steps:
44-
- uses: actions/checkout@v5
45-
- name: Set up Python
46-
uses: actions/setup-python@v6
47-
with:
48-
python-version: "3.10"
49-
- name: Set up dependencies
50-
run: |
51-
sudo apt-get update
52-
sudo apt-get install -qy libdebuginfod-dev libunwind-dev liblz4-dev pkg-config npm gdb lldb lcov
53-
- name: Create virtual environment
54-
run: |
55-
python3 -m venv venv
56-
- name: Install Python dependencies
57-
run: |
58-
./venv/bin/python -m pip install --upgrade pip
59-
- name: Disable ptrace security restrictions
60-
run: |
61-
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
62-
- name: Run coverage
63-
env:
64-
CYTHON_TEST_MACROS: 1
65-
PYTHON: ./venv/bin/python
66-
run: |
67-
make dev-install pycoverage
68-
6940
test_in_alpine:
7041
name: "Test in Alpine Linux"
7142
runs-on: ubuntu-latest
@@ -119,7 +90,7 @@ jobs:
11990
steps:
12091
- uses: actions/checkout@v5
12192
- name: Set up Node
122-
uses: actions/setup-node@v5
93+
uses: actions/setup-node@v6
12394
with:
12495
node-version: 16
12596
- name: Symlink node as nodejs

.github/workflows/build_wheels.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
- name: Build sdist
2525
run: pipx run build --sdist
2626

27-
- uses: actions/upload-artifact@v4
27+
- uses: actions/upload-artifact@v5
2828
with:
2929
name: sdist
3030
path: dist
3131

32-
- uses: actions/upload-artifact@v4
32+
- uses: actions/upload-artifact@v5
3333
with:
3434
name: tests
3535
path: tests
@@ -65,11 +65,11 @@ jobs:
6565
os: ubuntu-latest
6666
cibw_archs_linux: auto32
6767
steps:
68-
- uses: actions/download-artifact@v5
68+
- uses: actions/download-artifact@v6
6969
with:
7070
name: sdist
7171
path: dist
72-
- uses: actions/download-artifact@v5
72+
- uses: actions/download-artifact@v6
7373
with:
7474
name: tests
7575
path: tests
@@ -80,14 +80,14 @@ jobs:
8080
run: |
8181
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
8282
- name: Build wheels
83-
uses: pypa/cibuildwheel@v3.1.4
83+
uses: pypa/cibuildwheel@v3.2.1
8484
env:
8585
CIBW_BUILD: "cp3{7..14}{t,}-${{ matrix.wheel_type }}"
8686
CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux || 'auto' }}
8787
CIBW_PRERELEASE_PYTHONS: True
8888
CIBW_TEST_EXTRAS: test
8989
CIBW_TEST_COMMAND: python -um pytest --log-cli-level=DEBUG -s -vvv {package}/tests
90-
- uses: actions/upload-artifact@v4
90+
- uses: actions/upload-artifact@v5
9191
with:
9292
name: ${{ matrix.wheel_type }}-wheels
9393
path: ./wheelhouse/*.whl
@@ -104,11 +104,11 @@ jobs:
104104
- os: macos-14
105105
arch: arm64
106106
steps:
107-
- uses: actions/download-artifact@v5
107+
- uses: actions/download-artifact@v6
108108
with:
109109
name: sdist
110110
path: dist
111-
- uses: actions/download-artifact@v5
111+
- uses: actions/download-artifact@v6
112112
with:
113113
name: tests
114114
path: tests
@@ -128,7 +128,7 @@ jobs:
128128
run: |
129129
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
130130
- name: Build wheels
131-
uses: pypa/cibuildwheel@v3.1.4
131+
uses: pypa/cibuildwheel@v3.2.1
132132
env:
133133
CIBW_BUILD: "cp3{8..14}{t,}-*"
134134
CIBW_PRERELEASE_PYTHONS: True
@@ -139,7 +139,7 @@ jobs:
139139
LDFLAGS: "-L${{env.LZ4_INSTALL_DIR}}/lib -Wl,-rpath,${{env.LZ4_INSTALL_DIR}}/lib"
140140
PKG_CONFIG_PATH: "${{env.LZ4_INSTALL_DIR}}/lib/pkgconfig"
141141
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "DYLD_LIBRARY_PATH=${{env.LZ4_INSTALL_DIR}}/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
142-
- uses: actions/upload-artifact@v4
142+
- uses: actions/upload-artifact@v5
143143
with:
144144
name: macosx_${{ matrix.arch }}-wheels
145145
path: ./wheelhouse/*.whl
@@ -163,7 +163,7 @@ jobs:
163163
runs-on: ubuntu-latest
164164
if: github.event_name == 'release' && github.event.action == 'published'
165165
steps:
166-
- uses: actions/download-artifact@v5
166+
- uses: actions/download-artifact@v6
167167
with:
168168
# with no name set, it downloads all of the artifacts
169169
path: dist

.github/workflows/coverage.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ concurrency:
2323

2424
jobs:
2525
coverage:
26-
runs-on: ubuntu-22.04
26+
runs-on: ubuntu-24.04
27+
env:
28+
PYTHON: python3.13
29+
MEMRAY_MINIMIZE_INLINING: 1
2730
strategy:
2831
fail-fast: false
2932
steps:
3033
- uses: actions/checkout@v5
31-
- name: Set up Python
32-
uses: actions/setup-python@v6
33-
with:
34-
python-version: "3.10"
3534
- name: Set up dependencies
3635
run: |
36+
sudo add-apt-repository ppa:deadsnakes/ppa
3737
sudo apt-get update
3838
sudo apt-get install -qy \
3939
pkg-config \
@@ -44,18 +44,23 @@ jobs:
4444
lcov \
4545
libdw-dev \
4646
libelf-dev \
47-
python3.10-dev \
48-
python3.10-dbg
47+
${PYTHON}-dev \
48+
${PYTHON}-dbg \
49+
${PYTHON}-venv
50+
- name: Create a virtualenv
51+
run: |
52+
${PYTHON} -m venv /tmp/coverage-venv
53+
- name: Set up PATH
54+
run: |
55+
echo /tmp/coverage-venv/bin >>"$GITHUB_PATH"
56+
echo /home/runner/node_modules/.bin >>"$GITHUB_PATH"
4957
- name: Install Python dependencies
5058
run: |
51-
python3 -m pip install --upgrade pip cython pkgconfig
59+
${PYTHON} -m pip install --upgrade pip cython pkgconfig
5260
make test-install
5361
- name: Disable ptrace security restrictions
5462
run: |
5563
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
56-
- name: Add ./node_modules/.bin to PATH
57-
run: |
58-
export PATH="./node_modules/.bin:$PATH"
5964
- name: Compute C++ coverage
6065
run: |
6166
make ccoverage
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: UV Python Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
test_uv_python:
17+
name: "Test with UV Python 3.14"
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v5
21+
22+
- name: Install uv and set Python 3.14
23+
uses: astral-sh/setup-uv@v7
24+
with:
25+
python-version: "3.14"
26+
27+
- name: Create virtual environment
28+
run: |
29+
uv venv --python 3.14
30+
31+
- name: Set up system dependencies
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -qy \
35+
pkg-config \
36+
libdebuginfod-dev \
37+
libunwind-dev \
38+
liblz4-dev \
39+
gdb \
40+
npm
41+
42+
- name: Install Python dependencies
43+
run: |
44+
uv pip install --upgrade pip cython pkgconfig
45+
uv pip install -r requirements-test.txt
46+
47+
- name: Build package
48+
run: |
49+
make build-js
50+
uv pip install -e .
51+
52+
- name: Disable ptrace security restrictions
53+
run: |
54+
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
55+
56+
- name: Run tests
57+
run: |
58+
uv run pytest -vvv --log-cli-level=info tests

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ helgrind: ## Run helgrind, with the correct configuration
126126
.PHONY: ccoverage
127127
ccoverage: ## Run the test suite, with C++ code coverage
128128
$(MAKE) clean
129-
CFLAGS="$(CFLAGS) -O0 -pg --coverage" $(MAKE) build
129+
CFLAGS="$(CFLAGS) -O0 -pg --coverage" CXXFLAGS="$(CXXFLAGS) -O0 -pg --coverage" $(MAKE) build
130130
$(MAKE) check
131131
gcov -i build/*/src/memray/_memray -i -d
132132
lcov --capture --directory . --output-file cppcoverage.lcov

NEWS.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,33 @@ Changelog
88

99
.. towncrier release notes start
1010
11+
memray 1.19.1 (2025-09-29)
12+
--------------------------
13+
14+
- Fix a bug that caused Memray to refuse to produce stack traces for ``pymalloc`` allocations when ``--trace-python-allocators`` was used. (#832)
15+
16+
17+
memray 1.19.0 (2025-09-26)
18+
--------------------------
19+
20+
Features
21+
~~~~~~~~
22+
23+
- Add a mode that can be used in Python 3.13.3 and newer where Memray will track Python object creation and destruction events, which can be used to find leaked objects (ones that were created during a tracking session and not destroyed before the end of that tracking session). (#752)
24+
- Added ``--no-web`` flag to ``flamegraph`` and ``table`` commands for offline HTML report generation. When this flag is specified, memray bundles all external dependencies (Bootstrap, jQuery, D3, DataTables, Plotly.js) directly into the generated HTML files instead of loading them from CDNs. This enables memray to generate fully functional HTML reports on airgapped systems without internet connectivity. (#790)
25+
- Reduced memory profiling overhead and capture file size by changing how
26+
Python code locations are recorded. This makes allocation tracking
27+
faster, produces smaller capture files, and improves the accuracy of
28+
reports that group allocations by source location. (#801)
29+
30+
31+
Bug Fixes
32+
~~~~~~~~~
33+
34+
- Fix a crash that could occur if tracking was started in one thread while another thread was inside of a trace function installed with ``sys.settrace``. This crash wasn't possible to hit with ``memray run``, but could happen when using ``pytest-memray`` and ``pytest-cov`` together. (#823)
35+
- Fix timestamps on the heap usage line chart when Memray is run on a 32-bit platform. (#826)
36+
37+
1138
memray 1.18.0 (2025-08-07)
1239
--------------------------
1340

docs/supported_environments.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ Supported CPU architectures
3434
---------------------------
3535

3636
For Linux, we test on ``i686``, ``x86-64``, and ``aarch64``. Pre-built wheels
37-
are only available on PyPI for ``i686`` and ``x86-64``, though. That is
38-
unlikely to change until cibuildwheel_ provides `non-emulated aarch64 support`_.
37+
are available on PyPI.
3938

4039
For macOS, we test on ``x86-64`` and ``arm64`` - so, both Intel and Apple
4140
Silicon Macs. Pre-built wheels are available for both architectures, though
@@ -71,8 +70,6 @@ Known issues and limitations
7170
start tracking in one thread while another thread is already making use of
7271
the Greenlet library.
7372

74-
.. _cibuildwheel: https://github.com/pypa/cibuildwheel
75-
.. _non-emulated aarch64 support: https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation
7673
.. _an os.exec function: https://docs.python.org/3/library/os.html#os.execl
7774
.. _multiprocessing start method: https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
7875
.. _Cython: http://docs.cython.org/en/latest/

news/790.feature.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

news/801.feature.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)