Skip to content

Commit

Permalink
vendore reraise() from six
Browse files Browse the repository at this point in the history
  • Loading branch information
a-detiste authored and ionelmc committed May 2, 2024
1 parent 66e14cd commit 9f6f864
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 0 additions & 1 deletion ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
virtualenv>=16.6.0
pip>=19.1.1
setuptools>=18.0.1
six>=1.14.0
tox
twine
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def read(*names, **kwargs):
],
python_requires='>=3.8',
install_requires=[
# eg: "aspectlib==1.1.1", "six>=1.7",
# eg: "aspectlib==1.1.1",
],
extras_require={
# eg:
Expand Down
14 changes: 12 additions & 2 deletions src/tblib/decorators.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import sys
from functools import wraps

from six import reraise

from . import Traceback


def reraise(tp, value, tb=None):
try:
if value is None:
value = tp()
if value.__traceback__ is not tb:
raise value.with_traceback(tb)
raise value
finally:
value = None
tb = None


class Error:
def __init__(self, exc_type, exc_value, traceback):
self.exc_type = exc_type
Expand Down

1 comment on commit 9f6f864

@mywaiting
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello

This commit seems not upload to PyPI as new version

has any schedule to release this new version?

Please sign in to comment.