Just-Some-Bots / MusicBot

:musical_note: The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)
https://just-some-bots.github.io/MusicBot/
MIT License
3.14k stars 2.36k forks source link

Python 3.13 support #2435

Open BabyBoySnow opened 3 weeks ago

BabyBoySnow commented 3 weeks ago

What went wrong?

You can currently download python 3.13 from the python home page, however MusicBot will currently not work with it as some internal changes are needed. If you try to run MusicBot with 3.13 you will see this:

File "<string>", line 1, in <module>
--
15 | NameError: name 'everything' is not defined

The actual traceback is longer than this, but the key is to look for 'everything' is not defined. Until further notice please use a lower version between 3.8-3.12.

How do we reproduce this?

Install python 3.13 and try to run the bot with that version.

Which version of the bot are you using?

Affects all branches

Which operating system are you using?

Affects all OS's

Just checking...

YijunWang1121 commented 2 weeks ago

Hello! I’m a student enrolled in the EECS481 Software Engineering course at the University of Michigan. My partner and I are interested in working on this issue to make MusicBot compatible with Python 3.13 as part of our course project.

We’d like to contribute by investigating compatibility changes needed for Python 3.13, addressing any deprecated features, and updating dependencies if necessary. Could we proceed with this issue as our project? We'd be happy to coordinate and provide updates along the way.

Thank you for considering our contribution!

BabyBoySnow commented 2 weeks ago

Hello! I’m a student enrolled in the EECS481 Software Engineering course at the University of Michigan. My partner and I are interested in working on this issue to make MusicBot compatible with Python 3.13 as part of our course project.

We’d like to contribute by investigating compatibility changes needed for Python 3.13, addressing any deprecated features, and updating dependencies if necessary. Could we proceed with this issue as our project? We'd be happy to coordinate and provide updates along the way.

Thank you for considering our contribution!

Sure, feel free to work on it. Some things to note: When pr'ing please create a new branch based off of dev, this will allow you to rebase any changes you make on top of any pushes the might occur in the meantime. Please ensure that you format with black.

BabyBoySnow commented 2 weeks ago

This might be for naught, the issue stems from the way we set up loggers using the exec() function, which seems to be a tad bit different in 3.13, @itsTheFae has a WIP to change the way we do language (i18n) stuff, which replaces the way loggers work. In order to save yourself unwarranted time and effort, I'd suggest to focus on something else instead :)

itsTheFae commented 1 week ago

As the PR #2436 is now in Draft, feel free to contribute to it instead of the existing branches.
Snow and I have discussed several issues and made some changes that should at least allow the draft version to start on python 3.13. I would be grateful for the extra testing.

For reference, MusicBot currently aims to support python versions 3.8 and up. So any changes need to remain compatible with those versions.
Snow informs me that the "Free-threaded" versions of 3.13 just don't work. This might be down to some of the dependencies we have, and could be addressed by the time 3.14 is a stable release. But that is just my guess.