Commit 262abe6d authored by Louis's avatar Louis
Browse files

Replace old url http://pypi.python.org by https://pypi.org

Closes #7.
parent f10a9169
Pipeline #78912 passed with stages
in 1 minute and 13 seconds
......@@ -6,7 +6,7 @@
Welcome to pypimonitor's documentation!
=======================================
An HTML dashboard to monitor your `PyPI packages <http://pypi.python.org>`_. It
An HTML dashboard to monitor your `PyPI packages <https://pypi.org>`_. It
displays a line charts showing the evolution of downloads across versions, and
a set of badges (download statistics, `readthedocs <http://readthedocs.io>`__ badge,
continuous integration, etc.). See :ref:`the example <example>` below.
......
......@@ -3,7 +3,7 @@
YAML configuration files
========================
Some plugins try to guess the appropriate required values, but it is not always possible. For instance, plugin :ref:`Readthedocs` cannot guess the documentation URL, since it can differ from ``http://<PypiPackageName>.readthedocs.io`` (for instance, the documentation URL of `sphinxcontrib-packages <http://pypi.python.org/pypi/sphinxcontrib-packages>`_ is http://packages.readthedocs.io and not http://spinxcontrib-packages.readthedocs.io). Thus, it may be necessary to provide additional information. This can be done using YAML files.
Some plugins try to guess the appropriate required values, but it is not always possible. For instance, plugin :ref:`Readthedocs` cannot guess the documentation URL, since it can differ from ``http://<PypiPackageName>.readthedocs.io`` (for instance, the documentation URL of `sphinxcontrib-packages <https://pypi.org/pypi/sphinxcontrib-packages>`_ is http://packages.readthedocs.io and not http://spinxcontrib-packages.readthedocs.io). Thus, it may be necessary to provide additional information. This can be done using YAML files.
Processing YAML files
---------------------
......
......@@ -40,7 +40,7 @@ from pypimonitor.cell.base import Error
VERSION = "0.3.1"
LOGGER = logging.getLogger(__name__)
CLIENT = xmlrpclib.ServerProxy("https://pypi.python.org/pypi")
CLIENT = xmlrpclib.ServerProxy("https://pypi.org/pypi")
def default_data(name):
......@@ -236,7 +236,7 @@ class Package:
LOGGER.info("Retrieving information about pypi package '{}'...\n".format(name))
try:
self.rawdata = json.loads(
requests.get("http://pypi.python.org/pypi/{}/json".format(name)).text
requests.get("https://pypi.org/pypi/{}/json".format(name)).text
)
except Exception as error: # pylint: disable=broad-except
if require_pypi:
......
......@@ -138,7 +138,7 @@ class Jinja2(Cell):
- `package`: the name of the package being processed, as a string;
- `pypi`: the information about this package got from pypi, as a dictionary
(for instance http://pypi.python.org/pypi/pypimonitor/json);
(for instance https://pypi.org/pypi/pypimonitor/json);
- `cell`: the cell options (as defined in the :ref:`yaml` configuration,
maybe completed with :ref:`default values <defaultrequired>`) as a
dictionary.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment