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

Python 3.12 support #672

Merged
merged 13 commits into from
Apr 19, 2024
Merged

Python 3.12 support #672

merged 13 commits into from
Apr 19, 2024

Conversation

freyes
Copy link
Contributor

@freyes freyes commented Apr 10, 2024

This PR adds support for Python 3.12, summary of changes:

  • Add Python 3.12 to the testing matrix in the github workflow
  • Replace inspect.getargspec() with inspect.getfullargspec()
  • Replace self.assertEquals() with self.assertEqual()
  • Add charmcraft 3.x/beta to the testing matrix
  • Drop charm-templates-openstack from deps
  • setup.py: Drop upper limit in pinning of pip

Checklist

  • Are all your commits [logically] grouped and squashed appropriately?
  • Does this patch have code coverage?
  • Does your code pass make test?

Ubuntu 24.04 carries python 3.12, hence the importance to gate on it.
inspect.getargspec() is deprecated and finally removed in Python
3.11[0], the replacement is to use inspect.getfullargspec(), see [1]

[0] python/cpython@d89fb9a
[1] https://docs.python.org/3.10/library/inspect.html#inspect.getargspec
The former has been removed in newer versions of python.
@freyes freyes changed the title Py312 support Python 3.12 support Apr 10, 2024
@freyes freyes marked this pull request as draft April 10, 2024 15:31
@freyes freyes marked this pull request as ready for review April 15, 2024 13:56
Replace '-e {toxinidir}' with 'package = editable', this allows
adding the source code early in the process and avoid packages listed
in the deps section to pull in charm-tools from pypi.
The package charm-templates-openstack depends on charm-tools, including
it in the list of `deps` in tox.ini creates a circular dependency, since
the `deps` list is processed before installing the local package.
@freyes freyes force-pushed the py312-support branch 2 times, most recently from 48296f7 to 0a20c42 Compare April 17, 2024 19:28
@freyes
Copy link
Contributor Author

freyes commented Apr 17, 2024

evidence that the built charm on ubuntu@24.04 built the right wheels
image, this is the artifact published by the CI run.

@ajkavanagh ajkavanagh merged commit e0592a6 into juju:master Apr 19, 2024
6 checks passed
@addyess
Copy link
Contributor

addyess commented Jul 12, 2024

@freyes or @ajkavanagh

is this incorporated in a new charm snap?
are these changes going to be released to pypi?

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.

3 participants