From 788440a659b1f616f8712fc6fa14257d1d730c1a Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 14 Sep 2026 18:18:18 +0300 Subject: [PATCH 1/2] update version and CI runs, add 3.15rc2 --- .github/workflows/cibuildwheel.yml | 25 +++++++++++++------------ .github/workflows/tests.yml | 6 +++--- setup.py | 6 +++--- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 4b5a0ec..1eeb9c6 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -22,29 +22,30 @@ jobs: steps: # Note: the action happens inside a docker image - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up QEMU if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 with: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.22.0 + uses: pypa/cibuildwheel@v4.2.1 env: - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_MANYLINUX_I686_IMAGE: manylinux2014 - CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014 + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 + CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 CIBW_ARCHS_LINUX: auto aarch64 - CIBW_SKIP: "cp36-* pp* *-win32 *-manylinux_i686 *musllinux*" - CIBW_BEFORE_BUILD_LINUX: yum install -y libunwind-devel elfutils-libelf-devel libdwarf-devel + # cp3*t-*: free-threaded CPython is built by default since + # cibuildwheel 4, but vmprof does not support it + CIBW_SKIP: "pp* cp3*t-* *-win32 *-manylinux_i686 *musllinux*" + CIBW_BEFORE_BUILD_LINUX: dnf install -y libunwind-devel CIBW_BEFORE_TEST: pip install -r test_requirements.txt CIBW_TEST_COMMAND: cd {package} && pytest vmprof jitlog -vv CIBW_TEST_COMMAND_WINDOWS: cd /d {package} && pytest vmprof jitlog -vv CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x}" - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: ${{ matrix.os }} path: ./wheelhouse/*.whl @@ -58,8 +59,8 @@ jobs: steps: # Note: not inside a docker - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 with: python-version: 'pypy-3.11' @@ -92,7 +93,7 @@ jobs: pypy -m build --sdist . - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: path: | vmprof*.whl diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7ea1dc6..87e3d45 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: matrix: # Test all supported versions on Ubuntu: os: [ubuntu-latest] - python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy-3.11"] + python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15.0-rc.2", "pypy-3.11"] experimental: [false] # include: # - os: macos-latest @@ -28,13 +28,13 @@ jobs: # python: "3.10" # experimental: false steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Install libunwind run: | sudo apt install -y libunwind-dev pkg-config libunwind --cflags --libs-only-l - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python }} - name: Install diff --git a/setup.py b/setup.py index a08d79c..d36c9f1 100644 --- a/setup.py +++ b/setup.py @@ -126,7 +126,7 @@ def _supported_unix(): name='vmprof', author='vmprof team', author_email='fijal@baroquesoftware.com', - version="0.4.18.1", + version="0.4.19", packages=find_packages(), description="Python's vmprof client", long_description='See https://vmprof.readthedocs.org/', @@ -138,7 +138,7 @@ def _supported_unix(): 'pytz', 'colorama', ] + extra_install_requires, - python_requires='<3.15', + python_requires='<3.16', tests_require=['pytest','cffi','hypothesis'], entry_points = { 'console_scripts': [ @@ -155,4 +155,4 @@ def _supported_unix(): zip_safe=False, include_package_data=True, ext_modules=ext_modules, -) \ No newline at end of file +) From cf9835a3497317eaacab777c7771617442b59bf7 Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 14 Sep 2026 18:42:03 +0300 Subject: [PATCH 2/2] fix warnings --- jitlog/marks.py | 2 +- vmprof/__main__.py | 4 ++-- vmprof/cli.py | 6 +++--- vmprof/test/test_config.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jitlog/marks.py b/jitlog/marks.py index 4745087..1b42547 100644 --- a/jitlog/marks.py +++ b/jitlog/marks.py @@ -100,7 +100,7 @@ def read_resop(ctx, trace, fileobj): op = FlatOp(opnum, opname, args, result, None, -1, failargs=failargs) trace.add_instr(op) -TOKEN_REGEX = re.compile("TargetToken\((\d+)\)") +TOKEN_REGEX = re.compile(r"TargetToken\((\d+)\)") @mark_parser( 1, diff --git a/vmprof/__main__.py b/vmprof/__main__.py index 54d7cc1..fae421c 100644 --- a/vmprof/__main__.py +++ b/vmprof/__main__.py @@ -42,8 +42,8 @@ def main(): output_mode = OUTPUT_CLI if output_mode == OUTPUT_FILE: - prof_file = args.output - prof_name = prof_file.name + prof_file = open(args.output, 'w+b') + prof_name = args.output else: prof_file = tempfile.NamedTemporaryFile(delete=False) prof_name = prof_file.name diff --git a/vmprof/cli.py b/vmprof/cli.py index 5f067a1..65021b5 100644 --- a/vmprof/cli.py +++ b/vmprof/cli.py @@ -29,7 +29,7 @@ def build_argparser(): parser.add_argument( '--config', - type=argparse.FileType('r'), + metavar='file.ini', ) parser.add_argument( @@ -80,7 +80,6 @@ def build_argparser(): output_mode_args.add_argument( '--output', '-o', metavar='file.prof', - type=argparse.FileType('w+b'), help='Save profiling data to file' ) @@ -101,7 +100,8 @@ def parse_args(argv): ('no-native', bool), ] - ini_parser = IniParser(args.config) + with open(args.config) as f: + ini_parser = IniParser(f) for name, type in ini_options: argname = name.replace("-", "_") diff --git a/vmprof/test/test_config.py b/vmprof/test/test_config.py index 591fc64..3de21fa 100644 --- a/vmprof/test/test_config.py +++ b/vmprof/test/test_config.py @@ -59,7 +59,7 @@ def test_parser_without_section(): 'example.py' ]) - assert test_file == args.config.name + assert test_file == args.config assert args.no_native == True