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
5c56bc7b
Commit
5c56bc7b
authored
Apr 06, 2022
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py3: {sorted,sort}() `cmp` argument has been removed.
parent
c9479eaf
Changes
1
Hide 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 @
5c56bc7b
...
@@ -200,10 +200,14 @@ def get_iteritems(c, name):
...
@@ -200,10 +200,14 @@ def get_iteritems(c, name):
_dict_white_list
[
'iteritems'
]
=
get_iteritems
_dict_white_list
[
'iteritems'
]
=
get_iteritems
def
guarded_sorted
(
seq
,
cmp
=
None
,
key
=
None
,
reverse
=
False
):
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
):
if
not
isinstance
(
seq
,
SafeIter
):
for
i
,
x
in
enumerate
(
seq
):
for
i
,
x
in
enumerate
(
seq
):
guard
(
seq
,
x
,
i
)
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
safe_builtins
[
'sorted'
]
=
guarded_sorted
def
guarded_reversed
(
seq
):
def
guarded_reversed
(
seq
):
...
...
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