Hello community,
here is the log from the commit of package python-requirementslib for
openSUSE:Factory checked in at 2020-11-17 21:20:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-requirementslib (Old)
and /work/SRC/openSUSE:Factory/.python-requirementslib.new.24930 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-requirementslib"
Tue Nov 17 21:20:57 2020 rev:8 rq:848389 version:1.5.16
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-requirementslib/python-requirementslib.changes
2020-10-20 16:04:10.037832414 +0200
+++
/work/SRC/openSUSE:Factory/.python-requirementslib.new.24930/python-requirementslib.changes
2020-11-17 21:21:01.181061828 +0100
@@ -1,0 +2,17 @@
+Fri Nov 13 04:19:40 UTC 2020 - John Vandenberg <[email protected]>
+
+- Set minimum versions pip-shims >= 0.5.2 & vistir >= 0.3.1
+- Add pyinstaller-setup.py to enable one of the skipped tests
+- Add test dependency git-core
+- Update to v1.5.16
+ * Expand env vars in the URL of requirements
+ * Replace the deprecated arguments of ``attrs`` with recommended ones
+- from v1.5.15
+ * Fix a bug that file URLs will be incorrectly unquoted during parsing
+- from v1.5.14
+ * Fix the PEP 517 requires in default pyproject.toml and clean temp files
+ * Fix an unparse error that the dictionary keys are unhashable
+ * Fix a bug that dist-info inside ``venv`` directory will be mistaken
+ as the editable package's metadata
+
+-------------------------------------------------------------------
Old:
----
requirementslib-1.5.13.tar.gz
New:
----
pyinstaller-setup.py
requirementslib-1.5.16.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-requirementslib.spec ++++++
--- /var/tmp/diff_new_pack.3dM0Ha/_old 2020-11-17 21:21:03.577065446 +0100
+++ /var/tmp/diff_new_pack.3dM0Ha/_new 2020-11-17 21:21:03.581065452 +0100
@@ -19,13 +19,14 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-requirementslib
-Version: 1.5.13
+Version: 1.5.16
Release: 0
Summary: A tool for converting between pip-style and pipfile
requirements
License: MIT
URL: https://github.com/sarugaku/requirementslib
Source:
https://github.com/sarugaku/requirementslib/archive/%{version}.tar.gz#/requirementslib-%{version}.tar.gz
Source1:
https://raw.githubusercontent.com/mahmoud/boltons/master/LICENSE#/LICENSE.boltons
+Source2:
https://raw.githubusercontent.com/pyinstaller/pyinstaller/develop/setup.py#/pyinstaller-setup.py
Patch0: use-boltons.patch
BuildRequires: %{python_module parver}
BuildRequires: %{python_module setuptools >= 40.8}
@@ -44,13 +45,13 @@
Requires: python-orderedmultidict
Requires: python-packaging >= 19.0
Requires: python-pep517 >= 0.5.0
-Requires: python-pip-shims >= 0.3.2
+Requires: python-pip-shims >= 0.5.2
Requires: python-plette
Requires: python-requests
Requires: python-setuptools >= 40.8
Requires: python-six >= 1.11.0
Requires: python-tomlkit >= 0.5.3
-Requires: python-vistir >= 0.3.0
+Requires: python-vistir >= 0.3.1
BuildArch: noarch
%ifpython2
Requires: python-backports.tempfile
@@ -70,7 +71,7 @@
BuildRequires: %{python_module orderedmultidict}
BuildRequires: %{python_module packaging >= 0.19.0}
BuildRequires: %{python_module pep517 >= 0.5.0}
-BuildRequires: %{python_module pip-shims}
+BuildRequires: %{python_module pip-shims >= 0.5.2}
BuildRequires: %{python_module plette}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest}
@@ -78,12 +79,13 @@
BuildRequires: %{python_module six >= 1.11.0}
BuildRequires: %{python_module tomlkit >= 0.5.3}
BuildRequires: %{python_module twine}
-BuildRequires: %{python_module vistir >= 0.3.0}
+BuildRequires: %{python_module vistir >= 0.3.1}
%if %{with python2}
BuildRequires: python-backports.tempfile
BuildRequires: python-scandir
BuildRequires: python-typing
%endif
+BuildRequires: git-core
# /SECTION
%python_subpackages
@@ -98,8 +100,13 @@
%patch0 -p1
cp %{SOURCE1} .
+# Avoid failure during build
sed -i '/invoke/d' setup.cfg
-rm -r tasks
+
+# It is unclear whether this modified assertion is sufficient.
+# https://github.com/sarugaku/requirementslib/issues/279
+cp %{SOURCE2} tests/artifacts/git/pyinstaller/setup.py
+sed -i 's/assert "altgraph" in result\["install_requires"\]/assert "setuptools
>= 39.2.0" in result["setup_requires"]/' tests/unit/test_setup_info.py
%build
export LANG=en_US.UTF-8
@@ -116,14 +123,19 @@
# many tests need internet
https://github.com/sarugaku/requirementslib/issues/145
# most tests are marked properly
skip_tests="needs_internet"
-# unmarked but need internet
+
+# depends on access to https://github.com/benjaminp/six.git
skip_tests+=" or test_get_local_ref"
+
+# depends on access to https://github.com/jazzband/tablib/archive/v0.12.1.zip
skip_tests+=" or test_get_requirements"
-skip_tests+=" or (test_convert_from_pipfile and requirement10)"
-# unknown reason
+
+# Rapptz is marker for https://github.com/Rapptz/discord.py
+skip_tests+=" or (test_convert_from_pipfile and Rapptz)"
+
+# https://github.com/sarugaku/requirementslib/issues/280
skip_tests+=" or test_parse_function_call_as_name"
-# no packaged test artifact
-skip_tests+=" or test_ast_parser_handles_exceptions"
+
# https://github.com/sarugaku/requirementslib/issues/270
skip_tests+=" or test_no_duplicate_egg_info"
# increase test deadline for slow obs executions architectures (e.g. on s390x)
++++++ pyinstaller-setup.py ++++++
#! /usr/bin/env python
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2020, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------
import sys
import os
from setuptools import setup
# Hack required to allow compat to not fail when pypiwin32 isn't found
os.environ["PYINSTALLER_NO_PYWIN32_FAILURE"] = "1"
#-- plug-in building the bootloader
from distutils.core import Command
from distutils.command.build import build
class build_bootloader(Command):
"""
Wrapper for distutil command `build`.
"""
user_options =[]
def initialize_options(self): pass
def finalize_options(self): pass
def bootloader_exists(self):
# Checks is the console, non-debug bootloader exists
from PyInstaller import HOMEPATH, PLATFORM
from PyInstaller.compat import is_win, is_cygwin
exe = 'run'
if is_win or is_cygwin:
exe = 'run.exe'
exe = os.path.join(HOMEPATH, 'PyInstaller', 'bootloader', PLATFORM, exe)
return os.path.isfile(exe)
def compile_bootloader(self):
import subprocess
from PyInstaller import HOMEPATH
src_dir = os.path.join(HOMEPATH, 'bootloader')
cmd = [sys.executable, './waf', 'configure', 'all']
rc = subprocess.call(cmd, cwd=src_dir)
if rc:
raise SystemExit('ERROR: Failed compiling the bootloader. '
'Please compile manually and rerun setup.py')
def run(self):
if getattr(self, 'dry_run', False):
return
if self.bootloader_exists():
return
print('No precompiled bootloader found. Trying to compile it for you
...',
file=sys.stderr)
self.compile_bootloader()
class MyBuild(build):
# plug `build_bootloader` into the `build` command
def run(self):
self.run_command('build_bootloader')
build.run(self)
#--
setup(
setup_requires = ["setuptools >= 39.2.0"],
cmdclass = {'build_bootloader': build_bootloader,
'build': MyBuild,
},
)
++++++ requirementslib-1.5.13.tar.gz -> requirementslib-1.5.16.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requirementslib-1.5.13/.azure-pipelines/templates/build-package.yml
new/requirementslib-1.5.16/.azure-pipelines/templates/build-package.yml
--- old/requirementslib-1.5.13/.azure-pipelines/templates/build-package.yml
2020-08-12 08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/.azure-pipelines/templates/build-package.yml
2020-11-12 09:02:30.000000000 +0100
@@ -4,9 +4,7 @@
versionSpec: "3.7"
displayName: Use Python 3.7
- - template: install-dependencies.yml
-
- - script: python -m pip install pipenv --upgrade
+ - script: python -m pip install pip wheel pipenv --upgrade
displayName: Install Pipenv
- script: pipenv install --dev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requirementslib-1.5.13/.azure-pipelines/templates/install-dependencies.yml
new/requirementslib-1.5.16/.azure-pipelines/templates/install-dependencies.yml
---
old/requirementslib-1.5.13/.azure-pipelines/templates/install-dependencies.yml
2020-08-12 08:06:56.000000000 +0200
+++
new/requirementslib-1.5.16/.azure-pipelines/templates/install-dependencies.yml
2020-11-12 09:02:30.000000000 +0100
@@ -1,4 +1,5 @@
steps:
- script: |
- python -m pip install --upgrade pip setuptools wheel pipenv && pipenv
install --dev
+ python -m pip install --upgrade pip setuptools wheel pipenv
+ pipenv --python $(python.version) install --dev
displayName: Install Dependencies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requirementslib-1.5.13/.azure-pipelines/templates/run-tests.yml
new/requirementslib-1.5.16/.azure-pipelines/templates/run-tests.yml
--- old/requirementslib-1.5.13/.azure-pipelines/templates/run-tests.yml
2020-08-12 08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/.azure-pipelines/templates/run-tests.yml
2020-11-12 09:02:30.000000000 +0100
@@ -9,9 +9,6 @@
- template: install-dependencies.yml
-- script: pipenv install --dev
- displayName: Install Package
-
- script: pipenv run coverage run --parallel -m pytest -ra
--junitxml=junit/test-results.xml tests/
displayName: 'Run Pytest'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/.editorconfig
new/requirementslib-1.5.16/.editorconfig
--- old/requirementslib-1.5.13/.editorconfig 2020-08-12 08:06:56.000000000
+0200
+++ new/requirementslib-1.5.16/.editorconfig 2020-11-12 09:02:30.000000000
+0100
@@ -14,7 +14,7 @@
[*.toml]
indent_size = 2
-[*.yaml]
+[*.{yaml,yml}]
indent_size = 2
# Makefiles always use tabs for indentation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/.github/workflows/ci.yml
new/requirementslib-1.5.16/.github/workflows/ci.yml
--- old/requirementslib-1.5.13/.github/workflows/ci.yml 2020-08-12
08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/.github/workflows/ci.yml 2020-11-12
09:02:30.000000000 +0100
@@ -3,30 +3,30 @@
on:
push:
paths-ignore:
- - 'docs/**'
- - 'news/**'
- - '*.ini'
- - '*.md'
- - '**/*.txt'
- - '*.rst'
- - '.gitignore'
- - '.gitmodules'
- - '.gitattributes'
- - '.editorconfig'
+ - "docs/**"
+ - "news/**"
+ - "*.ini"
+ - "*.md"
+ - "**/*.txt"
+ - "*.rst"
+ - ".gitignore"
+ - ".gitmodules"
+ - ".gitattributes"
+ - ".editorconfig"
branches:
- - master
+ - master
pull_request:
paths-ignore:
- - 'docs/**'
- - 'news/**'
- - '*.ini'
- - '*.md'
- - '**/*.txt'
- - '*.rst'
- - '.gitignore'
- - '.gitmodules'
- - '.gitattributes'
- - '.editorconfig'
+ - "docs/**"
+ - "news/**"
+ - "*.ini"
+ - "*.md"
+ - "**/*.txt"
+ - "*.rst"
+ - ".gitignore"
+ - ".gitmodules"
+ - ".gitattributes"
+ - ".editorconfig"
jobs:
test:
@@ -39,73 +39,40 @@
os: [MacOS, Ubuntu, Windows]
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v1
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v1
- with:
- python-version: ${{ matrix.python-version }}
-
- - name: Get python path
- id: python-path
- run: |
- echo ::set-output name=path::$(python -c "import sys;
print(sys.executable)")
-
- - name: Install latest pip, setuptools, wheel
- run: |
- python -m pip install --upgrade coveralls pip setuptools wheel
--upgrade-strategy=eager
- python -m pip install --upgrade --pre pipenv
-
- - name: Run tests
- env:
- PIPENV_DEFAULT_PYTHON_VERSION: ${{ matrix.python-version }}
- PYTHONWARNINGS: ignore:DEPRECATION
- COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- COVERALLS_GIT_COMMIT: ${{ github.sha }}
- COVERALLS_GIT_BRANCH: ${{ github.ref }}
- COVERALLS_FLAG_NAME: ${{ matrix.os }}-${{ matrix.python-version }}
- COVERALLS_SERVICE_NAME: github
- COVERALLS_SERVICE_JOB_ID: ${{ github.run_id }}
- COVERALLS_PARALLEL: true
- PIPENV_NOSPIN: '1'
- CI: '1'
- run: |
- git submodule sync
- git submodule update --init --recursive
- python -m pipenv install --dev --python=${{
steps.python-path.outputs.path }}
- pipenv run coverage run -p -m pytest -ra tests/
- pipenv run coverage combine
- coveralls
-
- coveralls-complete:
- needs: test
- runs-on: ubuntu-latest
- env:
- COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- COVERALLS_GIT_COMMIT: ${{ github.sha }}
- COVERALLS_GIT_BRANCH: ${{ github.ref }}
- COVERALLS_SERVICE_NAME: github
- steps:
- - name: install requests
- run: |
- pip install --upgrade --upgrade-strategy=eager requests
- - name: Coveralls Finished
- run: |
- import os
- import requests
- url = "https://coveralls.io/webhook"
- pr_number = None
- service_number = os.environ['COVERALLS_GIT_COMMIT']
- git_branch = os.environ.get('COVERALLS_GIT_BRANCH', '')
- if git_branch.startswith('refs/pull/'):
- pr_number = git_branch.split('/')[2]
- service_number = '{}-PR-{}'.format(service_number, pr_number)
- payload = {
- "repo_token": os.environ['COVERALLS_REPO_TOKEN'],
- "repo_name": os.environ['GITHUB_REPOSITORY'],
- "payload": {"build_num": service_number, "status": "done"}
- }
- response = requests.post(url, json=payload)
- response.raise_for_status()
- assert response.json() == {"done": True}, response.json()
- shell: python
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v1
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Get python path
+ id: python-path
+ run: |
+ echo ::set-output name=path::$(python -c "import sys;
print(sys.executable)")
+
+ - name: Install latest pip, setuptools, wheel
+ run: |
+ python -m pip install --upgrade coveralls pip setuptools wheel
--upgrade-strategy=eager
+ python -m pip install --upgrade --pre pipenv
+
+ - name: Run tests
+ env:
+ PIPENV_DEFAULT_PYTHON_VERSION: ${{ matrix.python-version }}
+ PYTHONWARNINGS: ignore:DEPRECATION
+ COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ COVERALLS_GIT_COMMIT: ${{ github.sha }}
+ COVERALLS_GIT_BRANCH: ${{ github.ref }}
+ COVERALLS_FLAG_NAME: ${{ matrix.os }}-${{ matrix.python-version }}
+ COVERALLS_SERVICE_NAME: github
+ COVERALLS_SERVICE_JOB_ID: ${{ github.run_id }}
+ COVERALLS_PARALLEL: true
+ PIPENV_NOSPIN: "1"
+ CI: "1"
+ run: |
+ git submodule sync
+ git submodule update --init --recursive
+ python -m pipenv install --dev --python=${{
steps.python-path.outputs.path }}
+ pipenv run coverage run -p -m pytest -ra tests/
+ pipenv run coverage combine
+ coveralls
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/.travis.yml
new/requirementslib-1.5.16/.travis.yml
--- old/requirementslib-1.5.13/.travis.yml 2020-08-12 08:06:56.000000000
+0200
+++ new/requirementslib-1.5.16/.travis.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,43 +0,0 @@
-language: python
-sudo: false
-dist: trusty
-cache:
- directories:
- - $HOME/.cache/pipenv
- - $HOME/.cache/pip-tools
- - $HOME/.cache/pip
-
-matrix:
- fast_finish: true
-
-install:
- - "git submodule sync && git submodule update --init --recursive"
- - "python -m pip install --upgrade pip pytest-timeout coverage pipenv"
- - "pipenv install --dev --deploy --system"
-script:
- - "pipenv run pytest -ra tests/"
-
-jobs:
- include:
- - stage: test
- - python: "3.7"
- dist: xenial
- sudo: required
- - python: "3.6"
- - python: "2.7"
- - python: "3.5"
- - stage: packaging
- python: "3.6"
- install:
- - "python -m pip install --upgrade readme-renderer[md] twine
setuptools requests[security]"
- script:
- - "python setup.py sdist"
- - "twine check dist/*"
- - stage: coverage
- python: "3.6"
- install:
- - "pip install --upgrade pip pytest pytest-timeout pytest-cov coverage
pipenv"
- - "git submodule sync && git submodule update --init --recursive"
- - "pipenv install --dev --deploy --system"
- script:
- - "pipenv run pytest -n auto --timeout 300 --cov=requirementslib
--cov-report=term-missing --cov-report=xml --cov-report=html tests"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/CHANGELOG.rst
new/requirementslib-1.5.16/CHANGELOG.rst
--- old/requirementslib-1.5.13/CHANGELOG.rst 2020-08-12 08:06:56.000000000
+0200
+++ new/requirementslib-1.5.16/CHANGELOG.rst 2020-11-12 09:02:30.000000000
+0100
@@ -1,3 +1,40 @@
+1.5.16 (2020-11-12)
+===================
+
+Features
+--------
+
+- Expand env vars in the URL of requirements. `#276
<https://github.com/sarugaku/requirementslib/issues/276>`_
+
+
+Removals and Deprecations
+-------------------------
+
+- Replace the deprecated arguments of ``attrs`` with recommended ones. `#271
<https://github.com/sarugaku/requirementslib/issues/271>`_
+
+
+1.5.15 (2020-11-04)
+===================
+
+Bug Fixes
+---------
+
+- Fix a bug that file URLs will be incorrectly unquoted during parsing. `#274
<https://github.com/sarugaku/requirementslib/issues/274>`_
+
+
+1.5.14 (2020-10-29)
+===================
+
+Bug Fixes
+---------
+
+- Fix the PEP 517 requires in default ``pyproject.toml`` and clean the temp
files. `#262 <https://github.com/sarugaku/requirementslib/issues/262>`_
+
+- Fix an unparse error that the dictionary keys are unhashable. `#266
<https://github.com/sarugaku/requirementslib/issues/266>`_
+
+- Fix a bug that dist-info inside ``venv`` directory will be mistaken as the
editable package's metadata. `#273
<https://github.com/sarugaku/requirementslib/issues/273>`_
+
+
1.5.13 (2020-08-12)
===================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/Pipfile.lock
new/requirementslib-1.5.16/Pipfile.lock
--- old/requirementslib-1.5.13/Pipfile.lock 2020-08-12 08:06:56.000000000
+0200
+++ new/requirementslib-1.5.16/Pipfile.lock 2020-11-12 09:02:30.000000000
+0100
@@ -304,28 +304,31 @@
},
"cryptography": {
"hashes": [
-
"sha256:091d31c42f444c6f519485ed528d8b451d1a0c7bf30e8ca583a0cac44b8a0df6",
-
"sha256:18452582a3c85b96014b45686af264563e3e5d99d226589f057ace56196ec78b",
-
"sha256:1dfa985f62b137909496e7fc182dac687206d8d089dd03eaeb28ae16eec8e7d5",
-
"sha256:1e4014639d3d73fbc5ceff206049c5a9a849cefd106a49fa7aaaa25cc0ce35cf",
-
"sha256:22e91636a51170df0ae4dcbd250d318fd28c9f491c4e50b625a49964b24fe46e",
-
"sha256:3b3eba865ea2754738616f87292b7f29448aec342a7c720956f8083d252bf28b",
-
"sha256:651448cd2e3a6bc2bb76c3663785133c40d5e1a8c1a9c5429e4354201c6024ae",
-
"sha256:726086c17f94747cedbee6efa77e99ae170caebeb1116353c6cf0ab67ea6829b",
-
"sha256:844a76bc04472e5135b909da6aed84360f522ff5dfa47f93e3dd2a0b84a89fa0",
-
"sha256:88c881dd5a147e08d1bdcf2315c04972381d026cdb803325c03fe2b4a8ed858b",
-
"sha256:96c080ae7118c10fcbe6229ab43eb8b090fccd31a09ef55f83f690d1ef619a1d",
-
"sha256:a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229",
-
"sha256:bb1f0281887d89617b4c68e8db9a2c42b9efebf2702a3c5bf70599421a8623e3",
-
"sha256:c447cf087cf2dbddc1add6987bbe2f767ed5317adb2d08af940db517dd704365",
-
"sha256:c4fd17d92e9d55b84707f4fd09992081ba872d1a0c610c109c18e062e06a2e55",
-
"sha256:d0d5aeaedd29be304848f1c5059074a740fa9f6f26b84c5b63e8b29e73dfc270",
-
"sha256:daf54a4b07d67ad437ff239c8a4080cfd1cc7213df57d33c97de7b4738048d5e",
-
"sha256:e993468c859d084d5579e2ebee101de8f5a27ce8e2159959b6673b418fd8c785",
-
"sha256:f118a95c7480f5be0df8afeb9a11bd199aa20afab7a96bcf20409b411a3a85f0"
+
"sha256:22f8251f68953553af4f9c11ec5f191198bc96cff9f0ac5dd5ff94daede0ee6d",
+
"sha256:284e275e3c099a80831f9898fb5c9559120d27675c3521278faba54e584a7832",
+
"sha256:3e17d02941c0f169c5b877597ca8be895fca0e5e3eb882526a74aa4804380a98",
+
"sha256:52a47e60953679eea0b4d490ca3c241fb1b166a7b161847ef4667dfd49e7699d",
+
"sha256:57b8c1ed13b8aa386cabbfde3be175d7b155682470b0e259fecfe53850967f8a",
+
"sha256:6a8f64ed096d13f92d1f601a92d9fd1f1025dc73a2ca1ced46dcf5e0d4930943",
+
"sha256:6e8a3c7c45101a7eeee93102500e1b08f2307c717ff553fcb3c1127efc9b6917",
+
"sha256:7ef41304bf978f33cfb6f43ca13bb0faac0c99cda33693aa20ad4f5e34e8cb8f",
+
"sha256:87c2fffd61e934bc0e2c927c3764c20b22d7f5f7f812ee1a477de4c89b044ca6",
+
"sha256:88069392cd9a1e68d2cfd5c3a2b0d72a44ef3b24b8977a4f7956e9e3c4c9477a",
+
"sha256:8a0866891326d3badb17c5fd3e02c926b635e8923fa271b4813cd4d972a57ff3",
+
"sha256:8f0fd8b0751d75c4483c534b209e39e918f0d14232c0d8a2a76e687f64ced831",
+
"sha256:9a07e6d255053674506091d63ab4270a119e9fc83462c7ab1dbcb495b76307af",
+
"sha256:9a8580c9afcdcddabbd064c0a74f337af74ff4529cdf3a12fa2e9782d677a2e5",
+
"sha256:bd80bc156d3729b38cb227a5a76532aef693b7ac9e395eea8063ee50ceed46a5",
+
"sha256:d1cbc3426e6150583b22b517ef3720036d7e3152d428c864ff0f3fcad2b97591",
+
"sha256:e15ac84dcdb89f92424cbaca4b0b34e211e7ce3ee7b0ec0e4f3c55cee65fae5a",
+
"sha256:e4789b84f8dedf190148441f7c5bfe7244782d9cbb194a36e17b91e7d3e1cca9",
+
"sha256:f01c9116bfb3ad2831e125a73dcd957d173d6ddca7701528eff1e7d97972872c",
+
"sha256:f0e3986f6cce007216b23c490f093f35ce2068f3c244051e559f647f6731b7ae",
+
"sha256:f2aa3f8ba9e2e3fd49bd3de743b976ab192fbf0eb0348cebde5d2a9de0090a9f",
+
"sha256:fb70a4cedd69dc52396ee114416a3656e011fb0311fca55eb55c7be6ed9c8aef"
],
- "markers": "python_version >= '2.7' and python_version not in
'3.0, 3.1, 3.2, 3.3'",
- "version": "==2.9.2"
+ "index": "pypi",
+ "version": "==3.2"
},
"decorator": {
"hashes": [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/README.rst
new/requirementslib-1.5.16/README.rst
--- old/requirementslib-1.5.13/README.rst 2020-08-12 08:06:56.000000000
+0200
+++ new/requirementslib-1.5.16/README.rst 2020-11-12 09:02:30.000000000
+0100
@@ -227,7 +227,7 @@
8. Create a corresponding ``.rst`` file in the ``news`` directory with a one
sentence description of your change, e.g. ``Resolved an issue which sometimes
prevented requirements from being converted from Pipfile entries to pip lines
correctly``
9. Commit your changes. The first line of your commit should be a summary of
your changes, no longer than 72 characters, followed by a blank line, followed
by a bulleted description of your changes.
- Don't forget to add seperate lines with the phrase ``- Fixes
#<issuenumber>`` for each issue you are addressing in your pull request
+ Don't forget to add separate lines with the phrase ``- Fixes
#<issuenumber>`` for each issue you are addressing in your pull request
10. Before submitting your pull request, make sure to ``git remote add
upstream [email protected]:sarugaku/requirementslib.git`` and then ``git fetch
upstream && git pull upstream master`` to ensure your code is in sync with the
latest version of the master branch,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/appveyor.yml
new/requirementslib-1.5.16/appveyor.yml
--- old/requirementslib-1.5.13/appveyor.yml 2020-08-12 08:06:56.000000000
+0200
+++ new/requirementslib-1.5.16/appveyor.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,93 +0,0 @@
-build: off
-version: 1.0.{build}
-skip_branch_with_pr: true
-
-init:
-- ps: >-
-
- git config --global core.sharedRepository true
-
- git config --global core.longpaths true
-
- git config --global core.autocrlf input
-
- if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne
((Invoke-RestMethod `
-
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds
| `
- Where-Object pullRequestId -eq
$env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
- Write-Host "There are newer queued builds for this pull request,
skipping build."
- Exit-AppveyorBuild
- }
-
- If (($env:SKIP_NOTAG -eq "true") -and ($env:APPVEYOR_REPO_TAG -ne "true"))
{
- Write-Host "Skipping build, not at a tag."
- Exit-AppveyorBuild
- }
-
-
-environment:
- GIT_ASK_YESNO: 'false'
- APPVEYOR_SAVE_CACHE_ON_ERROR: 'true'
- APPVEYOR_SKIP_FINALIZE_ON_EXIT: 'true'
- SHELL: 'windows'
- PYTHON_ARCH: '64'
- PYTHONIOENCODING: 'utf-8'
-
- matrix:
- # Unit and integration tests.
- - PYTHON: 'C:\Python37-x64'
- PYTHON_VERSION: '3.7.x'
- - PYTHON: 'C:\Python36-x64'
- PYTHON_VERSION: '3.6.x'
- - PYTHON: 'C:\Python35-x64'
- PYTHON_VERSION: '3.5.x'
- - PYTHON: 'C:\Python27-x64'
- PYTHON_VERSION: '2.7.x'
-
-
-install:
-- ps: >-
-
- $script_path = Join-Path -path $env:PYTHON -childpath Scripts
-
- $py_exe = Join-Path -path $env:PYTHON -childpath python.exe
-
- $env:PATH = "$py_path;$script_path;$env:PATH"
-
- Invoke-Expression "$py_exe -m pip install --upgrade pip pipenv setuptools
pytest-timeout pytest"
-
- if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
-
- Invoke-Expression "$py_exe -m pipenv install --dev --deploy --system"
-
- if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
-
- Invoke-Expression "$py_exe --version"
-
- Invoke-Expression "git submodule sync"
-
- Invoke-Expression "git submodule update --init --recursive"
-
-
-cache:
-- '%LocalAppData%\pip\cache'
-- '%LocalAppData%\pipenv\cache'
-
-test_script:
-
-- ps: >-
-
- $script_path = Join-Path -path $env:PYTHON -childpath Scripts
-
- $py_exe = Join-Path -path $env:PYTHON -childpath python.exe
-
- $env:PATH = "$py_path;$script_path;$env:PATH"
-
- Invoke-Expression "$py_exe -m pip install certifi"
-
- Invoke-Expression "$py_exe -m certifi > cacert.txt"
-
- $env:GIT_SSL_CAINFO="$(Get-Content cacert.txt)"
-
- Invoke-Expression "$py_exe -m pipenv run pytest -ra tests"
-
- if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/azure-pipelines.yml
new/requirementslib-1.5.16/azure-pipelines.yml
--- old/requirementslib-1.5.13/azure-pipelines.yml 2020-08-12
08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/azure-pipelines.yml 2020-11-12
09:02:30.000000000 +0100
@@ -6,85 +6,84 @@
trigger:
branches:
include:
- - master
+ - master
paths:
exclude:
- - 'appveyor.yml'
- - '*.md'
- - '*.rst'
- - '*.txt'
- - '.github/*'
- - 'LICENSE'
- - 'news/*'
- - 'docs/*'
+ - "appveyor.yml"
+ - "*.md"
+ - "*.rst"
+ - "*.txt"
+ - ".github/*"
+ - "LICENSE"
+ - "news/*"
+ - "docs/*"
jobs:
-- job: TestLinux
- pool:
- vmImage: ubuntu-latest
- strategy:
- matrix:
- Python27:
- python.version: '2.7'
- Python35:
- python.version: '3.5'
- Python36:
- python.version: '3.6'
- Python37:
- python.version: '3.7'
- Python38:
- python.version: '3.8'
- maxParallel: 4
- variables:
- - group: CI
- steps:
- - template: .azure-pipelines/templates/run-tests.yml
- - template: .azure-pipelines/templates/run-coverage.yml
+ - job: TestLinux
+ pool:
+ vmImage: ubuntu-latest
+ strategy:
+ matrix:
+ Python27:
+ python.version: "2.7"
+ Python35:
+ python.version: "3.5"
+ Python36:
+ python.version: "3.6"
+ Python37:
+ python.version: "3.7"
+ Python38:
+ python.version: "3.8"
+ maxParallel: 4
+ variables:
+ - group: CI
+ steps:
+ - template: .azure-pipelines/templates/run-tests.yml
-- job: TestWindows
- pool:
- vmImage: windows-latest
- strategy:
- matrix:
- Python27:
- python.version: '2.7'
- Python35:
- python.version: '3.5'
- Python36:
- python.version: '3.6'
- Python37:
- python.version: '3.7'
- Python38:
- python.version: '3.8'
- maxParallel: 4
- steps:
- - template: .azure-pipelines/templates/run-tests.yml
+ - job: TestWindows
+ pool:
+ vmImage: windows-latest
+ strategy:
+ matrix:
+ Python27:
+ python.version: "2.7"
+ Python35:
+ python.version: "3.5"
+ Python36:
+ python.version: "3.6"
+ Python37:
+ python.version: "3.7"
+ Python38:
+ python.version: "3.8"
+ maxParallel: 4
+ steps:
+ - template: .azure-pipelines/templates/run-tests.yml
-- job: TestMacOS
- pool:
- vmImage: macOS-latest
- strategy:
- matrix:
- Python27:
- python.version: '2.7'
- Python35:
- python.version: '3.5'
- Python36:
- python.version: '3.6'
- Python37:
- python.version: '3.7'
- Python38:
- python.version: '3.8'
- maxParallel: 4
- steps:
- - template: .azure-pipelines/templates/run-tests.yml
+ - job: TestMacOS
+ pool:
+ vmImage: macOS-latest
+ strategy:
+ matrix:
+ Python27:
+ python.version: "2.7"
+ Python35:
+ python.version: "3.5"
+ Python36:
+ python.version: "3.6"
+ Python37:
+ python.version: "3.7"
+ Python38:
+ python.version: "3.8"
+ maxParallel: 4
+ steps:
+ - template: .azure-pipelines/templates/run-tests.yml
-- job: BuildPackage
- dependsOn:
- - TestLinux
- - TestWindows
- - TestMacOS
- pool:
- vmImage: ubuntu-latest
- steps:
- - template: .azure-pipelines/templates/build-package.yml
+ - job: BuildPackage
+ dependsOn:
+ - TestLinux
+ - TestWindows
+ - TestMacOS
+ pool:
+ vmImage: ubuntu-latest
+ steps:
+ - template: .azure-pipelines/templates/build-package.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/setup.cfg
new/requirementslib-1.5.16/setup.cfg
--- old/requirementslib-1.5.13/setup.cfg 2020-08-12 08:06:56.000000000
+0200
+++ new/requirementslib-1.5.16/setup.cfg 2020-11-12 09:02:30.000000000
+0100
@@ -47,7 +47,7 @@
parver
install_requires =
appdirs
- attrs>=18.2
+ attrs>=19.2
cached_property
contextlib2;python_version=="2.7"
distlib>=0.2.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requirementslib-1.5.13/src/requirementslib/__init__.py
new/requirementslib-1.5.16/src/requirementslib/__init__.py
--- old/requirementslib-1.5.13/src/requirementslib/__init__.py 2020-08-12
08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/src/requirementslib/__init__.py 2020-11-12
09:02:30.000000000 +0100
@@ -10,7 +10,7 @@
from .models.pipfile import Pipfile
from .models.requirements import Requirement
-__version__ = "1.5.13"
+__version__ = "1.5.16"
logger = logging.getLogger(__name__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requirementslib-1.5.13/src/requirementslib/models/markers.py
new/requirementslib-1.5.16/src/requirementslib/models/markers.py
--- old/requirementslib-1.5.13/src/requirementslib/models/markers.py
2020-08-12 08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/src/requirementslib/models/markers.py
2020-11-12 09:02:30.000000000 +0100
@@ -673,7 +673,7 @@
def _contains_micro_version(version_string):
- return re.search("\d+\.\d+\.\d+", version_string) is not None
+ return re.search(r"\d+\.\d+\.\d+", version_string) is not None
def format_pyversion(parts):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requirementslib-1.5.13/src/requirementslib/models/requirements.py
new/requirementslib-1.5.16/src/requirementslib/models/requirements.py
--- old/requirementslib-1.5.13/src/requirementslib/models/requirements.py
2020-08-12 08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/src/requirementslib/models/requirements.py
2020-11-12 09:02:30.000000000 +0100
@@ -8,12 +8,10 @@
import sys
from contextlib import contextmanager
from distutils.sysconfig import get_python_lib
-from functools import partial
import attr
import pip_shims
import six
-import vistir
from cached_property import cached_property
from packaging.markers import Marker
from packaging.requirements import Requirement as PackagingRequirement
@@ -50,10 +48,6 @@
strip_ssh_from_git_uri,
)
from .markers import (
- cleanup_pyspecs,
- contains_pyversion,
- format_pyversion,
- get_contained_pyversions,
normalize_marker_str,
)
from .setup_info import (
@@ -67,10 +61,10 @@
from .utils import (
DIRECT_URL_RE,
HASH_STRING,
- URL_RE,
build_vcs_uri,
convert_direct_url_to_url,
create_link,
+ expand_env_variables,
extras_to_string,
filter_none,
format_requirement,
@@ -82,7 +76,6 @@
make_install_requirement,
normalize_name,
parse_extras,
- read_source,
specs_to_string,
split_markers_from_line,
split_ref_from_uri,
@@ -926,7 +919,7 @@
if self.is_named:
ireq = pip_shims.shims.install_req_from_line(self.line)
if self.is_file or self.is_remote_url:
- ireq.link = self.link
+ ireq.link =
pip_shims.shims.Link(expand_env_variables(self.link.url))
if self.extras and not ireq.extras:
ireq.extras = set(self.extras)
if self.parsed_marker is not None and not ireq.markers:
@@ -1413,43 +1406,51 @@
)
[email protected](slots=True, cmp=True, hash=True)
[email protected](slots=True, eq=True, order=True, hash=True)
class FileRequirement(object):
"""File requirements for tar.gz installable files or wheels or setup.py
containing directories."""
#: Path to the relevant `setup.py` location
- setup_path = attr.ib(default=None, cmp=True) # type: Optional[STRING_TYPE]
+ setup_path = attr.ib(default=None, eq=True, order=True) # type:
Optional[STRING_TYPE]
#: path to hit - without any of the VCS prefixes (like git+ / http+ / etc)
- path = attr.ib(default=None, cmp=True) # type: Optional[STRING_TYPE]
+ path = attr.ib(default=None, eq=True, order=True) # type:
Optional[STRING_TYPE]
#: Whether the package is editable
- editable = attr.ib(default=False, cmp=True) # type: bool
+ editable = attr.ib(default=False, eq=True, order=True) # type: bool
#: Extras if applicable
extras = attr.ib(
- default=attr.Factory(tuple), cmp=True
+ default=attr.Factory(tuple), eq=True, order=True
) # type: Tuple[STRING_TYPE, ...]
- _uri_scheme = attr.ib(default=None, cmp=True) # type:
Optional[STRING_TYPE]
+ _uri_scheme = attr.ib(
+ default=None, eq=True, order=True
+ ) # type: Optional[STRING_TYPE]
#: URI of the package
- uri = attr.ib(cmp=True) # type: Optional[STRING_TYPE]
+ uri = attr.ib(eq=True, order=True) # type: Optional[STRING_TYPE]
#: Link object representing the package to clone
- link = attr.ib(cmp=True) # type: Optional[Link]
+ link = attr.ib(eq=True, order=True) # type: Optional[Link]
#: PyProject Requirements
pyproject_requires = attr.ib(
- factory=tuple, cmp=True
+ factory=tuple, eq=True, order=True
) # type: Optional[Tuple[STRING_TYPE, ...]]
#: PyProject Build System
- pyproject_backend = attr.ib(default=None, cmp=True) # type:
Optional[STRING_TYPE]
+ pyproject_backend = attr.ib(
+ default=None, eq=True, order=True
+ ) # type: Optional[STRING_TYPE]
#: PyProject Path
- pyproject_path = attr.ib(default=None, cmp=True) # type:
Optional[STRING_TYPE]
+ pyproject_path = attr.ib(
+ default=None, eq=True, order=True
+ ) # type: Optional[STRING_TYPE]
subdirectory = attr.ib(default=None) # type: Optional[STRING_TYPE]
#: Setup metadata e.g. dependencies
- _setup_info = attr.ib(default=None, cmp=True) # type: Optional[SetupInfo]
- _has_hashed_name = attr.ib(default=False, cmp=True) # type: bool
- _parsed_line = attr.ib(default=None, cmp=False, hash=True) # type:
Optional[Line]
+ _setup_info = attr.ib(default=None, eq=True, order=True) # type:
Optional[SetupInfo]
+ _has_hashed_name = attr.ib(default=False, eq=True, order=True) # type:
bool
+ _parsed_line = attr.ib(
+ default=None, eq=False, order=False, hash=True
+ ) # type: Optional[Line]
#: Package name
- name = attr.ib(cmp=True) # type: Optional[STRING_TYPE]
+ name = attr.ib(eq=True, order=True) # type: Optional[STRING_TYPE]
#: A :class:`~pkg_resources.Requirement` instance
- req = attr.ib(cmp=True) # type: Optional[PackagingRequirement]
+ req = attr.ib(eq=True, order=True) # type: Optional[PackagingRequirement]
@classmethod
def get_link_from_line(cls, line):
@@ -1799,7 +1800,7 @@
if link_info:
link = link_info.link
if link.url_without_fragment:
- uri = unquote(link.url_without_fragment)
+ uri = link.url_without_fragment
extras = () # type: Optional[Tuple[STRING_TYPE, ...]]
if "extras" in pipfile:
extras = tuple(pipfile["extras"]) # type: ignore
@@ -1821,10 +1822,10 @@
else:
if name:
line_name = "{0}{1}".format(name, extras_string)
- line =
"{0}#egg={1}".format(unquote(link.url_without_fragment), line_name)
+ line = "{0}#egg={1}".format(link.url_without_fragment,
line_name)
else:
if link:
- line = unquote(link.url)
+ line = link.url
elif uri and isinstance(uri, six.string_types):
line = uri
else:
@@ -1847,7 +1848,7 @@
link_url = None # type: Optional[STRING_TYPE]
seed = None # type: Optional[STRING_TYPE]
if self.link is not None:
- link_url = unquote(self.link.url_without_fragment)
+ link_url = self.link.url_without_fragment
is_vcs = getattr(self.link, "is_vcs", not self.link.is_artifact)
if self._uri_scheme and self._uri_scheme == "path":
# We may need any one of these for passing to pip
@@ -2140,7 +2141,7 @@
if checkout_dir is None:
checkout_dir = self.get_checkout_dir(src_dir=src_dir)
vcsrepo = VCSRepository(
- url=self.url,
+ url=expand_env_variables(self.url),
name=self.name,
ref=self.ref if self.ref else None,
checkout_directory=checkout_dir,
@@ -2373,29 +2374,34 @@
return {name: pipfile_dict} # type: ignore
[email protected](cmp=True, hash=True)
[email protected](eq=True, order=True, hash=True)
class Requirement(object):
- _name = attr.ib(cmp=True) # type: STRING_TYPE
+ _name = attr.ib(eq=True, order=True) # type: STRING_TYPE
vcs = attr.ib(
- default=None, validator=attr.validators.optional(validate_vcs),
cmp=True
+ default=None,
+ validator=attr.validators.optional(validate_vcs),
+ eq=True,
+ order=True,
) # type: Optional[STRING_TYPE]
req = attr.ib(
- default=None, cmp=True
+ default=None, eq=True, order=True
) # type: Optional[Union[VCSRequirement, FileRequirement,
NamedRequirement]]
- markers = attr.ib(default=None, cmp=True) # type: Optional[STRING_TYPE]
+ markers = attr.ib(default=None, eq=True, order=True) # type:
Optional[STRING_TYPE]
_specifiers = attr.ib(
- validator=attr.validators.optional(validate_specifiers), cmp=True
+ validator=attr.validators.optional(validate_specifiers), eq=True,
order=True
) # type: Optional[STRING_TYPE]
- index = attr.ib(default=None, cmp=True) # type: Optional[STRING_TYPE]
- editable = attr.ib(default=None, cmp=True) # type: Optional[bool]
+ index = attr.ib(default=None, eq=True, order=True) # type:
Optional[STRING_TYPE]
+ editable = attr.ib(default=None, eq=True, order=True) # type:
Optional[bool]
hashes = attr.ib(
- factory=frozenset, converter=frozenset, cmp=True
+ factory=frozenset, converter=frozenset, eq=True, order=True
) # type: FrozenSet[STRING_TYPE]
- extras = attr.ib(factory=tuple, cmp=True) # type: Tuple[STRING_TYPE, ...]
- abstract_dep = attr.ib(default=None, cmp=False) # type:
Optional[AbstractDependency]
- _line_instance = attr.ib(default=None, cmp=False) # type: Optional[Line]
+ extras = attr.ib(factory=tuple, eq=True, order=True) # type:
Tuple[STRING_TYPE, ...]
+ abstract_dep = attr.ib(
+ default=None, eq=False, order=False
+ ) # type: Optional[AbstractDependency]
+ _line_instance = attr.ib(default=None, eq=False, order=False) # type:
Optional[Line]
_ireq = attr.ib(
- default=None, cmp=False
+ default=None, eq=False, order=False
) # type: Optional[pip_shims.InstallRequirement]
def __hash__(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requirementslib-1.5.13/src/requirementslib/models/setup_info.py
new/requirementslib-1.5.16/src/requirementslib/models/setup_info.py
--- old/requirementslib-1.5.13/src/requirementslib/models/setup_info.py
2020-08-12 08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/src/requirementslib/models/setup_info.py
2020-11-12 09:02:30.000000000 +0100
@@ -25,7 +25,7 @@
from packaging.markers import Marker
from pip_shims.utils import call_function_with_correct_args
from six.moves import configparser
-from six.moves.urllib.parse import unquote, urlparse, urlunparse
+from six.moves.urllib.parse import urlparse, urlunparse
from vistir.compat import FileNotFoundError, Iterable, Mapping, Path,
finalize, lru_cache
from vistir.contextmanagers import cd, temp_path
from vistir.misc import run
@@ -465,6 +465,18 @@
pass
+def _is_venv_dir(path):
+ # type: (AnyStr) -> bool
+ if os.name == "nt":
+ return os.path.isfile(os.path.join(path, "Scripts/python.exe")) or
os.path.isfile(
+ os.path.join(path, "Scripts/activate")
+ )
+ else:
+ return os.path.isfile(os.path.join(path, "bin/python")) or
os.path.isfile(
+ os.path.join(path, "bin/activate")
+ )
+
+
def iter_metadata(path, pkg_name=None, metadata_type="egg-info"):
# type: (AnyStr, Optional[AnyStr], AnyStr) -> Generator
if pkg_name is not None:
@@ -472,6 +484,9 @@
dirs_to_search = [path]
while dirs_to_search:
p = dirs_to_search.pop(0)
+ # Skip when the directory is like a venv
+ if _is_venv_dir(p):
+ continue
with contextlib.closing(ScandirCloser(p)) as path_iterator:
for entry in path_iterator:
if entry.is_dir():
@@ -992,6 +1007,15 @@
return setup
+def _ensure_hashable(item):
+ try:
+ hash(item)
+ except TypeError:
+ return str(item)
+ else:
+ return item
+
+
def ast_unparse(item, initial_mapping=False, analyzer=None, recurse=True): #
noqa:C901
# type: (Any, bool, Optional[Analyzer], bool) -> Union[List[Any],
Dict[Any, Any], Tuple[Any, ...], STRING_TYPE]
unparse = partial(
@@ -1003,7 +1027,9 @@
constant = ast.Ellipsis
unparsed = item
if isinstance(item, ast.Dict):
- unparsed = dict(zip(unparse(item.keys), unparse(item.values)))
+ unparsed = dict(
+ zip(map(_ensure_hashable, unparse(item.keys)),
unparse(item.values))
+ )
elif isinstance(item, ast.List):
unparsed = [unparse(el) for el in item.elts]
elif isinstance(item, ast.Tuple):
@@ -1151,7 +1177,7 @@
# XXX: Original reference
try:
targets = item.targets # for ast.Assign
- except AttributeError: # for ast.AnnAssign
+ except AttributeError: # for ast.AnnAssign
targets = (item.target,)
if not initial_mapping:
target = unparse(next(iter(targets)), recurse=False)
@@ -1302,9 +1328,9 @@
@attr.s(slots=True, frozen=True)
class BaseRequirement(object):
- name = attr.ib(default="", cmp=True) # type: STRING_TYPE
+ name = attr.ib(default="", eq=True, order=True) # type: STRING_TYPE
requirement = attr.ib(
- default=None, cmp=True
+ default=None, eq=True, order=True
) # type: Optional[PkgResourcesRequirement]
def __str__(self):
@@ -1344,8 +1370,8 @@
@attr.s(slots=True, frozen=True)
class Extra(object):
- name = attr.ib(default=None, cmp=True) # type: STRING_TYPE
- requirements = attr.ib(factory=frozenset, cmp=True, type=frozenset)
+ name = attr.ib(default=None, eq=True, order=True) # type: STRING_TYPE
+ requirements = attr.ib(factory=frozenset, eq=True, order=True,
type=frozenset)
def __str__(self):
# type: () -> S
@@ -1580,8 +1606,14 @@
def build_wheel(self):
# type: () -> S
+ need_delete = False
if not self.pyproject.exists():
- build_requires = ", ".join(['"{0}"'.format(r) for r in
self.build_requires])
+ if not self.build_requires:
+ build_requires = '"setuptools", "wheel"'
+ else:
+ build_requires = ", ".join(
+ ['"{0}"'.format(r) for r in self.build_requires]
+ )
self.pyproject.write_text(
six.text_type(
"""
@@ -1593,16 +1625,21 @@
).strip()
)
)
- return build_pep517(
+ need_delete = True
+ result = build_pep517(
self.base_dir,
self.extra_kwargs["build_dir"],
config_settings=self.pep517_config,
dist_type="wheel",
)
+ if need_delete:
+ self.pyproject.unlink()
+ return result
# noinspection PyPackageRequirements
def build_sdist(self):
# type: () -> S
+ need_delete = False
if not self.pyproject.exists():
if not self.build_requires:
build_requires = '"setuptools", "wheel"'
@@ -1621,12 +1658,16 @@
).strip()
)
)
- return build_pep517(
+ need_delete = True
+ result = build_pep517(
self.base_dir,
self.extra_kwargs["build_dir"],
config_settings=self.pep517_config,
dist_type="sdist",
)
+ if need_delete:
+ self.pyproject.unlink()
+ return result
def build(self):
# type: () -> "SetupInfo"
@@ -1854,7 +1895,7 @@
session = cmd._build_session(options)
finder = cmd._build_package_finder(options, session)
tempdir_manager =
stack.enter_context(pip_shims.shims.global_tempdir_manager())
- vcs, uri =
split_vcs_method_from_uri(unquote(ireq.link.url_without_fragment))
+ vcs, uri = split_vcs_method_from_uri(ireq.link.url_without_fragment)
parsed = urlparse(uri)
if "file" in parsed.scheme:
url_path = parsed.path
@@ -1894,7 +1935,8 @@
if not ireq.source_dir:
build_kwargs = {
"build_dir": kwargs["build_dir"],
- "autodelete": False, "parallel_builds": True
+ "autodelete": False,
+ "parallel_builds": True,
}
call_function_with_correct_args(build_location_func,
**build_kwargs)
ireq.ensure_has_source_dir(kwargs["src_dir"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requirementslib-1.5.13/src/requirementslib/models/utils.py
new/requirementslib-1.5.16/src/requirementslib/models/utils.py
--- old/requirementslib-1.5.13/src/requirementslib/models/utils.py
2020-08-12 08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/src/requirementslib/models/utils.py
2020-11-12 09:02:30.000000000 +0100
@@ -1028,6 +1028,22 @@
return fp.read()
+def expand_env_variables(line):
+ # type: (AnyStr) -> AnyStr
+ """Expand the env vars in a line following pip's standard.
+ https://pip.pypa.io/en/stable/reference/pip_install/#id10
+
+ Matches environment variable-style values in '${MY_VARIABLE_1}' with the
+ variable name consisting of only uppercase letters, digits or the '_'
+ """
+
+ def replace_with_env(match):
+ value = os.getenv(match.group(1))
+ return value if value else match.group()
+
+ return re.sub(r"\$\{([A-Z0-9_]+)\}", replace_with_env, line)
+
+
SETUPTOOLS_SHIM = (
"import setuptools, tokenize;__file__=%r;"
"f=getattr(tokenize, 'open', open)(__file__);"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requirementslib-1.5.13/tests/artifacts/environ_config/environ_config/setup.py
new/requirementslib-1.5.16/tests/artifacts/environ_config/environ_config/setup.py
---
old/requirementslib-1.5.13/tests/artifacts/environ_config/environ_config/setup.py
2020-08-12 08:06:56.000000000 +0200
+++
new/requirementslib-1.5.16/tests/artifacts/environ_config/environ_config/setup.py
2020-11-12 09:02:30.000000000 +0100
@@ -77,7 +77,7 @@
read("README.rst") + "\n\n" +
"Release Information\n" +
"===================\n\n" +
- re.search("(\d+.\d.\d \(.*?\)\n.*?)(\n\n\n----\n)",
+ re.search("(\\d+.\\d.\\d \\(.*?\\)\n.*?)(\n\n\n----\n)",
read("CHANGELOG.rst"), re.S).group(1) +
"\n\n`Full changelog " +
"<{uri}en/stable/changelog.html>`_.\n\n".format(uri=URI) +
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/tests/unit/strategies.py
new/requirementslib-1.5.16/tests/unit/strategies.py
--- old/requirementslib-1.5.13/tests/unit/strategies.py 2020-08-12
08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/tests/unit/strategies.py 2020-11-12
09:02:30.000000000 +0100
@@ -398,9 +398,9 @@
Repository("sarugkau", "vistir", ref="0.4.1"),
Repository("sarugaku", "shellingham"),
Repository("sarugaku", "shellingham", scheme="ssh"),
- Repository("kennethreitz", "requests"),
- Repository("kennethreitz", "requests", extras=["security"]),
- Repository("kennethreitz", "tablib"),
+ Repository("psf", "requests"),
+ Repository("psf", "requests", extras=["security"]),
+ Repository("jazzband", "tablib"),
Repository("benjaminp", "six"),
Repository("sarugaku", "plette"),
Repository("sarugaku", "plette", extras=["validation"]),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requirementslib-1.5.13/tests/unit/test_requirements.py
new/requirementslib-1.5.16/tests/unit/test_requirements.py
--- old/requirementslib-1.5.13/tests/unit/test_requirements.py 2020-08-12
08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/tests/unit/test_requirements.py 2020-11-12
09:02:30.000000000 +0100
@@ -5,6 +5,7 @@
import pytest
from hypothesis import given, settings, strategies as st
from vistir.compat import Path
+from vistir.contextmanagers import temp_environ
from requirementslib.exceptions import RequirementError
from requirementslib.models.requirements import Line, NamedRequirement,
Requirement
@@ -261,7 +262,7 @@
@pytest.mark.utils
def test_convert_from_pip_fail_if_no_egg():
"""Parsing should fail without `#egg=`."""
- dep = "git+https://github.com/kennethreitz/requests.git"
+ dep = "git+https://github.com/psf/requests.git"
with pytest.raises(ValueError) as e:
dep = Requirement.from_line(dep).as_pipfile()
assert "pipenv requires an #egg fragment for vcs" in str(e)
@@ -314,9 +315,9 @@
assert url_with_egg.name == "django-user-clipboard"
# Test URLs without eggs pointing at installable zipfiles
url = Requirement.from_line(
- "https://codeload.github.com/kennethreitz/tablib/zip/v0.12.1"
+ "https://github.com/jazzband/tablib/archive/v0.12.1.zip"
).requirement
- assert url.url ==
"https://codeload.github.com/kennethreitz/tablib/zip/v0.12.1"
+ assert url.url == "https://github.com/jazzband/tablib/archive/v0.12.1.zip"
wheel_line =
"https://github.com/pypa/pipenv/raw/master/tests/test_artifacts/six-1.11.0+mkl-py2.py3-none-any.whl"
wheel = Requirement.from_line(wheel_line)
assert wheel.as_pipfile() == {
@@ -334,12 +335,12 @@
)
# Test VCS urls with refs and eggnames
vcs_url = Requirement.from_line(
- "git+https://github.com/kennethreitz/tablib.git@master#egg=tablib"
+ "git+https://github.com/jazzband/tablib.git@master#egg=tablib"
).requirement
assert (
vcs_url.vcs == "git" and vcs_url.name == "tablib" and vcs_url.revision
== "master"
)
- assert vcs_url.url == "git+https://github.com/kennethreitz/tablib.git"
+ assert vcs_url.url == "git+https://github.com/jazzband/tablib.git"
# Test normal package requirement
normal = Requirement.from_line("tablib").requirement
assert normal.name == "tablib"
@@ -433,19 +434,19 @@
@pytest.mark.needs_internet
def test_pep_508():
r = Requirement.from_line(
- "tablib@ https://codeload.github.com/kennethreitz/tablib/zip/v0.12.1"
+ "tablib@ https://codeload.github.com/jazzband/tablib/zip/v0.12.1"
)
assert r.specifiers == "==0.12.1"
assert (
r.req.link.url
- ==
"https://codeload.github.com/kennethreitz/tablib/zip/v0.12.1#egg=tablib"
+ == "https://codeload.github.com/jazzband/tablib/zip/v0.12.1#egg=tablib"
)
assert r.req.req.name == "tablib"
- assert r.req.req.url ==
"https://codeload.github.com/kennethreitz/tablib/zip/v0.12.1"
+ assert r.req.req.url ==
"https://codeload.github.com/jazzband/tablib/zip/v0.12.1"
requires, setup_requires, build_requires = r.req.dependencies
assert all(dep in requires for dep in ["openpyxl", "odfpy", "xlrd"])
assert r.as_pipfile() == {
- "tablib": {"file":
"https://codeload.github.com/kennethreitz/tablib/zip/v0.12.1"}
+ "tablib": {"file":
"https://codeload.github.com/jazzband/tablib/zip/v0.12.1"}
}
@@ -461,3 +462,58 @@
assert isinstance(r.req, NamedRequirement)
assert r.as_line() == "alembic"
assert r.line_instance.is_named is True
+
+
[email protected]
+def test_file_url_with_percent_encoding():
+ r = Requirement.from_pipfile(
+ "torch",
+ {
+ "file":
"https://download.pytorch.org/whl/cpu/torch-1.7.0%2Bcpu-cp38-cp38-linux_x86_64.whl#egg=torch"
+ },
+ )
+ assert (
+ r.req.uri
+ ==
"https://download.pytorch.org/whl/cpu/torch-1.7.0%2Bcpu-cp38-cp38-linux_x86_64.whl"
+ )
+ assert (
+ r.as_line()
+ ==
"https://download.pytorch.org/whl/cpu/torch-1.7.0%2Bcpu-cp38-cp38-linux_x86_64.whl#egg=torch"
+ )
+
+
[email protected]_internet
+def test_vcs_requirement_with_env_vars():
+ with temp_environ():
+ os.environ["GIT_URL"] = "github.com"
+ r = Requirement.from_pipfile(
+ "click", {"git": "https://${GIT_URL}/pallets/click.git", "ref":
"6.7"}
+ )
+ assert (
+ r.as_ireq().link.url_without_fragment
+ == "git+https://github.com/pallets/[email protected]"
+ )
+ assert r.as_line() ==
"git+https://${GIT_URL}/pallets/[email protected]#egg=click"
+ assert r.as_pipfile()["click"]["git"] ==
"https://${GIT_URL}/pallets/click.git"
+ assert r.commit_hash == "df0e37dd890d36fc997986ae6d2b6c255f3ed1dc"
+
+
+def test_remote_requirement_with_env_vars():
+ with temp_environ():
+ os.environ["USERNAME"] = "foo"
+ os.environ["PASSWORD"] = "bar"
+ r = Requirement.from_line(
+
"https://${USERNAME}:${PASSWORD}@codeload.github.com/jazzband/tablib/zip/v0.12.1#egg=tablib"
+ )
+ assert (
+ r.as_ireq().link.url_without_fragment
+ ==
"https://foo:[email protected]/jazzband/tablib/zip/v0.12.1"
+ )
+ assert (
+ r.as_line()
+ ==
"https://${USERNAME}:${PASSWORD}@codeload.github.com/jazzband/tablib/zip/v0.12.1#egg=tablib"
+ )
+ assert (
+ r.as_pipfile()["tablib"]["file"]
+ ==
"https://${USERNAME}:${PASSWORD}@codeload.github.com/jazzband/tablib/zip/v0.12.1"
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/tests/unit/test_setup_info.py
new/requirementslib-1.5.16/tests/unit/test_setup_info.py
--- old/requirementslib-1.5.13/tests/unit/test_setup_info.py 2020-08-12
08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/tests/unit/test_setup_info.py 2020-11-12
09:02:30.000000000 +0100
@@ -5,7 +5,6 @@
import shutil
import sys
-import pip_shims.shims
import pytest
import six
import vistir
@@ -302,7 +301,10 @@
@pytest.mark.parametrize(
"env_vars, expected_install_requires",
- [({"NOTHING": "1"}, []), ({"READTHEDOCS": "1"}, ["sphinx",
"sphinx-argparse"]),],
+ [
+ ({"NOTHING": "1"}, []),
+ ({"READTHEDOCS": "1"}, ["sphinx", "sphinx-argparse"]),
+ ],
)
def test_ast_parser_handles_dependency_on_env_vars(
env_vars, expected_install_requires, setup_py_dir
@@ -341,13 +343,10 @@
@pytest.mark.skipif(
- sys.version_info < (3, 6),
- reason="Type annotations are not available for Python<3.6"
+ sys.version_info < (3, 6), reason="Type annotations are not available for
Python<3.6"
)
def test_ast_parser_handles_annoted_assignments(setup_py_dir):
parsed = ast_parse_setup_py(
- setup_py_dir.joinpath(
- "package_with_annoted_assignments/setup.py"
- ).as_posix()
+
setup_py_dir.joinpath("package_with_annoted_assignments/setup.py").as_posix()
)
assert parsed["extras_require"] == {"docs": ["sphinx", "sphinx-argparse"]}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requirementslib-1.5.13/tests/unit/test_utils.py
new/requirementslib-1.5.16/tests/unit/test_utils.py
--- old/requirementslib-1.5.13/tests/unit/test_utils.py 2020-08-12
08:06:56.000000000 +0200
+++ new/requirementslib-1.5.16/tests/unit/test_utils.py 2020-11-12
09:02:30.000000000 +0100
@@ -1,12 +1,15 @@
# -*- coding=utf-8 -*-
+import os
import pip_shims.shims
import pytest
from vistir.compat import Path
+from vistir.contextmanagers import temp_environ
from requirementslib import utils as base_utils
from requirementslib.models import utils
from requirementslib.models.requirements import Requirement
from requirementslib.models.setup_info import SetupInfo
+from requirementslib.models.utils import expand_env_variables
def mock_run_requires(cls):
@@ -200,3 +203,12 @@
)
def test_editable_check(input, expected):
assert base_utils.is_editable(input) is expected
+
+
+def test_expand_env_variables():
+ with temp_environ():
+ os.environ["FOO"] = "foo"
+
+ assert expand_env_variables("echo ${FOO} ${BAR}") == "echo foo ${BAR}"
+ assert expand_env_variables("echo %FOO%") == "echo %FOO%"
+ assert expand_env_variables("echo $FOO") == "echo $FOO"
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives:
https://lists.opensuse.org/archives/list/[email protected]