Exemplo n.º 1
0
def test_pipdate():
    pipdate.get_pypi_version("matplotlib")
    pipdate.needs_checking("matplotlib")
    pipdate.check("matplotlib", "0.0.0")
    pipdate.check("requests", "0.0.0")
    pipdate.needs_checking("matplotlib")
    return
Exemplo n.º 2
0
def test_pipdate():
    pipdate.get_pypi_version('matplotlib')
    pipdate.needs_checking('matplotlib')
    pipdate.check('matplotlib', '0.0.0')
    pipdate.check('requests', '0.0.0')
    pipdate.needs_checking('matplotlib')
    return
Exemplo n.º 3
0
# -*- coding: utf-8 -*-
#
from __future__ import print_function

from betterbib.__about__ import (
    __version__,
    __author__,
    __author_email__,
    __website__,
)

from betterbib.tools import (
    create_dict,
    pybtex_to_dict,
    pybtex_to_bibtex_string,
    latex_to_unicode,
    write,
    update,
    JournalNameUpdater,
)
from betterbib.crossref import Crossref
from betterbib.dblp import Dblp

try:
    import pipdate
except ImportError:
    pass
else:
    if pipdate.needs_checking(__name__):
        print(pipdate.check(__name__, __version__))
Exemplo n.º 4
0
def version_check() -> None:
    if pipdate.needs_checking(version.name):
        print(pipdate.check(version.name, version.__version__), end='')
Exemplo n.º 5
0
from . import linear_fvm_problem

from .discretize_linear import discretize_linear, split
from .discretize import discretize
from .nonlinear_methods import newton
from .fvm_matrix import get_fvm_matrix

from pyfvm.__about__ import __version__, __author__, __author_email__

__all__ = [
    "__version__",
    "__author__",
    "__author_email__",
    "discretize",
    "discretize_linear",
    "split",
    "newton",
    "fvm_problem",
    "linear_fvm_problem",
    "get_fvm_matrix",
    "EdgeMatrixKernel",
]

try:
    import pipdate
except ImportError:
    pass
else:
    if pipdate.needs_checking(__name__):
        print(pipdate.check(__name__, __version__), end="")
Exemplo n.º 6
0
from halo import Halo
from selectolax.parser import HTMLParser
from tabulate import tabulate

from ghtopdep import __version__

PACKAGE_NAME = "ghtopdep"
CACHE_DIR = appdirs.user_cache_dir(PACKAGE_NAME)
NEXT_BUTTON_SELECTOR = "#dependents > div.paginate-container > div > a"
ITEM_SELECTOR = "#dependents > div.Box > div.flex-items-center"
REPO_SELECTOR = "span > a.text-bold"
STARS_SELECTOR = "div > span:nth-child(1)"
GITHUB_URL = "https://github.com"

if pipdate.needs_checking(PACKAGE_NAME):
    msg = pipdate.check(PACKAGE_NAME, __version__.__version__)
    click.echo(msg)


class OneDayHeuristic(BaseHeuristic):
    cacheable_by_default_statuses = {
        200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501
    }

    def update_headers(self, response):
        if response.status not in self.cacheable_by_default_statuses:
            return {}

        date = parsedate(response.headers["date"])
        expires = datetime.datetime(*date[:6]) + datetime.timedelta(days=1)
        return {
Exemplo n.º 7
0
 def checkforupdate(self):
     update = pipdate.check('accoladecli', version)
     if update is not "":
         print('\n')
         print('This version of accoladecli is outdated. Re-install by typing "pip install accoladecli --upgrade" on command line!')
         print('\n')