chevah / compat

Chevah OS Compatibility Layer
Other
4 stars 1 forks source link

[#132] Base py3 migration. #676

Closed adiroiban closed 1 year ago

adiroiban commented 2 years ago

Scope

Fix #132

This is the migration of the compat code to py3.

It removes py2 support as we don't want to look back :)

Changes

NT and Unix services compat were removed as they are no longer used. We now use external tools to manage our daemons.

NT command line unicode converting code was removed as it's no longer an issue with py3.

The package definition was "modernized" to declare everyting inside setup.cfg

the package was moved outside of the namespace package. With a new package name, in theory we can have both old and new compat installed at the same time. it was also moved into a dedicates 'src' path.

The change was easy as we have already prepared most of the compat code for py3.

How to try and test the changes

reviewers: @danuker

check that changes make sense.

We will know for sure if this work, once we integrated it with chevah-server

codecov[bot] commented 1 year ago

Codecov Report

Merging #676 (a7c2682) into master (ffeb6f6) will decrease coverage by 8.65%. The diff coverage is n/a.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #676 +/- ## ========================================== - Coverage 88.16% 79.51% -8.65% ========================================== Files 58 52 -6 Lines 8205 7797 -408 Branches 676 781 +105 ========================================== - Hits 7234 6200 -1034 - Misses 757 1330 +573 - Partials 214 267 +53 ``` [see 51 files with indirect coverage changes](https://app.codecov.io/gh/chevah/compat/pull/676/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=chevah) | Components | Coverage Δ | | |---|---|---| | tests | `∅ <ø> (∅)` | |
adiroiban commented 1 year ago

From Mișu


i guess the ones with glibc older than 2.26 should be removed when switching to a newer py3 version:

10:13 amazon 2018.03, centos 5/6/7, ubuntu 14.04/16.04 10:15 and maybe also bump the version of alpine to 3.18, no other changes should be required for it

adiroiban commented 1 year ago

python3 bare tests are green... I guess we can switch to 3.11 :)

adiroiban commented 1 year ago

I am going to merge this... the future is py3.

We can create a separate branch is we need py2 backward compatibility releases

adiroiban commented 1 year ago

Dan, please take a quick look at this.

The main changes are tested in chevah/server but we also need a good test coverage here.

note that this is the initial py3.8 preparation work.

The final green test run is with python 3.11 at https://github.com/chevah/compat/pull/693

needs-review