Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
transaction
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
transaction
Commits
752e4d2b
Commit
752e4d2b
authored
Mar 10, 2017
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need for binary type
parent
03984293
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
transaction/_compat.py
transaction/_compat.py
+0
-2
transaction/_transaction.py
transaction/_transaction.py
+1
-2
No files found.
transaction/_compat.py
View file @
752e4d2b
...
...
@@ -9,14 +9,12 @@ if PY3: # pragma: no cover
integer_types
=
int
,
class_types
=
type
,
text_type
=
str
binary_type
=
bytes
long
=
int
else
:
string_types
=
basestring
,
integer_types
=
(
int
,
long
)
class_types
=
(
type
,
types
.
ClassType
)
text_type
=
unicode
binary_type
=
str
long
=
long
def
bytes_
(
s
,
encoding
=
'latin-1'
,
errors
=
'strict'
):
#pragma NO COVER
...
...
transaction/_transaction.py
View file @
752e4d2b
...
...
@@ -23,7 +23,6 @@ from zope.interface import implementer
from
transaction.weakset
import
WeakSet
from
transaction.interfaces
import
TransactionFailedError
from
transaction
import
interfaces
from
transaction._compat
import
binary_type
from
transaction._compat
import
reraise
from
transaction._compat
import
get_thread_ident
from
transaction._compat
import
native_
...
...
@@ -760,7 +759,7 @@ def text_or_warn(s):
return
s
warnings
.
warn
(
"Expected text"
,
DeprecationWarning
,
stacklevel
=
3
)
if
isinstance
(
s
,
b
inary_type
):
if
isinstance
(
s
,
b
ytes
):
return
s
.
decode
(
'utf-8'
,
'replace'
)
else
:
return
text_type
(
s
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment