Skip to content

Commit 70d99ef

Browse files
Merge branch 'develop' into #2390
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
2 parents e917646 + 87f7be1 commit 70d99ef

File tree

64 files changed

+969
-577
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+969
-577
lines changed

CHANGELOG.rst

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,30 @@ Breaking API changes:
2424
multiple manifests for a single package instance.
2525

2626

27-
v21.5.11
27+
v21.6.2
2828
--------
2929

3030
Breaking API changes:
3131
~~~~~~~~~~~~~~~~~~~~~
3232

33-
- The configure scripts for Linux, macOS and Windows are new. These are now
34-
only native scripts (.bat on Windows and .sh on POSIX) and the Python script
35-
etc/configure.py has been removed. Use the PYTHON_EXECUTABLE enviroment
36-
varibale to point to alternative non-default Python executable. An this on
37-
all OSes.
33+
- The configure scripts for Linux, macOS and Windows have been entirely
34+
refactored and should be considered as new. These are now only native scripts
35+
(.bat on Windows and .sh on POSIX) and the Python script etc/configure.py
36+
has been removed. Use the PYTHON_EXECUTABLE enviroment variable to point to
37+
alternative non-default Python executable and this on all OSes.
38+
39+
Security updates:
40+
~~~~~~~~~~~~~~~~~
41+
42+
- Update minimum versions and pinned version of thirdparty dependencies
43+
to benefit from latest improvements and sceurity fixes. This includes in
44+
particular this issues:
45+
46+
- pkg:pypi/pygments: (low severity, limited impact) CVE-2021-20270, CVE-2021-27291
47+
- pkg:pypi/lxml: (low severity, likely no impact) CVE-2021-28957
48+
- pkg:pypi/nltk: (low severity, likely no impact) CVE-2019-14751
49+
- pkg:pypi/jinja2: (low severity, likely no impact) CVE-2020-28493, CVE-2019-10906
50+
- pkg:pypi/pycryptodome: (high severity) CVE-2018-15560 (dropped since no longer used)
3851

3952

4053
Ouputs:

README.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,6 @@ See the NOTICE file and the .ABOUT files that document the origin and license of
215215
the third-party code used in ScanCode for more details.
216216

217217

218-
.. |master-cov| image:: https://codecov.io/gh/nexB/scancode-toolkit/branch/master/graph/badge.svg
219-
:target: https://codecov.io/gh/nexB/scancode-toolkit/branch/master
220-
:alt: Master branch test coverage (Linux)
221-
.. |devel-cov| image:: https://codecov.io/gh/nexB/scancode-toolkit/branch/develop/graph/badge.svg
222-
:target: https://codecov.io/gh/nexB/scancode-toolkit/branch/develop
223-
:alt: Develop branch test coverage (Linux)
224-
225218
.. |master-posix| image:: https://api.travis-ci.org/nexB/scancode-toolkit.png?branch=master
226219
:target: https://travis-ci.org/nexB/scancode-toolkit
227220
:alt: Linux Master branch tests status

azure-pipelines.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,4 +317,33 @@ jobs:
317317
# - script: ./etc/release/scancode-test-pip-install-editable.sh
318318
# displayName: 'Test pip editable installation'
319319

320+
################################################################################
321+
# Tests using a plain pip install to get the latest of all wheels
322+
################################################################################
323+
324+
325+
- template: etc/ci/azure-posix.yml
326+
parameters:
327+
job_name: ubuntu20_cpython_latest_from_pip
328+
image_name: ubuntu-20.04
329+
python_versions: ['3.6', '3.7', '3.8', '3.9']
330+
test_suites:
331+
all: bin/pip install --force-reinstall --upgrade -e .[dev] && bin/pytest -n 2 -vvs tests/scancode/test_cli.py
332+
333+
- template: etc/ci/azure-win.yml
334+
parameters:
335+
job_name: win2019_cpython_latest_from_pip
336+
image_name: windows-2019
337+
python_versions: ['3.6', '3.7', '3.8', '3.9']
338+
test_suites:
339+
all: Scripts\pip install --force-reinstall --upgrade -e .[dev] && Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py
340+
341+
- template: etc/ci/azure-posix.yml
342+
parameters:
343+
job_name: macos1015_cpython_latest_from_pip
344+
image_name: macos-10.15
345+
python_versions: ['3.6', '3.7', '3.8', '3.9']
346+
test_suites:
347+
all: bin/pip install --force-reinstall --upgrade -e .[dev] && bin/pytest -n 2 -vvs tests/scancode/test_cli.py
348+
320349

docs/source/getting-started/install.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ Installation on Linux and Mac
120120
Get the Scancode Toolkit tarball archive of a specific version and your
121121
operating system by going to the `project releases page <https://github.com/nexB/scancode-toolkit/releases/>`_
122122

123-
For example, Version 21.3.31 archive can be obtained from
124-
`Toolkit release 21.3.31 <https://github.com/nexB/scancode-toolkit/releases/tag/v21.3.31>`_
123+
For example, Version 21.6.2 archive can be obtained from
124+
`Toolkit release 21.6.2 <https://github.com/nexB/scancode-toolkit/releases/tag/v21.6.1>`_
125125
under assets options. Download the archive for your operating systen and extract
126126
the archive from command line::
127127

128-
tar -xvf scancode-toolkit-21.3.31_py36-linux.tar.xz
128+
tar -xvf scancode-toolkit-21.6.2_py36-linux.tar.xz
129129

130130

131131
Or, on Linux, right click and select "Extract Here".
@@ -292,7 +292,7 @@ Here, ``main`` branch has the latest release of Scancode-Toolkit. You can also c
292292
of the following:
293293

294294
- Branches (Locally created or already present) [Example - ``main``]
295-
- Tags (essentially version numbers) [Example - ``v21.2.25``, ``v21.3.31``]
295+
- Tags (essentially version numbers) [Example - ``v21.2.25``, ``v21.6.1``]
296296
- Commits (use the shortened commit hash) [Example - ``4502055``, ``f276398``]
297297

298298

etc/release/bootstrap.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
show_default=True,
5353
help='OS(ses) to use for this build: one of linux, mac or windows.',
5454
)
55+
@click.option('-l', '--latest-version',
56+
is_flag=True,
57+
help='Get the latest version of all packages, ignoring version specifiers.',
58+
)
5559
@click.option('--sync-dejacode',
5660
is_flag=True,
5761
help='Synchronize packages with DejaCode.',
@@ -67,19 +71,23 @@ def bootstrap(
6771
python_version,
6872
operating_system,
6973
with_deps,
74+
latest_version,
7075
sync_dejacode,
7176
build_remotely=False,
7277
):
7378
"""
7479
Boostrap a thirdparty Python packages directory from pip requirements.
7580
7681
Fetch or build to THIRDPARTY_DIR all the wheels and source distributions for
77-
the pip `--requirement-file` requirements FILE(s). Build wheels compatible
78-
with all the provided `--python-version` PYVER(s) and `--operating_system`
82+
the pip ``--requirement-file`` requirements FILE(s). Build wheels compatible
83+
with all the provided ``--python-version`` PYVER(s) and ```--operating_system``
7984
OS(s) defaulting to all supported combinations. Create or fetch .ABOUT and
8085
.LICENSE files.
8186
82-
Sources and wheels are first fetched from PyPI, then our remote repository.
87+
Optionally ignore version specifiers and use the ``--latest-version``
88+
of everything.
89+
90+
Sources and wheels are fetched with attempts first from PyPI, then our remote repository.
8391
If missing wheels are built as needed.
8492
"""
8593
# rename variables for clarity since these are lists
@@ -99,8 +107,9 @@ def bootstrap(
99107
for req_file in requirements_files:
100108
nvs = utils_thirdparty.load_requirements(
101109
requirements_file=req_file, force_pinned=False)
102-
103110
required_name_versions.update(nvs)
111+
if latest_version:
112+
required_name_versions = set((name, None) for name, _ver in required_name_versions)
104113

105114
print(f'PROCESSING {len(required_name_versions)} REQUIREMENTS in {len(requirements_files)} FILES')
106115

etc/release/utils_thirdparty.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2685,12 +2685,20 @@ def get_romp_pyos_options(
26852685
python_versions=PYTHON_VERSIONS,
26862686
operating_systems=PLATFORMS_BY_OS,
26872687
):
2688-
python_dot_versions = ['.'.join(pv) for pv in python_versions]
2689-
pyos_options = sorted(set(itertools.chain.from_iterable(
2690-
('--version', ver) for ver in python_dot_versions)))
2688+
"""
2689+
Return a list of CLI options for romp
2690+
For example:
2691+
>>> expected = ['--version', '3.6', '--version', '3.7', '--version', '3.8',
2692+
... '--version', '3.9', '--platform', 'linux', '--platform', 'macos',
2693+
... '--platform', 'windows']
2694+
>>> assert get_romp_pyos_options() == expected
2695+
"""
2696+
python_dot_versions = ['.'.join(pv) for pv in sorted(set(python_versions))]
2697+
pyos_options = list(itertools.chain.from_iterable(
2698+
('--version', ver) for ver in python_dot_versions))
26912699

2692-
pyos_options += sorted(set(itertools.chain.from_iterable(
2693-
('--platform' , plat) for plat in operating_systems)))
2700+
pyos_options += list(itertools.chain.from_iterable(
2701+
('--platform' , plat) for plat in sorted(set(operating_systems))))
26942702

26952703
return pyos_options
26962704

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1+
Redistribution and use in source and binary forms, with or without modification,
2+
are permitted provided that the following conditions are met:
23

3-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
4+
Redistributions of source code must retain the above copyright notice, this list
5+
of conditions and the following disclaimer.
46

5-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
7+
Redistributions in binary form must reproduce the above copyright notice, this
8+
list of conditions and the following disclaimer in the documentation and/or
9+
other materials provided with the distribution.
610

7-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
12+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
13+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
14+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
15+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
16+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
20+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

etc/thirdparty/virtualenv.pyz

86.7 KB
Binary file not shown.
Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
about_resource: virtualenv.pyz
22
name: get-virtualenv
3-
version: 20.4.2
4-
download_url: https://github.com/pypa/get-virtualenv/raw/20.4.2/public/virtualenv.pyz
3+
version: 20.4.7
4+
download_url: https://github.com/pypa/get-virtualenv/raw/20.4.7/public/virtualenv.pyz
55
description: virtualenv is a tool to create isolated Python environments.
66
homepage_url: https://github.com/pypa/virtualenv
77
license_expression: lgpl-2.1-plus AND (bsd-new OR apache-2.0) AND mit AND python AND bsd-new
@@ -10,26 +10,4 @@ copyright: Copyright (c) The Python Software Foundation and others
1010
redistribute: yes
1111
attribute: yes
1212
track_changes: yes
13-
package_url: pkg:github/pypa/[email protected]#public/virtualenv.pyz
14-
licenses:
15-
- key: apache-2.0
16-
name: Apache License 2.0
17-
file: apache-2.0.LICENSE
18-
- key: mit
19-
name: MIT License
20-
file: mit.LICENSE
21-
- key: bsd-simplified
22-
name: BSD-2-Clause
23-
file: bsd-simplified.LICENSE
24-
- key: bsd-new
25-
name: BSD-3-Clause
26-
file: bsd-new.LICENSE
27-
- key: python
28-
name: Python Software Foundation License v2
29-
file: python.LICENSE
30-
- key: lgpl-2.1-plus
31-
name: GNU Lesser General Public License 2.1 or later
32-
file: lgpl-2.1-plus.LICENSE
33-
- key: isc
34-
name: ISC License
35-
file: isc.LICENSE
13+
package_url: pkg:github/pypa/[email protected]#public/virtualenv.pyz

requirements-dev.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
aboutcode-toolkit==6.0.0
22
apipkg==1.5
3-
codecov==2.1.11
4-
coverage==5.3.1
5-
execnet==1.7.1
3+
coverage==5.5
4+
execnet==1.8.1
65
iniconfig==1.1.1
76
py==1.10.0
8-
pytest==6.2.1
7+
pytest==6.2.4
98
pytest-cov==2.11.1
109
pytest-forked==1.3.0
11-
pytest-rerunfailures==9.1.1
12-
pytest-xdist==2.2.0
10+
pytest-rerunfailures==10.0
11+
pytest-xdist==2.2.1

0 commit comments

Comments
 (0)