Skip to content

feat: 🚀 python3.13 support for poetry and library #1595

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

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Conversation

onuralpszr
Copy link
Contributor

Description

Proper python3.13 support configuration and scipy, numpy version enforced to use supported py3.13 package

@onuralpszr onuralpszr self-assigned this Oct 14, 2024
@onuralpszr onuralpszr force-pushed the support/py13 branch 2 times, most recently from cf3b35b to bf345a8 Compare October 14, 2024 10:52
@LinasKo
Copy link
Contributor

LinasKo commented Oct 14, 2024

Thanks @onuralpszr! This looks like it required a lot of tweaking to get working. Good work!

@LinasKo
Copy link
Contributor

LinasKo commented Oct 14, 2024

Out of curiosity, how do lock files react to conditional installs? Do they encode the conditional logic, or do we have a snapshot of specific requirements for a specific python version?

@onuralpszr
Copy link
Contributor Author

onuralpszr commented Oct 14, 2024

Out of curiosity, how do lock files react to conditional installs? Do they encode the conditional logic, or do we have a snapshot of specific requirements for a specific python version?

Lock file, capture a snapshot of the exact versions of dependencies that are installed, including any conditional dependencies. They do not encode the conditional logic itself but rather the resolved dependencies for the environment in which the lock file was generated.

@LinasKo
Copy link
Contributor

LinasKo commented Oct 14, 2024

What happens when we install supervision when we have 3.13, 3.10 vs 3.8 installed?

Based on the previous answer, it seems it will install exact version if the version matches what's available in the lock file, but resolve the dependencies anew (and generate a new file) if not. Is that true?

@LinasKo
Copy link
Contributor

LinasKo commented Oct 14, 2024

Also, I see some CI fails, so I'm, not going to bother you in case you still need to fix things 😄

@onuralpszr
Copy link
Contributor Author

Also, I see some CI fails, so I'm, not going to bother you in case you still need to fix things 😄

CI is weird :) It suppose to work but for some magical reason macos 3.8 and 3.13 decided to not play with me but I will handle it :)

@onuralpszr onuralpszr force-pushed the support/py13 branch 6 times, most recently from 9987c2e to 68b9bcf Compare October 14, 2024 11:42
@onuralpszr
Copy link
Contributor Author

@LinasKo I added contourpy as new dependency but it is already sub-dependency of Matplotlib and my description to toml like this.

# Matplotlib sub-dependency
# The 'contourpy' package is required by Matplotlib for contour plotting.
# We need to ensure compatibility with both Python 3.8 and Python 3.13.
#
# For Python 3.8 and above, we use version 1.0.7 or higher, as it is the lowest major version that supports Python 3.8.
# For Python 3.13 and above, we use version 1.3.0 or higher, as it is the first version that explicitly supports Python 3.13.
contourpy = [
    { version = ">=1.0.7", python = ">=3.8" },
    { version = ">=1.3.0", python = ">=3.13" },
]

Last action run: https://github.com/roboflow/supervision/actions/runs/11326558737/job/31495751852?pr=1595
My last commit force just adding comments so It won't effect out come of last one.

@onuralpszr onuralpszr requested a review from LinasKo October 14, 2024 11:42
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
@LinasKo
Copy link
Contributor

LinasKo commented Oct 14, 2024

I had some issues with building matplotlib, which were solved by updating xcode via the standard system update. Tests pass, docs seem unaffected.

Currently neither ultralytics nor inference support 3.13, so I cannot test thoroughly.

Approving - let's see how other packages develop and fix anything new that arises.

@LinasKo LinasKo added enhancement New feature or request hacktoberfest Open for contributions during the annual Hacktoberfest event, aimed at encouraging open-source parti labels Oct 14, 2024
@LinasKo LinasKo merged commit 213d59d into develop Oct 14, 2024
46 checks passed
@LinasKo
Copy link
Contributor

LinasKo commented Oct 14, 2024

I may revert this. Upon merging and setting up a new repo, I immediately got an issue, failing to install scipy (py 3.12.3). I'll take a bit of time to confirm.

@onuralpszr
Copy link
Contributor Author

onuralpszr commented Oct 14, 2024

I may revert this. Upon merging and setting up a new repo, I immediately got an issue, failing to install scipy. I'll take a bit of time to confirm.

Okay let me know what I can do
Let me also do some tests

@LinasKo
Copy link
Contributor

LinasKo commented Oct 14, 2024

@onuralpszr False alarm - I think I found an issue in my PR cloning tool :)

@onuralpszr onuralpszr deleted the support/py13 branch October 14, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest Open for contributions during the annual Hacktoberfest event, aimed at encouraging open-source parti
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants