PipPackageDetailsDialog: removed some entries for which PyPI doesn't deliver meaningful data anymore.

Mon, 08 Feb 2021 19:31:39 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 08 Feb 2021 19:31:39 +0100
changeset 8086
eff504bb6dec
parent 8085
f6db8b3ecea9
child 8087
db518728761c

PipPackageDetailsDialog: removed some entries for which PyPI doesn't deliver meaningful data anymore.

eric6/PipInterface/PipPackageDetailsDialog.py file | annotate | diff | comparison | revisions
eric6/PipInterface/PipPackageDetailsDialog.ui file | annotate | diff | comparison | revisions
--- a/eric6/PipInterface/PipPackageDetailsDialog.py	Mon Feb 08 18:01:02 2021 +0100
+++ b/eric6/PipInterface/PipPackageDetailsDialog.py	Mon Feb 08 19:31:39 2021 +0100
@@ -15,6 +15,7 @@
 from .Ui_PipPackageDetailsDialog import Ui_PipPackageDetailsDialog
 
 
+# TODO: add some 'convenience' buttons (see issue369)
 class PipPackageDetailsDialog(QDialog, Ui_PipPackageDetailsDialog):
     """
     Class implementing a dialog to show details about a package.
@@ -80,12 +81,6 @@
         self.docsUrlLabel.setText(
             '<a href="{0}">{0}</a>'.format(
                 self.__sanitize(detailsData["docs_url"], forUrl=True)))
-        self.downloadsDayLabel.setText(self.__locale.toString(
-            detailsData["downloads"]["last_day"]))
-        self.downloadsWeekLabel.setText(self.__locale.toString(
-            detailsData["downloads"]["last_week"]))
-        self.downloadsMonthLabel.setText(self.__locale.toString(
-            detailsData["downloads"]["last_month"]))
         self.classifiersList.addItems(detailsData["classifiers"])
         
         self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
@@ -111,7 +106,6 @@
                     download["python_version"]
                     if download["python_version"] != "source"
                     else "",
-                    self.__locale.toString(download["downloads"]),
                     self.__formatUploadDate(download["upload_time"]),
                     self.__formatSize(download["size"]),
                 ])
--- a/eric6/PipInterface/PipPackageDetailsDialog.ui	Mon Feb 08 18:01:02 2021 +0100
+++ b/eric6/PipInterface/PipPackageDetailsDialog.ui	Mon Feb 08 19:31:39 2021 +0100
@@ -33,10 +33,30 @@
        <string>Lists package informations</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_2">
-       <item row="0" column="1">
-        <widget class="QLabel" name="summaryLabel">
-         <property name="wordWrap">
-          <bool>true</bool>
+       <item row="2" column="0">
+        <widget class="QLabel" name="label_4">
+         <property name="text">
+          <string>Author:</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="0">
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>Summary:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+         </property>
+        </widget>
+       </item>
+       <item row="4" column="1">
+        <widget class="QLabel" name="licenseLabel"/>
+       </item>
+       <item row="8" column="0">
+        <widget class="QLabel" name="label_10">
+         <property name="text">
+          <string>Release URL:</string>
          </property>
         </widget>
        </item>
@@ -50,6 +70,37 @@
          </property>
         </widget>
        </item>
+       <item row="2" column="1">
+        <widget class="QLabel" name="authorLabel"/>
+       </item>
+       <item row="8" column="1">
+        <widget class="QLabel" name="releaseUrlLabel">
+         <property name="openExternalLinks">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="6" column="0">
+        <widget class="QLabel" name="label_8">
+         <property name="text">
+          <string>Home Page:</string>
+         </property>
+        </widget>
+       </item>
+       <item row="4" column="0">
+        <widget class="QLabel" name="label_6">
+         <property name="text">
+          <string>License:</string>
+         </property>
+        </widget>
+       </item>
+       <item row="9" column="0">
+        <widget class="QLabel" name="label_11">
+         <property name="text">
+          <string>Documentation URL:</string>
+         </property>
+        </widget>
+       </item>
        <item row="3" column="1">
         <widget class="QLabel" name="authorEmailLabel">
          <property name="openExternalLinks">
@@ -57,6 +108,73 @@
          </property>
         </widget>
        </item>
+       <item row="10" column="0">
+        <widget class="QLabel" name="label_16">
+         <property name="text">
+          <string>Classifiers:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+         </property>
+        </widget>
+       </item>
+       <item row="6" column="1">
+        <widget class="QLabel" name="homePageLabel">
+         <property name="openExternalLinks">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="10" column="1">
+        <widget class="QListWidget" name="classifiersList">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+           <horstretch>0</horstretch>
+           <verstretch>1</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="alternatingRowColors">
+          <bool>true</bool>
+         </property>
+         <property name="selectionMode">
+          <enum>QAbstractItemView::NoSelection</enum>
+         </property>
+         <property name="sortingEnabled">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="7" column="1">
+        <widget class="QLabel" name="packageUrlLabel">
+         <property name="openExternalLinks">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="7" column="0">
+        <widget class="QLabel" name="label_9">
+         <property name="text">
+          <string>Package URL:</string>
+         </property>
+        </widget>
+       </item>
+       <item row="5" column="1">
+        <widget class="QLabel" name="platformLabel"/>
+       </item>
+       <item row="3" column="0">
+        <widget class="QLabel" name="label_5">
+         <property name="text">
+          <string>Author Email:</string>
+         </property>
+        </widget>
+       </item>
+       <item row="5" column="0">
+        <widget class="QLabel" name="label_7">
+         <property name="text">
+          <string>Platform:</string>
+         </property>
+        </widget>
+       </item>
        <item row="1" column="1">
         <widget class="QPlainTextEdit" name="descriptionEdit">
          <property name="sizePolicy">
@@ -73,102 +191,13 @@
          </property>
         </widget>
        </item>
-       <item row="2" column="0">
-        <widget class="QLabel" name="label_4">
-         <property name="text">
-          <string>Author:</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="1">
-        <widget class="QLabel" name="authorLabel"/>
-       </item>
-       <item row="3" column="0">
-        <widget class="QLabel" name="label_5">
-         <property name="text">
-          <string>Author Email:</string>
-         </property>
-        </widget>
-       </item>
-       <item row="7" column="1">
-        <widget class="QLabel" name="packageUrlLabel">
-         <property name="openExternalLinks">
+       <item row="0" column="1">
+        <widget class="QLabel" name="summaryLabel">
+         <property name="wordWrap">
           <bool>true</bool>
          </property>
         </widget>
        </item>
-       <item row="4" column="0">
-        <widget class="QLabel" name="label_6">
-         <property name="text">
-          <string>License:</string>
-         </property>
-        </widget>
-       </item>
-       <item row="4" column="1">
-        <widget class="QLabel" name="licenseLabel"/>
-       </item>
-       <item row="0" column="0">
-        <widget class="QLabel" name="label">
-         <property name="text">
-          <string>Summary:</string>
-         </property>
-         <property name="alignment">
-          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="0">
-        <widget class="QLabel" name="label_7">
-         <property name="text">
-          <string>Platform:</string>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="1">
-        <widget class="QLabel" name="platformLabel"/>
-       </item>
-       <item row="6" column="0">
-        <widget class="QLabel" name="label_8">
-         <property name="text">
-          <string>Home Page:</string>
-         </property>
-        </widget>
-       </item>
-       <item row="6" column="1">
-        <widget class="QLabel" name="homePageLabel">
-         <property name="openExternalLinks">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-       <item row="7" column="0">
-        <widget class="QLabel" name="label_9">
-         <property name="text">
-          <string>Package URL:</string>
-         </property>
-        </widget>
-       </item>
-       <item row="8" column="0">
-        <widget class="QLabel" name="label_10">
-         <property name="text">
-          <string>Release URL:</string>
-         </property>
-        </widget>
-       </item>
-       <item row="8" column="1">
-        <widget class="QLabel" name="releaseUrlLabel">
-         <property name="openExternalLinks">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-       <item row="9" column="0">
-        <widget class="QLabel" name="label_11">
-         <property name="text">
-          <string>Documentation URL:</string>
-         </property>
-        </widget>
-       </item>
        <item row="9" column="1">
         <widget class="QLabel" name="docsUrlLabel">
          <property name="openExternalLinks">
@@ -176,104 +205,6 @@
          </property>
         </widget>
        </item>
-       <item row="10" column="0">
-        <widget class="QLabel" name="label_12">
-         <property name="text">
-          <string>Downloads:</string>
-         </property>
-         <property name="alignment">
-          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-         </property>
-        </widget>
-       </item>
-       <item row="10" column="1">
-        <layout class="QGridLayout" name="gridLayout">
-         <item row="0" column="0">
-          <widget class="QLabel" name="label_13">
-           <property name="text">
-            <string>Last Day:</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1">
-          <widget class="QLabel" name="downloadsDayLabel">
-           <property name="alignment">
-            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="2">
-          <spacer name="horizontalSpacer">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item row="1" column="0">
-          <widget class="QLabel" name="label_14">
-           <property name="text">
-            <string>Last Week:</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="1">
-          <widget class="QLabel" name="downloadsWeekLabel">
-           <property name="alignment">
-            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="0">
-          <widget class="QLabel" name="label_15">
-           <property name="text">
-            <string>Last Month:</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="1">
-          <widget class="QLabel" name="downloadsMonthLabel">
-           <property name="alignment">
-            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item row="11" column="0">
-        <widget class="QLabel" name="label_16">
-         <property name="text">
-          <string>Classifiers:</string>
-         </property>
-         <property name="alignment">
-          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-         </property>
-        </widget>
-       </item>
-       <item row="11" column="1">
-        <widget class="QListWidget" name="classifiersList">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>1</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="alternatingRowColors">
-          <bool>true</bool>
-         </property>
-         <property name="selectionMode">
-          <enum>QAbstractItemView::NoSelection</enum>
-         </property>
-         <property name="sortingEnabled">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="urls">
@@ -318,11 +249,6 @@
          </column>
          <column>
           <property name="text">
-           <string>Downloads</string>
-          </property>
-         </column>
-         <column>
-          <property name="text">
            <string>Uploaded on</string>
           </property>
          </column>

eric ide

mercurial