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 Python 3.12 #170

Merged
merged 10 commits into from
Apr 26, 2024
Merged

Support Python 3.12 #170

merged 10 commits into from
Apr 26, 2024

Conversation

alecandido
Copy link
Member

Unfortunately work-in-progress

@alecandido
Copy link
Member Author

Unfortunately, there is an almost circular dependency with qibo: it is qibojit that depends on qibo, that's why I'm trying to upgrade qibo first.
However, qibo depends on qibojit for the tests, that's why I mistakenly started from here (i.e. I tried first with qibo and it complained about qibojit, but I didn't investigate enough about why...)

@natestemen
Copy link

We're trying to support python 3.12 over on mitiq which has recently added Qibo as a dependency. I took a shot at supporting python 3.12 in Qibo and ran into the circular dependency issue as well. I'm not familiar enough with the project infrastructure to fully understand why, but let me know if there are any smaller things I can look into to help move this along!

@alecandido
Copy link
Member Author

Sorry: I just interrupted because of other priorities. I thought no one needed py3.12 yet.

I believe I could make it by today (if not before). It's non-trivial, but still relatively simple.

@alecandido
Copy link
Member Author

The related PR in Qibo
qiboteam/qibo#1231

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (8eed737) to head (415d90c).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #170   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines         1085      1085           
=========================================
  Hits          1085      1085           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alecandido
Copy link
Member Author

@BrunoLiegiBastonLiegi @renatomello: apparently, there are issues linting the quantum_info module (here and not in Qibo...)
https://github.com/qiboteam/qibojit/actions/runs/8241315355/job/22538457740#step:10:1785
(among the others, of course they are not related to those purely coming from the Numba/CuPy backends)

@BrunoLiegiBastonLiegi
Copy link
Contributor

@BrunoLiegiBastonLiegi @renatomello: apparently, there are issues linting the quantum_info module (here and not in Qibo...) https://github.com/qiboteam/qibojit/actions/runs/8241315355/job/22538457740#step:10:1785 (among the others, of course they are not related to those purely coming from the Numba/CuPy backends)

weird, may be some problem with the lock?

@alecandido
Copy link
Member Author

weird, may be some problem with the lock?

The lock has no problem on its own, but you could inspect the locked Numba version.

qibojit/poetry.lock

Lines 486 to 491 in 8cfaea4

[[package]]
name = "numba"
version = "0.59.0"
description = "compiling Python code using LLVM"
optional = false
python-versions = ">=3.9"

@alecandido
Copy link
Member Author

Just waiting for qiboteam/qibo#1231 to be merged

@alecandido alecandido marked this pull request as ready for review April 26, 2024 09:33
@alecandido
Copy link
Member Author

@BrunoLiegiBastonLiegi @renatomello now that qiboteam/qibo#1231 has been merged, we should be ready to merge this as well

Copy link
Contributor

@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi left a comment

Choose a reason for hiding this comment

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

Thanks @alecandido, I am probably not the most indicated person to look into this, but to me this is ready. Just a note on the numba and pylint version, the earliest version we support is changing because python-3.12 does not support older versions?

@alecandido
Copy link
Member Author

Just a note on the numba and pylint version, the earliest version we support is changing because python-3.12 does not support older versions?

Exactly :)

(Though it is better said the other way round: older versions are not supporting py3.12, because of the dependency arrow)

@alecandido
Copy link
Member Author

Thanks! @stavros11 @BrunoLiegiBastonLiegi

@alecandido alecandido merged commit ae546ef into main Apr 26, 2024
27 checks passed
@alecandido alecandido deleted the py3.12 branch April 26, 2024 11:14
@alecandido
Copy link
Member Author

@natestemen now both Qibo and Qibojit are supporting py3.12 in main. Almost for sure, we'll get another release in less than one month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants