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

[#699] Python 3.12 update. #700

Merged
merged 15 commits into from
Oct 10, 2024
Merged

[#699] Python 3.12 update. #700

merged 15 commits into from
Oct 10, 2024

Conversation

dumol
Copy link
Contributor

@dumol dumol commented Oct 4, 2024

Scope

Fixes #699

Updates for Python 3.12.

Changes

Use pynose and importlib.utils instead of nose and imp.

Drive-by changes:

  • Updated pythia.* to latest versions from pythia repo.
  • Simplified cloning independently under Docker, now that CentOS 5 is no longer relevant.

How to try and test the changes

reviewers: @adiroiban

Have only tried to have things green and to follow #693.

Do check if the diff looks alright.

Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.05%. Comparing base (0ab5293) to head (a84aae6).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #700      +/-   ##
==========================================
- Coverage   79.05%   79.05%   -0.01%     
==========================================
  Files          47       47              
  Lines        7739     7738       -1     
  Branches     1172     1151      -21     
==========================================
- Hits         6118     6117       -1     
  Misses       1355     1355              
  Partials      266      266              

see 1 file with indirect coverage changes

Components Coverage Δ
tests ∅ <ø> (∅)

@dumol dumol force-pushed the 699-python312-update branch from df9c125 to 46b3f64 Compare October 4, 2024 13:56
@dumol dumol self-assigned this Oct 4, 2024
@dumol dumol requested a review from adiroiban October 4, 2024 14:23
pavement.py Outdated
@@ -120,7 +120,7 @@ def compile_file(fullname, ddir=None, force=0, rx=None, quiet=0):
if not force:
try:
mtime = int(os.stat(fullname).st_mtime)
expect = struct.pack('<4sl', imp.get_magic(), mtime)
expect = struct.pack('<4sl', MAGIC_NUMBER, mtime)
Copy link
Member

Choose a reason for hiding this comment

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

thanks for the update... the compile_file code shoudl be removed ... and just use upstream code

We had this "fork" here to support py2 migration... and I forgot to clean the code

Copy link
Member

@adiroiban adiroiban left a comment

Choose a reason for hiding this comment

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

Changes looks good. Great work with py3.12 and compat updates.

I did more py3 only cleanup, while doing the review.

I also updated the GHA YAML to run the tests on latest Ubuntu

I tried to simplify the docker YAML code as without older centos, we should be able to use standard GitHub Actions rules.

I have also fixed a bug in the testing code, so we can have a new release

git log -1 --format='%H'

# This action also fails on CentOS 5/6.
- uses: actions/checkout@v4
Copy link
Member

Choose a reason for hiding this comment

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

I went with default git chechout code ... to simplify our GHA yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The downside is it only supports distributions on which GitHub Actions Runner actually runs.

Copy link
Member

Choose a reason for hiding this comment

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

Well... it works on any distribution on which nodejs 16 or 20 can be executed.

I have changed the code and it looks like it also works for Alpine ...for example

GitHub Actions has a separate node_js version compiled for Alpine.

GitHub Actions are doing with nodejs, something similar to what we do with pythia... they distribute various nodejs versions with each GitHub Action runner.


you can mark this as resolved and merge

@dumol
Copy link
Contributor Author

dumol commented Oct 7, 2024

There's one more thing needed before a new compat release: production packages of Pythia. This PR has been using testing packages generated in chevah/pythia#58, which is not yet merged.

@adiroiban
Copy link
Member

Yes... for chevah/compat is not that critical..

I am a bit worried about the new libnsl dependency ... but I see that the code works on OracleLinux 8


I think that we should update the GitHub Actions on Pythia to run some minimal tests via Docker on multiple centos versions ... just to make sure we got our dynamic libraries right

@dumol
Copy link
Contributor Author

dumol commented Oct 10, 2024

I think that we should update the GitHub Actions on Pythia to run some minimal tests via Docker on multiple centos versions ... just to make sure we got our dynamic libraries right

Tracked at chevah/pythia#68.

@dumol dumol merged commit ff42db8 into master Oct 10, 2024
16 checks passed
@dumol dumol deleted the 699-python312-update branch October 10, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.12 update.
3 participants