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

The asyncore module is deprecated in python version 3.12 #3

Open
janusn opened this issue Jul 5, 2024 · 1 comment
Open

The asyncore module is deprecated in python version 3.12 #3

janusn opened this issue Jul 5, 2024 · 1 comment

Comments

@janusn
Copy link

janusn commented Jul 5, 2024

The following snip was found on a log of nextcloud container:

[custom-init] Files found, executing
[custom-init] install-nextcloud-inotify: executing...
apk updating...
fetch http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
v3.20.1-59-g0a6de68fa41 [http://dl-cdn.alpinelinux.org/alpine/v3.20/main]
v3.20.1-62-gfb112888f77 [http://dl-cdn.alpinelinux.org/alpine/v3.20/community]
OK: 24196 distinct packages available
�
apk updated.
apk adding py3-inotify...
OK: 360 MiB in 323 packages
apk added py3-inotify.
fetching watcher.py...
Connecting to raw.githubusercontent.com (185.199.110.133:443)
saving to '/usr/local/bin/watcher.py'
watcher.py           100% |********************************| 13805  0:00:00 ETA
'/usr/local/bin/watcher.py' saved
fetched watcher.py.
chmod watcher*
rm: cannot remove '/tmp/watcher.pid': No such file or directory
starting watcher.py...
Traceback (most recent call last):
  File "/usr/local/bin/watcher.py", line 44, in <module>
    import pyinotify
  File "/usr/lib/python3.12/site-packages/pyinotify.py", line 71, in <module>
    import asyncore
ModuleNotFoundError: No module named 'asyncore'
started watcher.py.
[custom-init] install-nextcloud-inotify: exited 0
[ls.io-init] done.

According to the official python doc, asyncore is deprecated in python 3.12.

Environment:

@janusn
Copy link
Author

janusn commented Jul 7, 2024

I have fixed the problem by replacing the required file pyinotify.py with a branch of pyinotify written by Elephant Liu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant