Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
F
FreeBSD ports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
3
Snippets
Groups
Projects
Show more breadcrumbs
FreeBSD
FreeBSD ports
Commits
21f093c1
Verified
Commit
21f093c1
authored
3 years ago
by
sunpoet
Browse files
Options
Downloads
Patches
Plain Diff
devel/py-zope.sequencesort: Fix build with setuptools 58.0.0+
With hat: python
parent
7ff6c303
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
devel/py-zope.sequencesort/files/patch-2to3
+45
-0
45 additions, 0 deletions
devel/py-zope.sequencesort/files/patch-2to3
with
45 additions
and
0 deletions
devel/py-zope.sequencesort/files/patch-2to3
0 → 100644
+
45
−
0
View file @
21f093c1
--- src/zope/sequencesort/ssort.py.orig 2007-10-03 03:58:37 UTC
+++ src/zope/sequencesort/ssort.py
@@ -66,13 +66,13 @@
def sort(sequence, sort=(), _=None, mapping=0):
# clean the mess a bit
if multsort: # More than one sort key.
- sortfields = map(lambda x: x[0], sf_list)
+ sortfields = [x[0] for x in sf_list]
else:
sort = sf_list[0][0]
elif sort:
if multsort: # More than one sort key.
- sortfields = map(lambda x: x[0], sort)
+ sortfields = [x[0] for x in sort]
else:
sort = sort[0][0]
@@ -133,7 +133,7 @@
def nocase(str1, str2):
return cmp(str1.lower(), str2.lower())
import sys
-if sys.modules.has_key("locale"): # only if locale is already imported
+if "locale" in sys.modules: # only if locale is already imported
from locale import strcoll
def strcoll_nocase(str1, str2):
@@ -157,7 +157,7 @@
def make_sortfunctions(sortfields, _):
elif l == 3:
pass
else:
- raise SyntaxError, "sort option must contains no more than 2 fields"
+ raise SyntaxError("sort option must contains no more than 2 fields")
f_name = f[1]
@@ -184,7 +184,7 @@
def make_sortfunctions(sortfields, _):
elif sort_order == "desc":
multiplier = -1
else:
- raise SyntaxError, "sort direction must be either ASC or DESC"
+ raise SyntaxError("sort direction must be either ASC or DESC")
sf_list.append((f[0], func, multiplier))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment