Skip to content

Commit

Permalink
Merge pull request #4 from sdelements/feature/python_3_depocs
Browse files Browse the repository at this point in the history
Make depocs python 3 compatible
  • Loading branch information
RouganStriker authored Jan 31, 2019
2 parents 2cffa49 + 507a6bc commit d00b66a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ sudo: false
language: python
python:
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
install:
- "pip install -r requirements.txt"
Expand Down
5 changes: 2 additions & 3 deletions depocs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
function arguments. Scoped helps you do this in a safe and convenient way, and
provides very informative error messages when you do something wrong.
"""
from six import with_metaclass

import inspect
import threading
Expand Down Expand Up @@ -121,13 +122,11 @@ class Missing(Error):
A current scope is expected and there isn't one
"""

class LifecycleError(Error):
class LifecycleError(with_metaclass(ScopedClass, Error)):
"""
A scope was opened/closed at the wrong time
"""

__metaclass__ = ScopedClass

class ScopedOptions(object):
"""
Subclasses can use an inner class named 'ScopedOptions' to set some
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
six==1.12.0
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# http://packaging.python.org/en/latest/tutorial.html#version
version='1.0.0',
version='1.0.1',

description='Scoped thread-local mixin class',
long_description=long_description,
Expand Down Expand Up @@ -47,12 +47,13 @@
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],

# What does your project relate to?
Expand All @@ -61,5 +62,8 @@
# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
packages=['depocs'],
install_requires=[
"six==1.12.0"
],
test_suite="tests",
)

0 comments on commit d00b66a

Please sign in to comment.