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

fix(hydra): bump Python version to 3.9.1 #2777

Merged
merged 1 commit into from
Dec 13, 2020

Conversation

enaydanov
Copy link
Contributor

@enaydanov enaydanov commented Oct 11, 2020

https://www.python.org/downloads/release/python-390/

What's New in Python 3.9.0 (sorted by probability of facing usage of, in my opinion):

  • PEP 585, Type Hinting Generics In Standard Collections
  • PEP 584, Union Operators in dict
  • PEP 616, String methods to remove prefixes and suffixes
  • PEP 615, Support for the IANA Time Zone Database in the Standard Library
  • PEP 593, Flexible function and variable annotations
  • PEP 614, Relaxing Grammar Restrictions On Decorators

In media:

Open Python 3.9 pylint issues:

PR pre-checks (self review)

  • I followed KISS principle and best practices
  • I didn't leave commented-out/debugging code
  • I added the relevant backport labels
  • New configuration option are added and documented (in sdcm/sct_config.py)
  • I have added tests to cover my changes (Infrastructure only - under unit-test/ folder)
  • All new and existing unit tests passed (CI)
  • I have updated the Readme/doc folder accordingly (if needed)

@enaydanov enaydanov added backport/none Backport is not required New Hydra Version PR# introduces new Hydra version labels Oct 11, 2020
@enaydanov enaydanov self-assigned this Oct 11, 2020
@enaydanov enaydanov requested a review from bentsi October 11, 2020 13:28
@@ -16,7 +16,7 @@ ENV PIP_NO_CACHE_DIR=1
RUN apt-get install -y --no-install-recommends build-essential cmake libssl-dev zlib1g-dev
ADD requirements-python.txt .
RUN mkdir /build && \
pip3 install -r requirements-python.txt --root=/build --prefix=./ --ignore-installed --no-warn-script-location
pip3 install -r requirements-python.txt --root=/build --prefix=./ --ignore-installed --no-warn-script-location --use-feature=2020-resolver
Copy link
Contributor

Choose a reason for hiding this comment

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

I've help tested this feature in europython2020 sprints... it's helpful for our complex requirements.txt

selenium==3.141.0
mysql-connector-python==8.0.19
docker==4.2.0
python-jenkins==1.4.0
ssh2-python==0.18.0.post1
ssh2-python==0.22.0
Copy link
Contributor

Choose a reason for hiding this comment

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

when they did released this one ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They released 0.20.0, 0.21.0 and 0.22.0 in last three weeks. But major change was 0.19.0 in mid-August.

@fruch
Copy link
Contributor

fruch commented Oct 11, 2020

@enaydanov
Any reason we are rushing into 3.9 ?

BTW, seem like we'll need to address some pylint related issues (my guess bug in pylint):
https://jenkins.scylladb.com/job/sct-github-PRs-scan/job/scylla-cluster-tests/job/PR-2777/1/execution/node/23/log/

@enaydanov
Copy link
Contributor Author

@enaydanov
Any reason we are rushing into 3.9 ?

No, there is no rush. This PR is just a kind of a placeholder for this work. And a research work. Eventually, we'll switch to Python 3.9. Bentsi and I decided to have a presentation about new features in Python 3.8 (because we missed this) and 3.9. Maybe next week. After that we can move forward and switch to the new version. Personally, I think it should be like "Why we need to keep old version?" instead of "Why we need to switch to the new one?" Software evolving rapidly and, "my dear, here we must run as fast as we can, just to stay in place. And if you wish to go anywhere you must run twice as fast as that." :)

BTW, seem like we'll need to address some pylint related issues (my guess bug in pylint):
https://jenkins.scylladb.com/job/sct-github-PRs-scan/job/scylla-cluster-tests/job/PR-2777/1/execution/node/23/log/

Yes, you're right: pylint-dev/pylint#3882 And it's a showstopper for us. It's better to wait for them to fix it.

@enaydanov
Copy link
Contributor Author

And there is another one pylint issue: pylint-dev/pylint#3876

@enaydanov enaydanov marked this pull request as ready for review October 13, 2020 00:02
@enaydanov enaydanov requested a review from fruch October 13, 2020 00:02
@enaydanov
Copy link
Contributor Author

I've played a liitle bit with pylint and added a pretty simple workaround for linting issues with typing module.

@fruch
Copy link
Contributor

fruch commented Oct 14, 2020

@enaydanov I think we should take it for a few spins on GCE and AWS first. (even docker)
i.e. we change things like libssh and other packages, I suggest we play as safe as we can, since there is no rush...

# * https://github.com/PyCQA/pylint/issues/3876
# Once these issues will be fixed we can update pylint and remove this plugin.

from astroid import MANAGER, FunctionDef, inference_tip, extract_node
Copy link
Contributor

Choose a reason for hiding this comment

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

from my experience astroid tend to break too often, I would rather wait for a fixed version. (or dive in, and fix it at the source of it)
the only reason I would consider pylint plugins, is for writing our own checks, but I don't have any idea of what we could check, we should consider it regardless of moving to python3.9

@enaydanov enaydanov force-pushed the hydra_python_3.9.0 branch 2 times, most recently from 72d8c0b to 42a125e Compare November 5, 2020 10:16
@enaydanov enaydanov changed the title fix(hydra): bump Python version to 3.9.0 fix(hydra): bump Python version to 3.9.1 Dec 9, 2020
@enaydanov enaydanov force-pushed the hydra_python_3.9.0 branch 2 times, most recently from 0243846 to 1d9351b Compare December 13, 2020 05:43
@bentsi bentsi merged commit 79373e3 into scylladb:master Dec 13, 2020
@enaydanov enaydanov deleted the hydra_python_3.9.0 branch December 13, 2020 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/none Backport is not required New Hydra Version PR# introduces new Hydra version Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants