Sublime Forum

FYI for plugin developers: 'Requests' for Python 3.8 no longer able to satisfy dependencies (urllib3,idna))

#1

Hi there.

I have developed a local ST plugin to (amongst other things), convert a long MD file into a series of HTML files, and download any remote images that are referenced.

All of a sudden, this plugin stopped working, with no changes to my codebase. It uses Python 3.8 and the ‘requests’ library imported in my plugin started to throw errors to the console, related to the following two libraries:

/Application Support/Sublime Text/Lib/python38/requests/init.py", line 43, in
import urllib3
/Application Support/Sublime Text/Lib/python38/requests/init.py", line 43, in
import idna

It could no longer satisfy it’s own dependencies. l was able to work around this by adding these libraries explicitly to my dendencies.json file (see last two items):

{ “": { "”: [ “bs4”,“pillow”,“soupsieve”,“requests”,“urllib3”,“idna”] } }

Just thought I’d let you know, incase your own plugins stop working

0 Likes

#2

The full list is

  • requests
  • urllib3
  • charset-normalizer
  • idna

plus certifi, which has been provided by ST itself and thus not required.

0 Likes

#3

Thanks for the quick reply. So, is this is a known issue? Any idea what caused it to 'just happen"? Has the requests library been updated?

0 Likes

#4

It’s intentional for py38, to update requests from a very old version (like 6 or 7 years ago?) to the latest.

0 Likes

#5

Ah, OK. Just so that I am clear, can python 3.8 libraries satisfy their own dependencies, or is there a chance that any of these libraries might fail in the future?

0 Likes

#6

can python 3.8 libraries satisfy their own dependencies

at this moment, no.
in the future, idk.

Package Control just doesn’t resolve dep’s dep at this moment.

0 Likes

#7

Thanks, you’ve been very helpful. At least I now understand things a bit better and am glad I didn’t break anything

0 Likes