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

Light: Remove Python 2 compatibility #4174

Merged
merged 7 commits into from Oct 24, 2022

Conversation

mitzkia
Copy link
Collaborator

@mitzkia mitzkia commented Oct 15, 2022

The main goal of this PR:

  • From the early life of Light there was an endeavor to support Python 2 along with Python 3 (which I intended as an additional value)
  • Python 2 has been EOL-ed
  • In this PR I would like to drop the Python 2 support from Light to focusing on pure Python 3 usage

Additional tasks with this PR:

  • Fixup git commit descriptions
  • Light related make targets (pytest-check, pytest-self-check) should Pass
  • Check a full GitHub Actions pipeline with a new devshell image (related pip package was deleted)

@github-actions
Copy link
Contributor

No news file has been detected. Please write one, if applicable.

@mitzkia mitzkia force-pushed the light_remove_python2_compatibility branch from 020e6ee to 87bbabd Compare October 15, 2022 22:06
mitzkia and others added 5 commits October 16, 2022 08:00
- with dropping Python 2 support from Light pathlib2 pip
package will not needed anymore
- instead of pathlib2 Python 3 native pathlib will be used

Signed-off-by: Andras Mitzki <mitzkia@gmail.com>
- after dropping Python 2 support Path module will be available
via pathlib package

Signed-off-by: Andras Mitzki <mitzkia@gmail.com>
Signed-off-by: Andras Mitzki <mitzkia@gmail.com>
- in Python3 we do not need to convert Path objects to string

Signed-off-by: Andras Mitzki <mitzkia@gmail.com>
- in Python3 we can use time.monotonic()

Signed-off-by: Andras Mitzki <mitzkia@gmail.com>
@mitzkia mitzkia force-pushed the light_remove_python2_compatibility branch from 87bbabd to a224fba Compare October 16, 2022 06:08
Signed-off-by: Andras Mitzki <mitzkia@gmail.com>
- this is only a style-check fix

Signed-off-by: Andras Mitzki <mitzkia@gmail.com>
@mitzkia mitzkia marked this pull request as ready for review October 16, 2022 07:21
@kira-syslogng
Copy link
Contributor

Build FAILURE

@mitzkia
Copy link
Collaborator Author

mitzkia commented Oct 16, 2022

@kira-syslogng test this please;

@mitzkia
Copy link
Collaborator Author

mitzkia commented Oct 17, 2022

Maybe I am wrong, but as I can see new devshell image could built with the changes:
https://github.com/syslog-ng/syslog-ng/actions/runs/3258534477/jobs/5350698749
Could someone else confirm this?

If this is true than I would say:

  • the new (devshell) image could built with the package changes
  • Light could run with the changes in a pure Python 3 environment

So the changes would work.

Copy link
Collaborator

@bazsi bazsi left a comment

Choose a reason for hiding this comment

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

I reviewed the changes in detail, approved.

It seems that we only need Python2 for the kira image now.

@MrAnno MrAnno merged commit e775521 into syslog-ng:master Oct 24, 2022
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.

None yet

5 participants