abey79 / vpype

The Swiss-Army-knife command-line tool for plotter vector graphics.
https://vpype.readthedocs.io/
MIT License
690 stars 61 forks source link

DeprecationWarning: SelectableGroups dict interface is deprecated #575

Closed vmario89 closed 1 year ago

vmario89 commented 1 year ago

Hi, i am getting the following warning

/home/himbeere/.local/lib/python3.10/site-packages/vpype_cli/cli.py:202: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
  for entry_point in importlib.metadata.entry_points().get("vpype.plugins", []):
vmario89 commented 1 year ago

appears on vpype version 1.12.0

vmario89 commented 1 year ago

dirty temp fix would be to add:

import warning
warnings.filterwarnings('ignore', 'SelectableGroups dict interface')
abey79 commented 1 year ago

I can't reproduce. Can you provide more information on your setup?

vmario89 commented 1 year ago

hi. i am using Fedora 37 with Python 3.10

pip list | grep entrypointsshows entrypoints version 0.4

should i uninstall this? i found "This package is in maintenance-only mode. New code should use the importlib.metadata module in the Python standard library to find and load entry points." (https://pypi.org/project/entrypoints/)

i never installed this by hand, so i think it was installed by system default

abey79 commented 1 year ago

vpype doesn't directly or indirectly rely on the entrypoints package. If you are using an isolated environment for installation (e.g. by creating a virtual environment explicitly or via pipx), it shouldn't have been installed. Did you use pipx to install vpype?

edit: I might have misread your message. It appears that you installed vpype in the global environment, is that right? If so, I strongly suggest to use pipx instead.

vmario89 commented 1 year ago

hi, in my case i installed vpype by regular pip. i even dont know especially what pipx is. i have no idea where the warning comes from

vmario89 commented 1 year ago

this is my environment

python -V
Python 3.10.7
pip list
Package            Version
------------------ -----------
appdirs            1.4.4
argcomplete        2.0.0
asteval            0.9.27
asttokens          2.1.0
atom               0.8.2
attrs              22.1.0
Automat            22.10.0
Babel              2.11.0
backcall           0.2.0
Beaker             1.11.0
beautifulsoup4     4.11.1
black              22.10.0
blivet             3.6.0
blivet-gui         2.3.0
Brlapi             0.8.4
brother-ql         0.9.4
Brotli             1.0.9
bytecode           0.13.0
cachetools         5.2.0
cairocffi          1.4.0
CairoSVG           2.5.2
certifi            2022.9.24
cffi               1.15.1
chardet            5.0.0
charset-normalizer 3.0.0
click              8.1.3
click-plugins      1.1.1
constantly         15.1.0
contourpy          1.0.6
cryptography       38.0.3
cssselect          1.2.0
cssselect2         0.7.0
cupshelpers        1.0
cycler             0.11.0
dasbus             1.6
dbus-python        1.3.2
debugpy            1.6.3
decorator          5.1.1
deduplicate        0.1.0
defusedxml         0.7.1
deprecation        2.1.0
dill               0.3.6
distro             1.8.0
dnspython          2.2.1
docopt             0.6.2
enaml              0.15.2
enamlx             0.6.2
entrypoints        0.4
evdev              1.6.0
executing          1.2.0
ezdxf              0.18.1
fedora-third-party 0.10
Flask              2.2.2
fonttools          4.38.0
fros               1.1
fs                 2.4.16
future             0.18.2
gitdb              4.0.9
GitPython          3.1.29
glcontext          2.3.7
gmpy2              2.1.2
gpg                1.17.0
grip               4.6.1
gssapi             1.7.2
humanize           4.4.0
hyperlink          21.0.0
idna               3.4
imageio            2.22.3
img2pdf            0.4.4
incremental        22.10.0
initial-setup      0.3.94
inkcut             2.1.5
ipykernel          6.17.0
ipython            8.6.0
ipython-genutils   0.2.0
isc                2.0
itsdangerous       2.1.2
jedi               0.18.1
Jinja2             3.1.2
jsonpickle         2.2.0
jupyter_client     7.4.4
jupyter_core       4.11.2
kiwisolver         1.4.4
koji               1.30.1
langtable          0.0.60
libcomps           0.1.18
libvirt-python     8.9.0
lxml               4.9.1
Mako               1.2.3
Markdown           3.4.1
markdowndiff       0.0.1
MarkupSafe         2.1.1
matplotlib         3.6.2
matplotlib-inline  0.1.6
moderngl           5.7.0
multiprocess       0.70.14
munkres            1.1.4
mypy-extensions    0.4.3
nest-asyncio       1.5.6
networkx           2.8.8
NeuroTools         0.3.1
nftables           0.1
numpy              1.23.4
olefile            0.46
onboard            1.4.1
opencv-python      4.6.0.66
openmesh           1.2.1
packaging          21.3
packbits           0.6
parso              0.8.3
Paste              3.5.2
path-and-address   2.0.1
pathspec           0.10.1
pdfarranger        1.8.2
pefile             2022.5.30
pexpect            4.8.0
pickleshare        0.7.5
pid                3.0.4
pikepdf            6.2.1
Pillow             9.3.0
pip                22.3
platformdirs       2.5.2
ply                3.11
plycutter          0.0
pnoise             0.2.0
powerline-status   2.8.3
productmd          1.33
progressbar2       4.2.0
prompt-toolkit     3.0.32
psutil             5.9.3
ptyprocess         0.7.0
pure-eval          0.2.2
pwquality          1.4.4
pycairo            1.21.0
pyclipper          1.3.0.post3
pycollada          0.7.2
pycparser          2.21
pycrypto           2.6.1
pycups             2.0.1
pycurl             7.45.1
pyenchant          3.2.2
pygit2             1.10.1
Pygments           2.13.0
PyGObject          3.42.2
pyinotify          0.9.6
pykickstart        3.43
pyOpenSSL          22.1.0
pyparsing          3.0.9
pyparted           3.12.0
PyQt5              5.15.7
PyQt5-Qt5          5.15.2
PyQt5-sip          12.11.0
pyqtgraph          0.13.1
pyrsistent         0.19.2
pyserial           3.5
PySide2            5.15.2.1
PySide6            6.4.0.1
PySide6-Addons     6.4.0.1
PySide6-Essentials 6.4.0.1
PySocks            1.7.1
pystray            0.19.4
pytesseract        0.3.10
python-augeas      1.1.0
python-dateutil    2.8.2
python-gettext     4.1
python-manatools   0.0.4
python-meh         0.50
python-pam         2.0.2
python-utils       3.4.5
python-xapp        2.2.1
python-xlib        0.32
pytz               2022.6
pyudev             0.24.0
pyusb              1.2.1
pyxdg              0.28
PyYAML             6.0
pyzmq              24.0.1
qt-reactor         0.6
qtconsole          5.4.0
QtPy               2.2.1
regex              2022.10.31
requests           2.28.1
requests-file      1.5.1
requests-ftp       0.3.1
requests-gssapi    1.2.3
rpm                4.17.1
rpmautospec        0.3.0
Rtree              1.0.1
scipy              1.9.3
scour              0.38.2
selinux            3.3
sepolicy           3.3
setools            4.4.0
setproctitle       1.3.2
setroubleshoot     3.3.29
setuptools         65.5.1
Shapely            1.8.5.post1
shiboken2          5.15.2.1
shiboken6          6.4.0.1
simpleaudio        1.0.4
simpleline         1.9.0
six                1.16.0
SLIP               20191113
smmap              5.0.0
solaar             1.1.7
sortedcontainers   2.4.0
sos                4.3
soupsieve          2.3.2.post1
stack-data         0.6.0
svg-to-gcode       1.5.4
svgelements        1.8.4
svgpathtools       1.5.1
svgwrite           1.4.3
systemd-python     234
Tempita            0.5.2
tinycss2           1.2.1
toml               0.10.2
tomli              2.0.1
tornado            6.2
tqdm               4.64.1
traitlets          5.5.0
trimesh            3.15.8
Twisted            22.10.0
typing_extensions  4.4.0
urllib3            1.26.12
virt-firmware      1.5
vpype              1.12.0
vpype-dxf          0.2.0
vpype-occult       0.3.0
wcwidth            0.2.5
webencodings       0.5.1
Werkzeug           2.2.2
wheel              0.38.1
xcffib             0.12.1
xlrd               2.0.1
zope.interface     5.5.1
abey79 commented 1 year ago

Well, installing with pip in the global environment is generally highly discouraged because it's a matter of time until you run into a dependency conflict. Your list of package is a bit scary tbh. I'm unsure if this is the cause here though, so the best way is to reinstall vpype in an isolated environment. pipx is a good way to achieve this because it manages the isolated environment automatically while making the executable available global.

To do so:

  1. uninstall vpype from the global environment: pip uninstall vpype
  2. install vpype with pipx:
    pip install pipx
    pipx ensurepath
    # restart your shell
    pipx install "vpype[all]"
vmario89 commented 1 year ago

hi. thanks for your help. seems that worked! i will close the ticket; and i will have to check my enviroment in general when i find the time

abey79 commented 1 year ago

Turns out I ended up getting this error as well. Apparently it's a change in API in Python 3.10, but I don't understand well the circumstances which lead to the deprecation warning to actually be emitted. I'll address this together with Python 3.11 support.

abey79 commented 1 year ago

Fixed by #581