Projects
Factory:RISC-V:Python
python-testtools
_service:extract_file:testtools-2.4.0-fix-py3-c...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:extract_file:testtools-2.4.0-fix-py3-compat.patch of Package python-testtools
diff -urN testtools-2.4.0/testtools/_compat2x.py testtools-2.4.0-new/testtools/_compat2x.py --- testtools-2.4.0/testtools/_compat2x.py 2015-11-08 01:27:33.000000000 +0800 +++ testtools-2.4.0-new/testtools/_compat2x.py 1970-01-01 08:00:00.000000000 +0800 @@ -1,17 +0,0 @@ -# Copyright (c) 2011 testtools developers. See LICENSE for details. - -"""Compatibility helpers that are valid syntax in Python 2.x. - -Only add things here if they *only* work in Python 2.x or are Python 2 -alternatives to things that *only* work in Python 3.x. -""" - -__all__ = [ - 'reraise', - ] - - -def reraise(exc_class, exc_obj, exc_tb, _marker=object()): - """Re-raise an exception received from sys.exc_info() or similar.""" - raise exc_class, exc_obj, exc_tb - diff -urN testtools-2.4.0/testtools/compat.py testtools-2.4.0-new/testtools/compat.py --- testtools-2.4.0/testtools/compat.py 2018-04-05 07:27:14.000000000 +0800 +++ testtools-2.4.0-new/testtools/compat.py 2021-08-06 10:55:13.294527126 +0800 @@ -33,10 +33,7 @@ # To let setup.py work, make this a conditional import. linecache = try_import('linecache2') -try: - from testtools import _compat2x as _compat -except SyntaxError: - from testtools import _compat3x as _compat +from testtools import _compat3x as _compat reraise = _compat.reraise
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2