fix bad PEP reference on name normalization function

This commit is contained in:
Nate Prewitt
2017-04-24 09:20:23 -06:00
parent d4527aa35f
commit d1a8d73911
3 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -21,7 +21,7 @@ from requests.packages.urllib3.exceptions import InsecureRequestWarning
from .project import Project
from .utils import (convert_deps_from_pip, convert_deps_to_pip, is_required_version,
proper_case, pep426_name, split_vcs, recase_file)
proper_case, pep423_name, split_vcs, recase_file)
from .__version__ import __version__
from . import pep508checker
from .environments import PIPENV_COLORBLIND, PIPENV_NOSPIN, PIPENV_SHELL_COMPAT, PIPENV_VENV_IN_PROJECT
@@ -330,8 +330,8 @@ def parse_install_output(output):
name = lines[0].split('(')[0]
# Strip version specification. e.g. package; python-version=2.6
name = name.split(';')[0]
# Standardize name to pep426.
name = pep426_name(name.strip())
# Standardize name to PEP 423.
name = pep423_name(name.strip())
for line in lines:
r = parse.parse('Saved {file}', line.strip())
+5 -5
View File
@@ -12,7 +12,7 @@ import delegator
from requests.compat import OrderedDict
from .utils import (format_toml, mkdir_p, convert_deps_from_pip,
pep426_name, recase_file)
pep423_name, recase_file)
from .environments import PIPENV_MAX_DEPTH, PIPENV_VENV_IN_PROJECT
@@ -141,8 +141,8 @@ class Project(object):
p_section = pfile.get(section, {})
for key in list(p_section.keys()):
# Normalize key name to pep426.
norm_key = pep426_name(key)
# Normalize key name to PEP 423.
norm_key = pep423_name(key)
p_section[norm_key] = p_section.pop(key)
return pfile
@@ -157,7 +157,7 @@ class Project(object):
lock_section = lockfile.get(section, {})
for key in list(lock_section.keys()):
norm_key = pep426_name(key)
norm_key = pep423_name(key)
lockfile[section][norm_key] = lock_section.pop(key)
return lockfile
@@ -204,7 +204,7 @@ class Project(object):
# Read and append Pipfile.
p = self._pipfile
package_name = pep426_name(package_name)
package_name = pep423_name(package_name)
key = 'dev-packages' if dev else 'packages'
+2 -2
View File
@@ -168,8 +168,8 @@ def is_vcs(pipfile_entry):
return False
def pep426_name(name):
"""Normalize package name to pep426 style standard."""
def pep423_name(name):
"""Normalize package name to PEP 423 style standard."""
return name.lower().replace('_','-')