devsnd / cherrymusic

Stream your own music collection to all your devices! The easy to use free and open-source music streaming server.
http://www.fomori.org/cherrymusic
GNU General Public License v3.0
1.03k stars 189 forks source link

Patch to make it work with Python 3.10 #732

Closed Musikolo closed 2 years ago

Musikolo commented 2 years ago

Hi,

I just want to share a simple patch I had to create for CherryMusic to work with Python 3.10:

diff -ruN cherrymusic-0.41.2/cherrymusicserver/configuration.py cherrymusic-0.41.2-new/cherrymusicserver/configuration.py
--- cherrymusic-0.41.2/cherrymusicserver/configuration.py       2018-02-07 15:47:12.000000000 -0600
+++ cherrymusic-0.41.2-new/cherrymusicserver/configuration.py   2022-01-22 10:57:30.000000000 -0600
@@ -38,7 +38,8 @@
 import re
 import weakref

-from collections import Mapping, namedtuple
+from collections.abc import Mapping
+from collections import namedtuple
 from backport.collections import OrderedDict
 from backport import callable

diff -ruN cherrymusic-0.41.2/tinytag/tinytag.py cherrymusic-0.41.2-new/tinytag/tinytag.py
--- cherrymusic-0.41.2/tinytag/tinytag.py       2018-02-07 15:47:12.000000000 -0600
+++ cherrymusic-0.41.2-new/tinytag/tinytag.py   2022-01-22 10:57:19.000000000 -0600
@@ -23,7 +23,7 @@
 # along with this program. If not, see <http://www.gnu.org/licenses/>
 #

-from collections import MutableMapping
+from collections.abc import MutableMapping
 import codecs
 from functools import reduce
 import struct

It would be great to merge it upstream code.

I hope it helps!

Thanks.

devsnd commented 2 years ago

Hey @Musikolo, I've merged the patch by @tilboerner and therefore this issue is resolved. The lastest version on pypi also contains this fix. Thanks for keeping CM alive <3