Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to MiPA #2

Open
sks316 opened this issue Nov 23, 2022 · 11 comments
Open

Migrate to MiPA #2

sks316 opened this issue Nov 23, 2022 · 11 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@sks316
Copy link
Owner

sks316 commented Nov 23, 2022

mi.py is now deprecated. Migration to MiPA, the successor, is priority no. 1.

@sks316 sks316 self-assigned this Nov 23, 2022
@sks316
Copy link
Owner Author

sks316 commented Nov 24, 2022

MiPA is incompatible with Python 3.9 and lacks proper documentation. Migration is postponed until I can figure out a solution.

@sks316 sks316 added the help wanted Extra attention is needed label Jan 1, 2023
@sks316
Copy link
Owner Author

sks316 commented Jan 1, 2023

Turns out there's a bug in Mi.py that's causing excessive crashing. While this usually isn't an issue when using the bot as a systemd service, as systemd will automatically restart it, there's also the problem of Mi.py still being deprecated, meaning this bug won't be fixed - and apparently Mi.py is no longer working on some instances of Misskey, according to a few people I've spoken to. I've also had issues where the bot is crashing so often, that systemd gives up on restarting the bot - during the last instance of this, the restart counter had reached 1540 attempts.

I'd still like to migrate this bot to MiPA to resolve the above issues. Help is needed, as MiPA is still incompatible with Python 3.9 and still lacks proper documentation in English.

cc @yupix

@yupix
Copy link

yupix commented Jan 1, 2023

First, we thank you for using Mi.py. Next, we have prepared some summaries, which you can find below.

  • MiPA has no plans to provide compatibility with Python 3.9
  • Mi.py will not be reverted from deprecated
  • We will provide English documentation as it develops.
  • We can help you migrate to MiPA.

MiPA will not be compatible with Python 3.9

First of all, let me give you my subjective opinion: we had a survey at the time of Mi.py, but almost nobody answered it, and I am painfully aware of the apathy of the community. I also remember that after Mi.py finished development, I was told that I had polluted my environment by raising the Python version, even though I did not want to do so, and I did not feel very good about it. Secondly, as a maintainer, I would like to share my opinion that MiPA and the MiPAC used internally use a relatively newer version of Python to provide a better developer experience, such as the Generics of TypedDict, which is available from Python 3.11. This is a significant departure from the policy of supporting older Python versions such as Discord.py and is a change we are making to improve both the developer experience for maintainers and users.

There are no plans to revert Mi.py from deprecated

The reason for deprecating Mi.py and moving it to a project called MiPA/MiPAC is that Mi.py had design flaws. It would be relatively easy to fix things such as what is currently happening at SKS316's location. However, updating does not mean that people using Mi.py will not have to move to MiPA or other projects. Therefore, there are no plans to move Mi.py back from deprecated.

English documentation will be provided as the situation develops.

I am Japanese and my English is not good. Of course there are many Japanese people who are good at English, but I am not one of them, and at the time of Mi.py I was happy that other people were interested in the project, so I prepared English documents and translations into German and other languages with the help of ente and others, as a first step to develop the community. We were very happy at the time that other people were interested in Mi.py. However, I now think that this was premature, and that I have been so focused on the documentation that I have not been able to work on the code editing and so on. So, with the resources I have at the moment, I'm prepared to provide Japanese documentation, and if many users want English documentation in the future, I'm willing to implement it.

I can help with the transition to MiPA

I think there have been a lot of negative comments so far, but I would really like to move to MiPA. However, MiPA requires Python 3.11. Therefore, if SKS316 does not want to use Python 3.11, that is unfortunate, but I cannot help you. If you decide to migrate, please feel free to contact me for assistance.

These are my answers to your questions. Thank you for reading this long answer.

@sks316
Copy link
Owner Author

sks316 commented Jan 1, 2023

@yupix I understand, and I am willing to use Python 3.11. The reason I've wanted to use Python 3.9 is, my distribution doesn't have any version past 3.8 in its repositories, and I had to compile 3.9 from source. I just worry about breaking my environment. But, if it's necessary, I'll install 3.11 from source.
I'll let you know once I've built it from source and am ready to migrate. Thanks for your time!

@yupix
Copy link

yupix commented Jan 17, 2023

@sks316 I know it's a bit late, but what distribution are you using and what version is it? python 3.11 is basically not available without adding ppa in many cases, but if you let me know, I may not have to build it myself.

@sks316
Copy link
Owner Author

sks316 commented Jan 17, 2023

@yupix I host all of my bots on a Raspberry Pi running Raspbian, though most of my testing is done on a standard Debian installation.

@yupix
Copy link

yupix commented Jan 17, 2023

I believe that with Raspbian you can add python 3.11 with the following command.

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.11

@sks316
Copy link
Owner Author

sks316 commented Jan 17, 2023

I don't think that's the best idea, PPAs are one of the most common causes of a broken Debian or a FrankenDebian.
https://wiki.debian.org/DontBreakDebian#Don.27t_make_a_FrankenDebian

@yupix
Copy link

yupix commented Jan 17, 2023

You may be right. If so, how about using pyenv?

@sks316
Copy link
Owner Author

sks316 commented Jan 17, 2023

I've never actually used pyenv, so I'd have to learn how to use it.

@yupix
Copy link

yupix commented Jan 17, 2023

It certainly requires a bit of a learning curve, but I think it is worth learning because of the ease of switching versions. Please consider using it if you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants