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] errorreporting: Remove use of pip internal api #2724

Merged
merged 2 commits into from
Oct 30, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Orange/canvas/application/errorreporting.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import pip
import sys
import time
import logging
Expand All @@ -16,6 +15,8 @@
from urllib.request import pathname2url, urlopen, build_opener
from unittest.mock import patch

import pkg_resources

from AnyQt.QtCore import pyqtSlot, QSettings, Qt
from AnyQt.QtGui import QDesktopServices, QFont
from AnyQt.QtWidgets import (
Expand Down Expand Up @@ -190,8 +191,8 @@ def _find_widget_frame(tb):
widget = frame.tb_frame.f_locals['self'].__class__
widget_module = '{}:{}'.format(widget.__module__, frame.tb_lineno)

packages = ', '.join(sorted("%s==%s" % (i.project_name, i.version)
for i in pip.get_installed_distributions()))
packages = ', '.join(sorted("%s==%s" % (dist.project_name, dist.version)
for dist in pkg_resources.working_set))

machine_id = QSettings().value('error-reporting/machine-id', '', type=str)

Expand Down