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

[fix] Failed to start Jedi EPC server / DeprecationWarning: pkg_resources #371

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

return42
Copy link

@return42 return42 commented Jul 9, 2023

Jedi EPC server won't start due to a deprication warning::

Error (jedi):
================================
Failed to start Jedi EPC server.
================================

*** EPC Error ***
Server may raise an error. Use "M-x epc:pop-to-last-server-process-buffer RET" to see full traceback:
../jediepcserver.py:38: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources

BTW: remove unused imports

@return42
Copy link
Author

return42 commented Oct 1, 2023

@immerrr could you have a look at this PR, fixing a severe issue?

Thanks .. and sorry for the ping.

JEDI_VERSION = pkg_resources.parse_version(jedi.__version__)
if JEDI_VERSION < pkg_resources.parse_version('0.16.0'):
JEDI_VERSION = packaging.version.parse(jedi.__version__)
if JEDI_VERSION < packaging.version.parse('0.16.0'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use packaging here and importlib below? packaging is an external package so if it's added here it will need to be added as a dependency in setup.py

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use packaging here and importlib below?

deprecated pkg_resources includes methods for semantic versioning and module handling. Use of pkg_resources is deprecated in favor of importlib .. .. but the problem is that importlib does not have methods for semantic versioning .. as we want to do a comparison of semantic versions here, we have to use packaging.

packaging is an external package so if it's added here it will need to be added as a dependency in setup.py

Thanks for pointing out, I added it --> https://github.com/tkf/emacs-jedi/compare/eb6d5a8fa5af5d07d14acd3cc05772c6edde50e0..6c36a91cd0cec35d1714929d4e74aff2b23b9367

…rces

Jedi EPC server won't start due to a deprication warning::

  Error (jedi):
  ================================
  Failed to start Jedi EPC server.
  ================================

  *** EPC Error ***
  Server may raise an error. Use "M-x epc:pop-to-last-server-process-buffer RET" to see full traceback:
  ../jediepcserver.py:38: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources

Signed-off-by: Markus Heiser <[email protected]>
Signed-off-by: Markus Heiser <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants