diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ec6546f4d4..28016f16d3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -37,6 +37,8 @@ v33.0.0 (next next, roadmap) of these in other summary plugins. See https://github.com/nexB/scancode-toolkit/issues/1745 +- Update intbitset and related dependencies for Python 3.13.0 support. + v32.3.0 - 2024-10-21 -------------------- diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d6348b0d52..8d8e4d9f65 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -123,7 +123,7 @@ jobs: job_name: ubuntu20_cpython image_name: ubuntu-20.04 python_architecture: x64 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py --reruns 2 @@ -132,7 +132,7 @@ jobs: job_name: ubuntu22_cpython image_name: ubuntu-22.04 python_architecture: x64 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py --reruns 2 @@ -140,7 +140,7 @@ jobs: parameters: job_name: macos12_cpython image_name: macOS-12 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] python_architecture: x64 test_suites: all: venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py --reruns 2 @@ -149,7 +149,7 @@ jobs: parameters: job_name: macos13_cpython image_name: macOS-13 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py --reruns 2 @@ -167,7 +167,7 @@ jobs: job_name: win2022_cpython image_name: windows-2022 python_architecture: x64 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py --reruns 2 @@ -184,7 +184,7 @@ jobs: parameters: job_name: win2022_cpython_2 image_name: windows-2022 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] python_architecture: x64 test_suites: all: venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py --reruns 2 @@ -199,15 +199,15 @@ jobs: parameters: job_name: ubuntu20_test_all_supported_click_versions image_name: ubuntu-20.04 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] python_architecture: x64 test_suites: click_versions: | - for clk_ver in 8.1.3 8.1.2 8.1.1 8.1.0 8.0.4 8.0.3 8.0.2 8.0.1 7.1.2 7.1.1 7.1 6.7; + for clk_ver in 8.1.3 8.1.2 8.1.1 8.1.0 8.0.4 8.0.3 8.0.2 8.0.1 7.1.2 7.1.1 7.1 6.7; do venv/bin/pip install click==$clk_ver; - venv/bin/scancode -i samples/ -n3 --json foo.json; - venv/bin/scancode -i --verbose samples/ -n3 --json foo.json; + venv/bin/scancode -i samples/ -n3 --json foo.json; + venv/bin/scancode -i --verbose samples/ -n3 --json foo.json; done @@ -219,7 +219,7 @@ jobs: parameters: job_name: ubuntu22_cpython_latest_from_pip image_name: ubuntu-22.04 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py @@ -227,15 +227,15 @@ jobs: parameters: job_name: ubuntu20_cpython_latest_from_pip image_name: ubuntu-20.04 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py - + - template: etc/ci/azure-posix.yml parameters: job_name: macos12_cpython_latest_from_pip image_name: macos-12 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py @@ -243,7 +243,7 @@ jobs: parameters: job_name: macos13_cpython_latest_from_pip image_name: macos-13 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py @@ -251,7 +251,7 @@ jobs: parameters: job_name: win2019_cpython_latest_from_pip image_name: windows-2019 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv\Scripts\pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py @@ -259,7 +259,7 @@ jobs: parameters: job_name: win2022_cpython_latest_from_pip image_name: windows-2022 - python_versions: ['3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv\Scripts\pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py diff --git a/requirements-dev.txt b/requirements-dev.txt index 6b74f9fc1c..5b406bd555 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ aboutcode-toolkit==7.0.2 black==22.6.0 bleach==5.0.1 -build==0.7.0 +build==1.2.2.post1 commonmark==0.9.1 docutils==0.19 et-xmlfile==1.1.0 diff --git a/requirements-native.txt b/requirements-native.txt index f1f2b09b80..672f0b1bd7 100644 --- a/requirements-native.txt +++ b/requirements-native.txt @@ -1,6 +1,6 @@ -cffi==1.16.0 +cffi==1.17.1 intbitset==3.1.0 -lxml==5.1.0 +lxml==5.3.0 MarkupSafe==2.1.5 pyahocorasick==2.1.0 PyYAML==6.0.1 diff --git a/requirements.txt b/requirements.txt index 38dfdc65b7..2693136707 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ binaryornot==0.4.4 beartype==0.17.2 boolean.py==4.0 certifi==2024.2.2 -cffi==1.16.0 +cffi==1.17.1 chardet==5.0.0 charset-normalizer==2.1.0 click==8.1.7 @@ -29,15 +29,15 @@ html5lib==1.1 idna==3.3 importlib-metadata==4.12.0 inflection==0.5.1 -intbitset==3.1.0 +intbitset==4.0.0 isodate==0.6.1 jaraco.functools==4.1.0 javaproperties==0.8.1 Jinja2==3.1.3 jsonstreams==0.6.0 license-expression==30.3.0 -lxml==5.1.0 -MarkupSafe==2.1.5 +lxml==5.3.0 +MarkupSafe==3.0.2 more-itertools==8.13.0 normality==2.3.3 packageurl-python==0.15.0 diff --git a/setup.cfg b/setup.cfg index b73f1d931d..9ac458f144 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,6 +21,7 @@ classifiers = Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 Topic :: Software Development Topic :: Utilities @@ -79,13 +80,13 @@ install_requires = gemfileparser2 >= 0.9.0 html5lib importlib_metadata - intbitset >= 3.0.2 + intbitset >= 4.0.0 jaraco.functools javaproperties >= 0.5 jinja2 >= 2.7.0 jsonstreams >= 0.5.0 license_expression >= 30.1.1 - lxml >= 4.9.2 + lxml >= 5.3.0 MarkupSafe >= 2.1.2 packageurl_python >= 0.9.0 packvers >= 21.0.0 diff --git a/src/licensedcode/tokenize.py b/src/licensedcode/tokenize.py index 9ac885941d..fdcc06fb45 100644 --- a/src/licensedcode/tokenize.py +++ b/src/licensedcode/tokenize.py @@ -336,6 +336,7 @@ def select_ngrams(ngrams, with_pos=False): >>> list(select_ngrams(x for x in [(2, 1, 3), (1, 1, 3), (5, 1, 3), (2, 6, 1), (7, 3, 4)])) [(2, 1, 3), (1, 1, 3), (5, 1, 3), (2, 6, 1), (7, 3, 4)] """ + ngram = None last = None for pos, ngram in enumerate(ngrams): # FIXME: use a proper hash