Skip to content

Commit

Permalink
Drop Python 3.5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthchirp committed Sep 8, 2020
1 parent 59eeebb commit d17c85a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
7 changes: 0 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,3 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
ignore:
- dependency-name: "mock"
# mock 4 requires Python 3.6+
versions: [">=4"]
- dependency-name: "stomp.py"
# stomp.py 6 requires Python 3.6+
versions: [">=6"]
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: python

matrix:
include:
- python: 3.5
- python: 3.6
- python: 3.7
- python: 3.8
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
download_url="https://github.com/DiamondLightSource/python-workflows/releases",
version="2.1",
install_requires=["setuptools", "stomp.py"],
python_requires=">=3.5",
python_requires=">=3.6",
packages=find_packages(),
license="BSD",
entry_points={
Expand All @@ -40,7 +40,6 @@
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
Expand Down
10 changes: 5 additions & 5 deletions workflows/recipe/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ def validate_recipe(json_filename):
with open(json_filename) as f:
recipe_text = f.read()
except Exception:
logging.exception("Could not read recipe from {}".format(json_filename))
logging.exception(f"Could not read recipe from {json_filename}")
raise

# Turn it into a recipe and validate
try:
# Create a recipe object and validate it
workflows.recipe.Recipe(recipe_text).validate()
except json.JSONDecodeError as e:
logging.error("JSON error in recipe {}:\n{}".format(json_filename, e))
logging.error(f"JSON error in recipe {json_filename}:\n{e}")
raise e
except workflows.Error as e:
logging.error("Problem in recipe {}:\n{}".format(json_filename, e))
logging.error(f"Problem in recipe {json_filename}:\n{e}")
raise e
except Exception as e:
logging.error("Problem in recipe {}: {}".format(json_filename, e))
logging.error(f"Problem in recipe {json_filename}: {e}")
raise e


Expand All @@ -70,7 +70,7 @@ def main():
# Let the user know which files had errors (summary of previous output)
# Otherwise exit silently
if failed_files:
print("Errors found in the following recipes: {}".format(failed_files))
print(f"Errors found in the following recipes: {failed_files}")
sys.exit(1)


Expand Down

0 comments on commit d17c85a

Please sign in to comment.