Skip to content

TST: Test against Python 3.12 pre-prelease - #14784

Merged
pllim merged 1 commit into
astropy:mainfrom
pllim:python-3.12
Sep 21, 2023
Merged

pllim merged 1 commit into
astropy:mainfrom
pllim:python-3.12

Conversation

@pllim

@pllim pllim commented May 7, 2023 •

Copy link
Copy Markdown
Member

Description

This pull request is to see if we will be compatible with Python 3.12 (#14783). Only the alpha is out, so I am feeling this is going to fail horribly now because we also need upstream stuff to be compatible first. We can always re-run this PR as needed.

Fix #14783

Close #15238 (hopefully)

Companion of #15331

TODO:

Blocked by:

Not blocker but linked to this PR:

@github-actions

github-actions Bot commented May 7, 2023

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see "When to rebase and squash commits".
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • Is a milestone set? Milestone must be set but we cannot check for it on Actions; do not let the green checkmark fool you.
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@github-actions

github-actions Bot commented May 7, 2023

Copy link
Copy Markdown
Contributor

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

@pllim

pllim commented Aug 17, 2023

Copy link
Copy Markdown
Member Author

Huh, why is the devdeps job not picking up numpy 2.0.dev wheel from https://anaconda.org/scientific-python-nightly-wheels/numpy/files ? They seem to have some cp312 ones.

@pllim

pllim commented Aug 17, 2023

Copy link
Copy Markdown
Member Author

Looks like asdf-astropy is downgrading numpy for some reason...

https://github.com/astropy/astropy/actions/runs/5896110330/job/15993310599?pr=14784

Comment thread .github/workflows/ci_workflows.yml Outdated
@WilliamJamieson

Copy link
Copy Markdown
Contributor

Looks like asdf-astropy is downgrading numpy for some reason...

astropy/astropy/actions/runs/5896110330/job/15993310599?pr=14784

It is not, for some reason it had oldest-supported-numpy as a build-system dependency which was never necessary.

astropy/asdf-astropy#193 should fix this.

@pllim

This comment was marked as resolved.

@pllim
pllim force-pushed the python-3.12 branch 2 times, most recently from 2c0a48d to 8a612a4 Compare August 18, 2023 21:43
@pllim pllim mentioned this pull request Aug 18, 2023
2 tasks done
@pllim

pllim commented Aug 18, 2023

Copy link
Copy Markdown
Member Author

pyerfa is still not playing well with Python 3.12 (see errors in liberfa/pyerfa#111). I have to disable it here.

@pllim pllim added Build all wheels Run all the wheel builds rather than just a selection and removed Experimental labels Aug 18, 2023
@pllim

This comment was marked as resolved.

@pllim pllim mentioned this pull request Aug 18, 2023
1 task
@pllim

pllim commented Aug 19, 2023

Copy link
Copy Markdown
Member Author

Ah... maybe because numpy 1.25 does not have a cp312 wheel, so it is trying to build numpy from source before building astropy...

Comment thread .github/workflows/publish.yml Outdated
@mwcraig

This comment was marked as resolved.

Comment thread pyproject.toml
@pllim
pllim force-pushed the python-3.12 branch 2 times, most recently from e9a5bb2 to ff428a3 Compare September 21, 2023 00:52
@pllim

This comment was marked as resolved.

@mhvk

mhvk commented Sep 21, 2023

Copy link
Copy Markdown
Contributor

@pllim - the deprecation of np.char seems quite painful -- it appears we use it in quite a few places. I had a quick look and think the use in astropy.table is fairly easy to fix, but I'm more worried about io.fits... It may be an idea to just filter the warning for now here, so you can make wrap this up (of course, raising a separate issue...).

@pllim

pllim commented Sep 21, 2023

Copy link
Copy Markdown
Member Author

Actually the chararray stuff might not be as dire as it sounds. I only found one line that needed replacing I think. Let's see what the CI says over at #15363 🤞

Also have to catch KeyError in NDSlicingMixin for uncertainty and mask now.

BLD: Add py312 wheels.

BLD: Update cython to 0.29.36 for Python 3.12.
@pllim
pllim marked this pull request as ready for review September 21, 2023 16:10
@pllim
pllim requested a review from taldcroft as a code owner September 21, 2023 16:10
@pllim
pllim enabled auto-merge September 21, 2023 16:26
@pllim
pllim merged commit ea32c9c into astropy:main Sep 21, 2023
@lumberbot-app

This comment was marked as resolved.

@pllim

pllim commented Sep 21, 2023

Copy link
Copy Markdown
Member Author

Of course there are conflicts. Otherwise it would be too easy. I'll take care of it.

@mhvk

mhvk commented Sep 21, 2023

Copy link
Copy Markdown
Contributor

Thanks so much, @pllim!!! 🎆

pllim added a commit that referenced this pull request Sep 21, 2023
for Pyhon 3.12. This was supposed to be in #14784 but got lost in rebase.

Co-authored-by: Maximilian Linhoff <[email protected]>
@pllim

pllim commented Sep 21, 2023

Copy link
Copy Markdown
Member Author

maxnoe's Cython bump was lost in the rebase. I fixed at in 709ce95 in main. 😬

pllim added a commit to pllim/astropy that referenced this pull request Sep 21, 2023
pllim added a commit to pllim/astropy that referenced this pull request Sep 22, 2023
pllim added a commit to pllim/astropy that referenced this pull request Sep 22, 2023
pllim added a commit that referenced this pull request Sep 22, 2023
…e-prelease) (#15370)

* Backport PR #14784: TST: Test against Python 3.12 pre-prelease

* cosmology changed a lot

* DOC: main has no more setup.cfg but that is irrelevant for v5.3.x so we just stop cross-ref.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Build all wheels Run all the wheel builds rather than just a selection Python 3.12 testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failures with Python 3.12 and astropy 5.3.2 TST: Python 3.12 support

10 participants