Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support py3.11 and py3.12 #248

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions .azure/publish-release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ schedules:

variables:
# ---- COMMON ----
CIBW_VERSION: "2.8.*"
PY_VERSION: "3.10"
CIBW_VERSION: "2.18.*"
PY_VERSION: "3.11"

jobs:
- job: Build_Wheels
Expand Down
4 changes: 2 additions & 2 deletions .azure/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ pr: none

variables:
# ---- COMMON ----
CIBW_VERSION: "2.8.*"
PY_VERSION: "3.10"
CIBW_VERSION: "2.18.*"
PY_VERSION: "3.11"

jobs:
- job: Build_Wheels
Expand Down
23 changes: 23 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,30 @@ jobs:
'Ubuntu 22.04 LTS with Python 3.11':
image: ubuntu-22.04
python-version: "3.11"
'Ubuntu 22.04 LTS with Python 3.12':
Copy link
Contributor

Choose a reason for hiding this comment

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

I am all in favour of adding 3.11 and 3.12, but I think it makes more sense to look at it as updating the set of Python versions run by the CI. I think makes very little sense to keep all the old versions. Surely 3.7 can be dropped by now? (I'm not enough of a Python user to have a good sense for which versions we should keep ...)

Copy link
Author

@LY1806620741 LY1806620741 May 30, 2024

Choose a reason for hiding this comment

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

I think the new version can only focus on Python 3.9 above

Copy link
Author

Choose a reason for hiding this comment

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

Yesterday I installed Centos7, and found the latest rpm package is Python 3.6.This means that there may some people still using the old version

image: ubuntu-22.04
python-version: "3.12"
'macOS 11 with Python 3.10':
image: macOS-11
python-version: "3.10"
'macOS 11 with Python 3.11':
image: macOS-11
python-version: "3.11"
'macOS 11 with Python 3.12':
image: macOS-11
python-version: "3.12"
'Windows Server with Python 3.7':
image: windows-latest
python-version: "3.7"
'Windows Server with Python 3.10':
image: windows-latest
python-version: "3.10"
'Windows Server with Python 3.11':
image: windows-latest
python-version: "3.11"
'Windows Server with Python 3.12':
image: windows-latest
python-version: "3.12"
'Fuzzer on Ubuntu 22.04 LTS with Python 3.7':
image: ubuntu-22.04
python-version: "3.7"
Expand All @@ -78,6 +93,14 @@ jobs:
image: ubuntu-22.04
python-version: "3.10"
run-fuzzing: true
'Fuzzer on Ubuntu 22.04 LTS with Python 3.11':
image: ubuntu-22.04
python-version: "3.11"
run-fuzzing: true
'Fuzzer on Ubuntu 22.04 LTS with Python 3.12':
image: ubuntu-22.04
python-version: "3.12"
run-fuzzing: true
steps:
- download: current
artifact: cyclone-$(Agent.OS)-Release
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ markers = ["fuzzing: run the fuzzing testsuite."]
[tool.cibuildwheel]

# Skip PyPy (C API incompatible), Skip 32bit systems, Skip universal binaries macOS (we build specific intel/arm ones)
skip = "pp* *-win32 *_i686 *-macosx_universal2:arm64"
skip = "cp3{6..10}-* pp* *-win32 *_i686 *-macosx_universal2:arm64"

# Don't test arm64 macos wheels (we cannot do this on ci: crossbuild)
test-skip = "*-macosx_arm64"
Expand All @@ -26,7 +26,7 @@ test-command = "pytest -s --verbose {package}/tests"
test-extras = ["dev"]

before-all = [
"git clone --branch master --depth 1 https://github.com/eclipse-cyclonedds/cyclonedds.git main",
"git clone --branch releases/0.10.x --depth 1 https://github.com/eclipse-cyclonedds/cyclonedds.git",
Copy link
Contributor

Choose a reason for hiding this comment

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

We mustn't change the core cyclonedds repo branch to releases/0.10.x on the master branch of the Python binding!

Copy link
Author

Choose a reason for hiding this comment

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

I think that we needed to add version 0.10.2 for cyclonedds-python, but there was a change in the main branch of C development. In fact, it is already a new version, so I am a bit confused about what to do

Copy link
Author

Choose a reason for hiding this comment

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

I saw a bug in the main branch of Cyclonedds C version 0.10.3, which caused the build to fail, see https://dev.azure.com/eclipse-cyclonedds/cyclonedds-python/_build/results?buildId=6119&view=results

Copy link
Author

Choose a reason for hiding this comment

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

It is possible to update and wait for a stable version of 0.10.3 before building a more secure one

Copy link
Author

@LY1806620741 LY1806620741 Jun 3, 2024

Choose a reason for hiding this comment

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

@eboasson hi, I build python 3.11+ version for cyclonedds-python0.10.2、cyclonedds0.10.2, Can you confirm and upload it to the pypi library? The build script is open source, and the entire execution is in the github container. I tested that it is available on both windows and linux.

https://github.com/LY1806620741/unitree_sdk2_python/actions/runs/9350099214

"mkdir cyclonedds-build",
"mkdir build"
]
Expand All @@ -50,7 +50,7 @@ before-build = [

# By default there is no repair command on windows set, use delvewheel
repair-wheel-command = [
"pip install delvewheel==0.0.18",
"pip install delvewheel==1.6.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

0.0.18 to 1.6.0 ... I think I should try to understand what delvewheel does before merging this 🤔

Copy link
Author

Choose a reason for hiding this comment

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

Delvewheel is a command-line tool that modifies Python wheel packages and injects dependency dynamic libraries to make them independently bundled.

I built the Windows x64 version on my GitHub pipeline and it looks fine.
https://github.com/LY1806620741/unitree_sdk2_python/blob/37967b640de394992fc7bf06147daf856213a38b/.github/workflows/python-package.yml#L48

In the end, it injected a complete DLL file. see https://github.com/LY1806620741/unitree_sdk2_python/releases/tag/3.11

well, delvewheel 0.0.18 supports up to Python 3.9.see https://pypi.org/project/delvewheel/0.0.18/

at 1.0.0,it Label project as production/stable. https://github.com/adang1345/delvewheel/blob/master/CHANGELOG.md

"delvewheel repair -w {dest_dir} --no-mangle-all {wheel}"
]

Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent"
],
packages=find_packages(".", include=("cyclonedds", "cyclonedds.*")),
Expand Down