Skip to content

Commit

Permalink
Python 3.8 support (#44)
Browse files Browse the repository at this point in the history
Co-authored-by: Manatsawin Hanmongkolchai <manatsawin+git@lmwn.com>
  • Loading branch information
whs and Manatsawin Hanmongkolchai committed May 11, 2022
1 parent 6107f75 commit 88b12c2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.7-buster
FROM python:3.10-bullseye
ENV PYTHONUNBUFFERED=true

RUN wget -O /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.15.3/bin/linux/amd64/kubectl && \
RUN wget -O /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.24.0/bin/linux/amd64/kubectl && \
chmod +x /usr/local/bin/kubectl

COPY . /app/
Expand Down
2 changes: 1 addition & 1 deletion eastern/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def job(ctx, file, namespace, tag, edit, timeout, **kwargs):
manifest = format_yaml(file, namespace, edit=edit, extra=kwargs["set"], print=False)

# Modify the name to contain imageTag
manifest = list(yaml.load_all(manifest))
manifest = list(yaml.safe_load_all(manifest))

found_job = False
for item in manifest:
Expand Down
2 changes: 1 addition & 1 deletion eastern/kubeyml_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def is_rolling_resource(doc):


def get_supported_rolling_resources(text):
yml = yaml.load_all(text)
yml = yaml.safe_load_all(text)
results = []
for doc in yml:
if is_rolling_resource(doc):
Expand Down
4 changes: 2 additions & 2 deletions eastern/yaml_formatter/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import collections
import collections.abc
from pathlib import Path


def flatten(l):
for el in l:
if isinstance(el, collections.Iterable) and not isinstance(el, str):
if isinstance(el, collections.abc.Iterable) and not isinstance(el, str):
for sub in flatten(el):
yield sub
else:
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
description="Simple Kubernetes Deployment",
long_description=open(os.path.join(os.path.dirname(__file__), "README.md")).read(),
long_description_content_type="text/markdown",
version="4.5.1",
version="5.0.0",
packages=find_packages(),
url="https://github.com/wongnai/eastern",
install_requires=["Click~=6.7", "click-log~=0.3.2", "PyYAML~=4.2b4", "stevedore~=1.29.0", "pre-commit~=1.18.3"],
install_requires=["Click~=6.7", "click-log~=0.3.2", "PyYAML~=6.0", "stevedore~=1.29.0"],
setup_requires=["pytest-runner"],
tests_require=["pytest", "pytest-asyncio"],
python_requires=">=3.9",
entry_points={
"console_scripts": ["eastern = eastern.cli:cli"],
"eastern.command": [
Expand Down

0 comments on commit 88b12c2

Please sign in to comment.