Skip to content

Commit

Permalink
updating travis config, switching to F strings over format(), update …
Browse files Browse the repository at this point in the history
…supported python versions, minor version bump
  • Loading branch information
byteskeptical committed May 31, 2022
1 parent 1d384b5 commit e09b479
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 16 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
language: python
python:
- "3.3"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
install:
- "pip install coverage"
script: coverage run --source=retry setup.py test
2 changes: 1 addition & 1 deletion LICENSE
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2019, bornwitbugs
Copyright (c) 2019, byteskeptical
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# retry

[![Build Status](https://travis-ci.org/bornwitbugs/retry.svg?branch=master)](https://travis-ci.org/bornwitbugs/retry)
[![Build Status](https://travis-ci.org/byteskeptical/retry.svg?branch=master)](https://travis-ci.org/byteskeptical/retry)

Exception type based retry decorator for all your problematic functions.

Expand Down
6 changes: 6 additions & 0 deletions docs/changes.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# Change Log

v0.0.3:
- Switched to new F strings from .format() for performance reasons.
- Only python 3.6+ supported due to above.
- Pypi packaging preparations.
- Updating Travis config.
7 changes: 3 additions & 4 deletions retry/__init__.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ def _retry(*args, **kwargs):
if type(x) == type(e) and
x.args == e.args)):
raise
msg = ('Retry ({0:d}/{1:d}):\n {2}\n Retrying in {3} '
'second(s)...').format(mtries, tries, str(e)
if str(e) != ''
else repr(e), mdelay)
msg = (f'Retry ({mtries:d}/{tries:d}):\n'
f'{str(e) if str(e) != '' else repr(e)}\n'
f'Retrying in {mdelay} second(s)...')
if not silent:
if logger:
logger.warning(msg)
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
17 changes: 9 additions & 8 deletions setup.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@

setup(
name="retry",
version="0.0.2",
version="0.1.0",

packages=['retry', ],

# metadata for upload to PyPI
author='bornwitbugs',
author_email='40208858+bornwitbugs@users.noreply.github.com',
author='byteskeptical',
author_email='40208858+byteskeptical@users.noreply.github.com',
description=DESCRIPTION,
download_url='https://pypi.python.org/pypi/retry',
download_url='https://pypi.org/project/retry',
license='BSD',
long_description=LONG_DESCRIPTION,
keywords='errors exceptions retry wrapper',
keywords='errors exceptions retry wrapper decorator',
platforms=['any'],
test_suite = 'tests.retry_tests',
url='https://github.com/bornwitbugs/retry',
url='https://github.com/byteskeptical/retry',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand All @@ -39,7 +39,8 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Utilities',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Utilities'
],

)
Empty file modified tests/retry_tests.py
100644 → 100755
Empty file.

0 comments on commit e09b479

Please sign in to comment.