Skip to content

Commit ad07425

Browse files
authored
Merge pull request #278 from mattip/cleanup2
update version and CI runs, add 3.15rc2
2 parents 4665ab6 + cf9835a commit ad07425

7 files changed

Lines changed: 26 additions & 25 deletions

File tree

‎.github/workflows/cibuildwheel.yml‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,30 @@ jobs:
2222

2323
steps:
2424
# Note: the action happens inside a docker image
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v7
2626

2727
- name: Set up QEMU
2828
if: runner.os == 'Linux'
29-
uses: docker/setup-qemu-action@v3
29+
uses: docker/setup-qemu-action@v4
3030
with:
3131
platforms: all
3232

3333
- name: Build wheels
34-
uses: pypa/cibuildwheel@v2.22.0
34+
uses: pypa/cibuildwheel@v4.2.1
3535
env:
36-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
37-
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
38-
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
36+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
37+
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
3938
CIBW_ARCHS_LINUX: auto aarch64
40-
CIBW_SKIP: "cp36-* pp* *-win32 *-manylinux_i686 *musllinux*"
41-
CIBW_BEFORE_BUILD_LINUX: yum install -y libunwind-devel elfutils-libelf-devel libdwarf-devel
39+
# cp3*t-*: free-threaded CPython is built by default since
40+
# cibuildwheel 4, but vmprof does not support it
41+
CIBW_SKIP: "pp* cp3*t-* *-win32 *-manylinux_i686 *musllinux*"
42+
CIBW_BEFORE_BUILD_LINUX: dnf install -y libunwind-devel
4243
CIBW_BEFORE_TEST: pip install -r test_requirements.txt
4344
CIBW_TEST_COMMAND: cd {package} && pytest vmprof jitlog -vv
4445
CIBW_TEST_COMMAND_WINDOWS: cd /d {package} && pytest vmprof jitlog -vv
4546
CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x}"
4647

47-
- uses: actions/upload-artifact@v4
48+
- uses: actions/upload-artifact@v7
4849
with:
4950
name: ${{ matrix.os }}
5051
path: ./wheelhouse/*.whl
@@ -58,8 +59,8 @@ jobs:
5859

5960
steps:
6061
# Note: not inside a docker
61-
- uses: actions/checkout@v4
62-
- uses: actions/setup-python@v5
62+
- uses: actions/checkout@v7
63+
- uses: actions/setup-python@v7
6364
with:
6465
python-version: 'pypy-3.11'
6566

@@ -92,7 +93,7 @@ jobs:
9293
pypy -m build --sdist .
9394
9495
95-
- uses: actions/upload-artifact@v4
96+
- uses: actions/upload-artifact@v7
9697
with:
9798
path: |
9899
vmprof*.whl

‎.github/workflows/tests.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
matrix:
1919
# Test all supported versions on Ubuntu:
2020
os: [ubuntu-latest]
21-
python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy-3.11"]
21+
python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15.0-rc.2", "pypy-3.11"]
2222
experimental: [false]
2323
# include:
2424
# - os: macos-latest
@@ -28,13 +28,13 @@ jobs:
2828
# python: "3.10"
2929
# experimental: false
3030
steps:
31-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v7
3232
- name: Install libunwind
3333
run: |
3434
sudo apt install -y libunwind-dev
3535
pkg-config libunwind --cflags --libs-only-l
3636
- name: Set up Python ${{ matrix.python }}
37-
uses: actions/setup-python@v5
37+
uses: actions/setup-python@v7
3838
with:
3939
python-version: ${{ matrix.python }}
4040
- name: Install

‎jitlog/marks.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def read_resop(ctx, trace, fileobj):
100100
op = FlatOp(opnum, opname, args, result, None, -1, failargs=failargs)
101101
trace.add_instr(op)
102102

103-
TOKEN_REGEX = re.compile("TargetToken\((\d+)\)")
103+
TOKEN_REGEX = re.compile(r"TargetToken\((\d+)\)")
104104

105105
@mark_parser(
106106
1,

‎setup.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def _supported_unix():
126126
name='vmprof',
127127
author='vmprof team',
128128
author_email='fijal@baroquesoftware.com',
129-
version="0.4.18.1",
129+
version="0.4.19",
130130
packages=find_packages(),
131131
description="Python's vmprof client",
132132
long_description='See https://vmprof.readthedocs.org/',
@@ -138,7 +138,7 @@ def _supported_unix():
138138
'pytz',
139139
'colorama',
140140
] + extra_install_requires,
141-
python_requires='<3.15',
141+
python_requires='<3.16',
142142
tests_require=['pytest','cffi','hypothesis'],
143143
entry_points = {
144144
'console_scripts': [
@@ -155,4 +155,4 @@ def _supported_unix():
155155
zip_safe=False,
156156
include_package_data=True,
157157
ext_modules=ext_modules,
158-
)
158+
)

‎vmprof/__main__.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def main():
4242
output_mode = OUTPUT_CLI
4343

4444
if output_mode == OUTPUT_FILE:
45-
prof_file = args.output
46-
prof_name = prof_file.name
45+
prof_file = open(args.output, 'w+b')
46+
prof_name = args.output
4747
else:
4848
prof_file = tempfile.NamedTemporaryFile(delete=False)
4949
prof_name = prof_file.name

‎vmprof/cli.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def build_argparser():
2929

3030
parser.add_argument(
3131
'--config',
32-
type=argparse.FileType('r'),
32+
metavar='file.ini',
3333
)
3434

3535
parser.add_argument(
@@ -80,7 +80,6 @@ def build_argparser():
8080
output_mode_args.add_argument(
8181
'--output', '-o',
8282
metavar='file.prof',
83-
type=argparse.FileType('w+b'),
8483
help='Save profiling data to file'
8584
)
8685

@@ -101,7 +100,8 @@ def parse_args(argv):
101100
('no-native', bool),
102101
]
103102

104-
ini_parser = IniParser(args.config)
103+
with open(args.config) as f:
104+
ini_parser = IniParser(f)
105105

106106
for name, type in ini_options:
107107
argname = name.replace("-", "_")

‎vmprof/test/test_config.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def test_parser_without_section():
5959
'example.py'
6060
])
6161

62-
assert test_file == args.config.name
62+
assert test_file == args.config
6363
assert args.no_native == True
6464

6565

0 commit comments

Comments
 (0)