Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #46 from MousaZeidBaker/fix/test-pipline
Browse files Browse the repository at this point in the history
fix: python 3.6
  • Loading branch information
MousaZeidBaker authored May 9, 2022
2 parents dab454d + c6c72fc commit 4e642d5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up python 3.8
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}

- name: Install poetry 1.1.7
uses: snok/install-poetry@v1
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "poetryup"
version = "0.7.0"
version = "0.7.1"
description = "Update dependencies and bump their version in the pyproject.toml file"
authors = ["Mousa Zeid Baker"]
packages = [
Expand Down
13 changes: 13 additions & 0 deletions src/poetryup/core/pyproject.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
import re
import subprocess
import sys
from typing import Dict, List, Optional, Union

import tomlkit
Expand Down Expand Up @@ -268,6 +269,12 @@ def __get_poetry_version() -> str:
The poetry version installed
"""

if sys.version_info < (3, 7):
return subprocess.check_output(
["poetry", "--version"],
encoding="UTF-8",
)

return (
subprocess.run(
["poetry", "--version"],
Expand All @@ -287,6 +294,12 @@ def __run_poetry_show() -> str:
The output from the poetry show command
"""

if sys.version_info < (3, 7):
return subprocess.check_output(
["poetry", "show", "--tree"],
encoding="UTF-8",
)

return subprocess.run(
["poetry", "show", "--tree"],
capture_output=True,
Expand Down

0 comments on commit 4e642d5

Please sign in to comment.