FreeBSD Bugzilla – Attachment 225639 Details for
Bug 255732
audio/beets: broken with python38.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix runtime with python 3.8 and 3.9.
blah.patch (text/plain), 2.07 KB, created by
Alexandre C. GuimarĂ£es
on 2021-06-08 15:03:21 UTC
(
hide
)
Description:
Fix runtime with python 3.8 and 3.9.
Filename:
MIME Type:
Creator:
Alexandre C. GuimarĂ£es
Created:
2021-06-08 15:03:21 UTC
Size:
2.07 KB
patch
obsolete
>diff --git a/audio/beets/Makefile b/audio/beets/Makefile >index c6b6fd0961b3..80a110b0c470 100644 >--- a/audio/beets/Makefile >+++ b/audio/beets/Makefile >@@ -2,7 +2,7 @@ > > PORTNAME= beets > PORTVERSION= 1.4.9 >-PORTREVISION= 4 >+PORTREVISION= 5 > CATEGORIES= audio python > MASTER_SITES= CHEESESHOP > >diff --git a/audio/beets/files/patch-beets_util_functemplate.py b/audio/beets/files/patch-beets_util_functemplate.py >new file mode 100644 >index 000000000000..6948dac76232 >--- /dev/null >+++ b/audio/beets/files/patch-beets_util_functemplate.py >@@ -0,0 +1,39 @@ >+--- beets/util/functemplate.py.orig 2021-06-08 14:54:08 UTC >++++ beets/util/functemplate.py >+@@ -73,16 +73,26 @@ def ex_literal(val): >+ """An int, float, long, bool, string, or None literal with the given >+ value. >+ """ >+- if val is None: >+- return ast.Name('None', ast.Load()) >+- elif isinstance(val, six.integer_types): >+- return ast.Num(val) >+- elif isinstance(val, bool): >+- return ast.Name(bytes(val), ast.Load()) >+- elif isinstance(val, six.string_types): >+- return ast.Str(val) >+- raise TypeError(u'no literal for {0}'.format(type(val))) >+- >++ if sys.version_info[:2] < (3, 4): >++ if val is None: >++ return ast.Name('None', ast.Load()) >++ elif isinstance(val, six.integer_types): >++ return ast.Num(val) >++ elif isinstance(val, bool): >++ return ast.Name(bytes(val), ast.Load()) >++ elif isinstance(val, six.string_types): >++ return ast.Str(val) >++ raise TypeError(u'no literal for {0}'.format(type(val))) >++ elif sys.version_info[:2] < (3, 6): >++ if val in [None, True, False]: >++ return ast.NameConstant(val) >++ elif isinstance(val, six.integer_types): >++ return ast.Num(val) >++ elif isinstance(val, six.string_types): >++ return ast.Str(val) >++ raise TypeError(u'no literal for {0}'.format(type(val))) >++ else: >++ return ast.Constant(val) >+ >+ def ex_varassign(name, expr): >+ """Assign an expression into a single variable. The expression may
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 255732
: 225639