syncplay: Syncplay doesn't start on Python 3.12
Describe the bug
I am on Fedora 39 beta which ships with Python 3.12 and unable to ./syncplayClient.py
.
└┌(%:~/src/github.com/syncplay/syncplay)┌- ./syncplayClient.py --help
Traceback (most recent call last):
File "/home/aminda/src/github.com/syncplay/syncplay/./syncplayClient.py", line 14, in <module>
from syncplay import ep_client
File "/home/aminda/src/github.com/syncplay/syncplay/syncplay/ep_client.py", line 3, in <module>
from syncplay.clientManager import SyncplayClientManager
File "/home/aminda/src/github.com/syncplay/syncplay/syncplay/clientManager.py", line 4, in <module>
from syncplay.ui.ConfigurationGetter import ConfigurationGetter
File "/home/aminda/src/github.com/syncplay/syncplay/syncplay/ui/ConfigurationGetter.py", line 8, in <module>
from configparser import SafeConfigParser, DEFAULTSECT
ImportError: cannot import name 'SafeConfigParser' from 'configparser' (/usr/lib64/python3.12/configparser.py). Did you mean: 'RawConfigParser'?
To Reproduce Steps to reproduce the behavior:
git clone ...
mkdir venv
python3 -m venv venv
. venv/bin/activate
python3 -m pip install requirements.txt
./syncplayClient.py
Expected behavior
Syncplay won’t traceback
Screenshots
N/A
Version and platform:
- OS: “Fedora release 39 (Thirty Nine)” beta
- Syncplay version and build type: f15a87f92b7a71d250fb3854a34dd7af69f14ef4
- Media player and version: mpv 0.36.0
Additional context
if I attempt to run ./syncplayClient.py
without venv, I get more errors:
/home/aminda/src/github.com/syncplay/syncplay/syncplay/constants.py:115: SyntaxWarning: invalid escape sequence '\.'
FILENAME_STRIP_REGEX = "[-~_\.\[\](): ]"
/home/aminda/src/github.com/syncplay/syncplay/syncplay/constants.py:116: SyntaxWarning: invalid escape sequence '\-'
CONTROL_PASSWORD_STRIP_REGEX = "[^a-zA-Z0-9\-]"
/home/aminda/src/github.com/syncplay/syncplay/syncplay/constants.py:117: SyntaxWarning: invalid escape sequence '\+'
ROOM_NAME_STRIP_REGEX = "^(\+)(?P<roomnamebase>.*)(:)(\w{12})$"
/home/aminda/src/github.com/syncplay/syncplay/syncplay/constants.py:165: SyntaxWarning: invalid escape sequence '\m'
MPC64_EXECUTABLES = ["mpc-hc64.exe", "mpc-hc64_nvo.exe", "x64\mpc-hc\shoukaku.exe"]
/home/aminda/src/github.com/syncplay/syncplay/syncplay/constants.py:303: SyntaxWarning: invalid escape sequence '\.'
MPLAYER_ANSWER_REGEX = "^ANS_([a-zA-Z_-]+)=(.+)$|^(Exiting)\.\.\. \((.+)\)$"
/home/aminda/src/github.com/syncplay/syncplay/syncplay/utils.py:278: SyntaxWarning: invalid escape sequence '\g'
return re.sub(constants.ROOM_NAME_STRIP_REGEX, "\g<roomnamebase>", RoomName)
/home/aminda/src/github.com/syncplay/syncplay/syncplay/utils.py:456: SyntaxWarning: invalid escape sequence '\+'
CONTROLLED_ROOM_REGEX = re.compile("^\+(.*):(\w{12})$")
/home/aminda/src/github.com/syncplay/syncplay/syncplay/utils.py:457: SyntaxWarning: invalid escape sequence '\d'
PASSWORD_REGEX = re.compile("[A-Z]{2}-\d{3}-\d{3}")
Traceback (most recent call last):
File "/home/aminda/src/github.com/syncplay/syncplay/./syncplayClient.py", line 14, in <module>
from syncplay import ep_client
File "/home/aminda/src/github.com/syncplay/syncplay/syncplay/ep_client.py", line 3, in <module>
from syncplay.clientManager import SyncplayClientManager
File "/home/aminda/src/github.com/syncplay/syncplay/syncplay/clientManager.py", line 4, in <module>
from syncplay.ui.ConfigurationGetter import ConfigurationGetter
File "/home/aminda/src/github.com/syncplay/syncplay/syncplay/ui/ConfigurationGetter.py", line 8, in <module>
from configparser import SafeConfigParser, DEFAULTSECT
ImportError: cannot import name 'SafeConfigParser' from 'configparser' (/usr/lib64/python3.12/configparser.py). Did you mean: 'RawConfigParser'?
If I use python3.10
or python3.11
, it will work, same with pypy3
which is 3.10.2. <del>I haven’t tried 3.11 which didn’t work on another project (https://github.com/editorconfig-checker/editorconfig-checker.python/issues/28).</del>
About this issue
- Original URL
- State: open
- Created 9 months ago
- Comments: 22 (10 by maintainers)
Seems to build fine for me without overriding anything.
Is this issue resolved by https://github.com/Syncplay/syncplay/commit/fc0d2c5268a74fa4e195a6058488f13410678f42 (included in Synclay 1.7.1 stable)?