Skip to content

Commit 9131627

Browse files
authored
Merge pull request #45 from nexB/release31-prep
Prepare release 31 Signed-off-by: Philippe Ombredanne <[email protected]>
2 parents c31bc0e + d2391f4 commit 9131627

File tree

8 files changed

+117
-69
lines changed

8 files changed

+117
-69
lines changed

CHANGELOG.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@ Release notes
44
Version (next)
55
------------------------------
66

7-
- Add ``posix_only`` option to ``commoncode.paths.portable_filename`` and
8-
``commoncode.paths.safe_path``. This option prevents
9-
``commoncode.paths.portable_filename`` and ``commoncode.paths.safe_path`` from
10-
replacing filenames and punctuation in filenames that are valid on POSIX
11-
operating systems, but not Windows.
127

13-
Version 31.0.0 - (2022-05-16)
8+
Version 31.0.0 - (2022-08-24)
149
------------------------------
1510

1611
This is a major version with API-breaking changes in the resource module.
1712

13+
- Drop support for Python 3.6
14+
1815
- The Resource has no rid (resource id) and no pid (parent id). Instead
1916
we now use internally a simpler mapping of {path: Resource} object.
2017
As a result the iteration on a Codebase is faster but this requires more
@@ -88,6 +85,14 @@ Other changes:
8885
The returned directory has a trailing path separator unless with_trail is False.
8986
The default is True and the default behaviour is unchanged.
9087

88+
- Add ``posix_only`` option to ``commoncode.paths.portable_filename`` and
89+
``commoncode.paths.safe_path``. This option prevents
90+
``commoncode.paths.portable_filename`` and ``commoncode.paths.safe_path`` from
91+
replacing filenames and punctuation in filenames that are valid on POSIX
92+
operating systems, but not Windows.
93+
94+
- Remove unused intbitset dependency.
95+
9196

9297
Version 30.2.0 - (2022-05-02)
9398
------------------------------

azure-pipelines.yml

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
################################################################################
23
# We use Azure to run the full tests suites on multiple Python 3.x
34
# on multiple Windows, macOS and Linux versions all on 64 bits
@@ -6,27 +7,39 @@
67

78
jobs:
89

10+
################################################################################
11+
# These jobs are using VMs and Azure-provided Pythons 3.8
12+
################################################################################
13+
914
- template: etc/ci/azure-posix.yml
1015
parameters:
1116
job_name: ubuntu18_cpython
1217
image_name: ubuntu-18.04
13-
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
18+
python_versions: ['3.7', '3.8', '3.9', '3.10']
1419
test_suites:
1520
all: venv/bin/pytest -n 2 -vvs
1621

1722
- template: etc/ci/azure-posix.yml
1823
parameters:
1924
job_name: ubuntu20_cpython
2025
image_name: ubuntu-20.04
21-
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
26+
python_versions: ['3.7', '3.8', '3.9', '3.10']
27+
test_suites:
28+
all: venv/bin/pytest -n 2 -vvs
29+
30+
- template: etc/ci/azure-posix.yml
31+
parameters:
32+
job_name: ubuntu22_cpython
33+
image_name: ubuntu-22.04
34+
python_versions: ['3.7', '3.8', '3.9', '3.10']
2235
test_suites:
2336
all: venv/bin/pytest -n 2 -vvs
2437

2538
- template: etc/ci/azure-posix.yml
2639
parameters:
2740
job_name: macos1015_cpython
2841
image_name: macos-10.15
29-
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
42+
python_versions: ['3.7', '3.8', '3.9', '3.10']
3043
test_suites:
3144
all: venv/bin/pytest -n 2 -vvs
3245

@@ -38,11 +51,19 @@ jobs:
3851
test_suites:
3952
all: venv/bin/pytest -n 2 -vvs
4053

54+
- template: etc/ci/azure-posix.yml
55+
parameters:
56+
job_name: macos12_cpython
57+
image_name: macos-12
58+
python_versions: ['3.7', '3.8', '3.9', '3.10']
59+
test_suites:
60+
all: venv/bin/pytest -n 2 -vvs
61+
4162
- template: etc/ci/azure-win.yml
4263
parameters:
4364
job_name: win2019_cpython
4465
image_name: windows-2019
45-
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
66+
python_versions: ['3.7', '3.8', '3.9', '3.10']
4667
test_suites:
4768
all: venv\Scripts\pytest -n 2 -vvs
4869

@@ -64,36 +85,42 @@ jobs:
6485
parameters:
6586
job_name: ubuntu20_test_all_supported_click_versions
6687
image_name: ubuntu-20.04
67-
python_versions: ['3.6', '3.7', '3.8', '3.9']
88+
python_versions: ['3.7', '3.8', '3.9', '3.10']
6889
test_suites:
69-
click_versions: for clk_ver in 8.0.1 7.1.2 7.1.1 7.1 6.7; do pip install click==$clk_ver; venv/bin/pytest -vvs tests/test_cliutils_progressbar.py; done
90+
click_versions: |
91+
for clk_ver in 8.1.3 8.1.2 8.1.1 8.1.0 8.0.4 8.0.2 8.0.3 8.0.1 7.1.2 7.1.1 7.1 6.7;
92+
do
93+
pip install click==$clk_ver;
94+
venv/bin/pytest -vvs tests/test_cliutils_progressbar.py;
95+
done
7096
7197
7298
################################################################################
73-
# Test using a plain pip install to get the latest of all wheels
99+
# Tests using a plain pip install to get the latest of all wheels
74100
################################################################################
75101

76102

77103
- template: etc/ci/azure-posix.yml
78104
parameters:
79105
job_name: ubuntu20_cpython_latest_from_pip
80106
image_name: ubuntu-20.04
81-
python_versions: ['3.6', '3.7', '3.8', '3.9']
107+
python_versions: ['3.7', '3.8', '3.9', '3.10']
82108
test_suites:
83-
all: venv/bin/pip install --force-reinstall --upgrade -e . && venv/bin/pytest -n 2 -vvs
109+
all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e . && venv/bin/pytest -n 2 -vvs
110+
84111

85112
- template: etc/ci/azure-win.yml
86113
parameters:
87114
job_name: win2019_cpython_latest_from_pip
88115
image_name: windows-2019
89-
python_versions: ['3.6', '3.7', '3.8', '3.9']
116+
python_versions: ['3.7', '3.8', '3.9', '3.10']
90117
test_suites:
91-
all: venv\Scripts\pip install --force-reinstall --upgrade -e . && venv\Scripts\pytest -n 2 -vvs
118+
all: venv\Scripts\pip install --upgrade-strategy eager --force-reinstall --upgrade -e . && venv\Scripts\pytest -n 2 -vvs
92119

93120
- template: etc/ci/azure-posix.yml
94121
parameters:
95-
job_name: macos1015_cpython_latest_from_pip
96-
image_name: macos-10.15
97-
python_versions: ['3.6', '3.7', '3.8', '3.9']
122+
job_name: macos11_cpython_latest_from_pip
123+
image_name: macos-11
124+
python_versions: ['3.7', '3.8', '3.9', '3.10']
98125
test_suites:
99-
all: venv/bin/pip install --force-reinstall --upgrade -e . && venv/bin/pytest -n 2 -vvs
126+
all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e . && venv/bin/pytest -n 2 -vvs

configure

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,19 @@ CFG_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5252
CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin
5353

5454

55+
################################
56+
# Install with or without and index. With "--no-index" this is using only local wheels
57+
# This is an offline mode with no index and no network operations
58+
# NO_INDEX="--no-index "
59+
NO_INDEX=""
60+
61+
5562
################################
5663
# Thirdparty package locations and index handling
57-
# Find packages from the local thirdparty directory
58-
if [ -d "$CFG_ROOT_DIR/thirdparty" ]; then
59-
PIP_EXTRA_ARGS="--find-links $CFG_ROOT_DIR/thirdparty"
64+
# Find packages from the local thirdparty directory if present
65+
THIRDPARDIR=$CFG_ROOT_DIR/thirdparty
66+
if [[ "$(echo $THIRDPARDIR/*.whl)x" != "$THIRDPARDIR/*.whlx" ]]; then
67+
PIP_EXTRA_ARGS="$NO_INDEX --find-links $THIRDPARDIR"
6068
fi
6169

6270

@@ -182,6 +190,7 @@ while getopts :-: optchar; do
182190
esac
183191
done
184192

193+
185194
PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS"
186195

187196
find_python

etc/scripts/utils_thirdparty.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,6 +1678,7 @@ def get_package_version(self, name, version=None):
16781678
"""
16791679
if not version:
16801680
versions = list(self._get_package_versions_map(name).values())
1681+
# return the latest version
16811682
return versions and versions[-1]
16821683
else:
16831684
return self._get_package_versions_map(name).get(version)

requirements-dev.txt

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
11
aboutcode-toolkit==7.0.2
2-
bleach==4.1.0
2+
black==22.6.0
3+
bleach==5.0.1
34
build==0.7.0
45
commonmark==0.9.1
5-
docutils==0.18.1
6+
docutils==0.19
67
et-xmlfile==1.1.0
78
execnet==1.9.0
89
iniconfig==1.1.1
9-
jeepney==0.7.1
10-
keyring==23.4.1
11-
openpyxl==3.0.9
10+
isort==5.10.1
11+
jeepney==0.8.0
12+
keyring==23.7.0
13+
mypy-extensions==0.4.3
14+
openpyxl==3.0.10
15+
pathspec==0.9.0
1216
pep517==0.12.0
13-
pkginfo==1.8.2
17+
pkginfo==1.8.3
18+
platformdirs==2.5.2
1419
py==1.11.0
15-
pytest==7.0.1
20+
pytest==7.1.2
1621
pytest-forked==1.4.0
1722
pytest-xdist==2.5.0
18-
readme-renderer==34.0
23+
readme-renderer==35.0
1924
requests-toolbelt==0.9.1
20-
rfc3986==1.5.0
21-
rich==12.3.0
25+
rfc3986==2.0.0
26+
rich==12.5.1
2227
secretstorage==3.3.2
23-
tomli==1.2.3
24-
twine==3.8.0
28+
tomli==2.0.1
29+
tqdm==4.64.0
30+
twine==4.0.1
31+
typing_extensions==4.3.0

requirements.txt

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,77 +3,74 @@ banal==1.0.6
33
beautifulsoup4==4.11.1
44
binaryornot==0.4.4
55
boolean.py==4.0
6-
certifi==2021.10.8
7-
cffi==1.15.0
8-
chardet==4.0.0
9-
charset-normalizer==2.0.12
10-
click==8.0.4
11-
colorama==0.4.4
6+
certifi==2022.6.15
7+
cffi==1.15.1
8+
chardet==5.0.0
9+
charset-normalizer==2.1.0
10+
click==8.1.3
11+
colorama==0.4.5
1212
construct==2.10.68
13-
container-inspector==31.0.0
14-
cryptography==36.0.2
15-
debian-inspector==30.0.0
13+
container-inspector==31.1.0
14+
cryptography==37.0.4
15+
debian-inspector==31.0.0b1
1616
dockerfile-parse==1.2.0
1717
dparse2==0.6.1
1818
extractcode==31.0.0
1919
extractcode-7z==16.5.210531
2020
extractcode-libarchive==3.5.1.210531
2121
fasteners==0.17.3
2222
fingerprints==1.0.3
23-
ftfy==6.0.3
23+
ftfy==6.1.1
2424
future==0.18.2
2525
gemfileparser==0.8.0
2626
html5lib==1.1
2727
idna==3.3
28-
importlib-metadata==4.8.3
28+
importlib-metadata==4.12.0
2929
inflection==0.5.1
3030
intbitset==3.0.1
3131
isodate==0.6.1
32-
jaraco.functools==3.4.0
32+
jaraco.functools==3.5.1
3333
javaproperties==0.8.1
34-
Jinja2==3.0.3
34+
Jinja2==3.1.2
3535
jsonstreams==0.6.0
3636
license-expression==30.0.0
37-
lxml==4.8.0
38-
MarkupSafe==2.0.1
37+
lxml==4.9.1
38+
MarkupSafe==2.1.1
3939
more-itertools==8.13.0
4040
normality==2.3.3
41-
packagedcode-msitools==0.101.210706
42-
packageurl-python==0.9.9
41+
packageurl-python==0.10.0
4342
packaging==21.3
4443
parameter-expansion-patched==0.3.1
45-
patch==1.16
46-
pdfminer-six==20220506
47-
pefile==2021.9.3
44+
pdfminer.six==20220524
45+
pefile==2022.5.30
4846
pip-requirements-parser==31.2.0
4947
pkginfo2==30.0.0
5048
pluggy==1.0.0
51-
plugincode==30.0.0
49+
plugincode==31.0.0b1
5250
ply==3.11
5351
publicsuffix2==2.20191221
5452
pyahocorasick==2.0.0b1
5553
pycparser==2.21
5654
pygmars==0.7.0
5755
Pygments==2.12.0
5856
pymaven-patch==0.3.0
59-
pyparsing==3.0.8
57+
pyparsing==3.0.9
6058
pytz==2022.1
6159
PyYAML==6.0
62-
rdflib==5.0.0
63-
regipy==2.3.1
64-
requests==2.27.1
65-
rpm-inspector-rpm==4.16.1.3.210404
60+
rdflib==6.2.0
61+
requests==2.28.1
6662
saneyaml==0.5.2
6763
six==1.16.0
68-
soupsieve==2.3.1
64+
soupsieve==2.3.2.post1
6965
spdx-tools==0.7.0a3
7066
text-unidecode==1.3
7167
toml==0.10.2
7268
typecode==30.0.0
7369
typecode-libmagic==5.39.210531
74-
urllib3==1.26.9
70+
typing-extensions==4.3.0
71+
urllib3==1.26.11
7572
urlpy==0.5
7673
wcwidth==0.2.5
7774
webencodings==0.5.1
78-
xmltodict==0.12.0
79-
zipp==3.6.0
75+
xmltodict==0.13.0
76+
zipp==3.8.1

setup.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,15 @@ packages = find:
3535
include_package_data = true
3636
zip_safe = false
3737

38-
python_requires = >=3.6
38+
python_requires = >=3.7
3939

4040
install_requires =
4141
attrs >= 18.1, !=20.1.0
4242
Beautifulsoup4 >= 4.0.0
4343
click >= 6.7, !=7.0
44-
intbitset >= 2.3.0
4544
requests >= 2.7.0
4645
saneyaml >= 0.5.2
4746
text_unidecode >= 1.0
48-
typing >=3.6, < 3.7; python_version < "3.7"
4947

5048

5149
[options.packages.find]

src/commoncode/resource.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ def __init__(
267267
268268
``max_depth`` is the maximum depth of subdirectories to descend below and
269269
including `location`.
270+
271+
``paths`` is an optional list of of path strings that extend from the
272+
root ``location``. If provided, the codebase will contain only these
273+
paths.
270274
"""
271275
self.max_depth = max_depth
272276

0 commit comments

Comments
 (0)