Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'

Expand Down Expand Up @@ -92,7 +93,7 @@ jobs:
pypy -m build --sdist .


- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
path: |
vmprof*.whl
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion jitlog/marks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
Expand All @@ -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': [
Expand All @@ -155,4 +155,4 @@ def _supported_unix():
zip_safe=False,
include_package_data=True,
ext_modules=ext_modules,
)
)
4 changes: 2 additions & 2 deletions vmprof/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions vmprof/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def build_argparser():

parser.add_argument(
'--config',
type=argparse.FileType('r'),
metavar='file.ini',
)

parser.add_argument(
Expand Down Expand Up @@ -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'
)

Expand All @@ -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("-", "_")
Expand Down
2 changes: 1 addition & 1 deletion vmprof/test/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Loading