Mercurial: remove conditions for py3.5 + requirements only in setup.py

pull/950/head
paugier 2020-09-08 10:09:13 +02:00
rodzic 319e22ab1d
commit c91ed4eec5
4 zmienionych plików z 2 dodań i 13 usunięć

Wyświetl plik

@ -12,8 +12,6 @@ alabaster = "*"
Sphinx = ">=1.4,!=1.5.4" Sphinx = ">=1.4,!=1.5.4"
alabaster_jupyterhub = "*" alabaster_jupyterhub = "*"
sphinxcontrib-autoprogram = "*" sphinxcontrib-autoprogram = "*"
mercurial = {version = ">=5.2", markers="python_version > '3.5'"}
hg-evolve = {version = ">=10.0", markers="python_version > '3.5'"}
[packages] [packages]
repo2docker = {path=".", editable=true} repo2docker = {path=".", editable=true}

Wyświetl plik

@ -6,5 +6,3 @@ wheel
pytest-cov pytest-cov
pre-commit pre-commit
requests requests
mercurial>=5.2; python_version > '3.5'
hg-evolve>=10.0; python_version > '3.5'

Wyświetl plik

@ -55,8 +55,8 @@ setup(
"ruamel.yaml>=0.15", "ruamel.yaml>=0.15",
"toml", "toml",
"semver", "semver",
"mercurial>=5.2; python_version > '3.5'", "mercurial>=5.2",
"hg-evolve>=10.0; python_version > '3.5'", "hg-evolve>=10.0",
], ],
python_requires=">=3.6", python_requires=">=3.6",
author="Project Jupyter Contributors", author="Project Jupyter Contributors",

Wyświetl plik

@ -1,16 +1,12 @@
from pathlib import Path from pathlib import Path
import subprocess import subprocess
from tempfile import TemporaryDirectory from tempfile import TemporaryDirectory
import sys
import pytest import pytest
from repo2docker.contentproviders import Mercurial from repo2docker.contentproviders import Mercurial
skipif_py35 = pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6")
def _add_content_to_hg(repo_dir): def _add_content_to_hg(repo_dir):
"""Add content to file 'test' in hg repository and commit.""" """Add content to file 'test' in hg repository and commit."""
# use append mode so this can be called multiple times # use append mode so this can be called multiple times
@ -50,7 +46,6 @@ def hg_repo_with_content(hg_repo):
yield hg_repo, node_id yield hg_repo, node_id
@skipif_py35
def test_detect_mercurial(hg_repo_with_content, repo_with_content): def test_detect_mercurial(hg_repo_with_content, repo_with_content):
mercurial = Mercurial() mercurial = Mercurial()
assert mercurial.detect("this-is-not-a-directory") is None assert mercurial.detect("this-is-not-a-directory") is None
@ -63,7 +58,6 @@ def test_detect_mercurial(hg_repo_with_content, repo_with_content):
assert mercurial.detect(hg_repo) == {"repo": hg_repo, "ref": None} assert mercurial.detect(hg_repo) == {"repo": hg_repo, "ref": None}
@skipif_py35
def test_clone(hg_repo_with_content): def test_clone(hg_repo_with_content):
"""Test simple hg clone to a target dir""" """Test simple hg clone to a target dir"""
upstream, node_id = hg_repo_with_content upstream, node_id = hg_repo_with_content
@ -78,7 +72,6 @@ def test_clone(hg_repo_with_content):
assert mercurial.content_id == node_id assert mercurial.content_id == node_id
@skipif_py35
def test_bad_ref(hg_repo_with_content): def test_bad_ref(hg_repo_with_content):
""" """
Test trying to checkout a ref that doesn't exist Test trying to checkout a ref that doesn't exist