Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
erp5
Commits
40086bc9
Commit
40086bc9
authored
2 years ago
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py3: {sorted,sort}() `cmp` argument has been removed.
parent
0de3ab71
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
product/ERP5Type/patches/Restricted.py
product/ERP5Type/patches/Restricted.py
+5
-1
No files found.
product/ERP5Type/patches/Restricted.py
View file @
40086bc9
...
...
@@ -153,10 +153,14 @@ def get_iteritems(c, name):
_dict_white_list
[
'iteritems'
]
=
get_iteritems
def
guarded_sorted
(
seq
,
cmp
=
None
,
key
=
None
,
reverse
=
False
):
if
cmp
is
not
None
:
from
functools
import
cmp_to_key
key
=
cmp_to_key
(
cmp
)
if
not
isinstance
(
seq
,
SafeIter
):
for
i
,
x
in
enumerate
(
seq
):
guard
(
seq
,
x
,
i
)
return
sorted
(
seq
,
cmp
=
cmp
,
key
=
key
,
reverse
=
reverse
)
return
sorted
(
seq
,
key
=
key
,
reverse
=
reverse
)
safe_builtins
[
'sorted'
]
=
guarded_sorted
def
guarded_reversed
(
seq
):
...
...
This diff is collapsed.
Click to expand it.
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