diff --git a/.github/workflows/scancode-release.yml b/.github/workflows/scancode-release.yml index 80506189fc6..995ff43e38d 100644 --- a/.github/workflows/scancode-release.yml +++ b/.github/workflows/scancode-release.yml @@ -5,7 +5,7 @@ name: Create ScanCode release archives, then test and publish to GH and PyPI # Summary of the steps: # - Build wheel and sdist for the "main" scancode, then build these for the "mini" flavor # - test each wheel and sdist on every possible OS x Python version combinations - # - Build release app archives, one for each of linux, windows, macos on Python 3.8 + # - Build release app archives, one for each of linux, windows, macos on Python 3.9 to 3.12 # - test each on its target OS and Python version # - Create gh-release and upload app archives to release # - Upload all wheels and sdist to PyPI @@ -34,10 +34,10 @@ jobs: strategy: fail-fast: true matrix: - pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"] + pyver: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Python on ${{ matrix.pyver }} uses: actions/setup-python@v4 @@ -69,7 +69,7 @@ jobs: fail-fast: true steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 @@ -100,10 +100,11 @@ jobs: strategy: fail-fast: true matrix: - pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"] + pyver: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 + - run: git fetch --prune --unshallow - name: Set up Python on ${{ matrix.pyver }} uses: actions/setup-python@v4 @@ -134,10 +135,11 @@ jobs: strategy: fail-fast: true matrix: - pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"] + pyver: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 + - run: git fetch --prune --unshallow - name: Set up Python on ${{ matrix.pyver }} uses: actions/setup-python@v4 @@ -168,10 +170,11 @@ jobs: strategy: fail-fast: true matrix: - pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"] + pyver: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 + - run: git fetch --prune --unshallow - name: Set up Python on ${{ matrix.pyver }} uses: actions/setup-python@v4 @@ -202,7 +205,8 @@ jobs: fail-fast: true steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 + - run: git fetch --prune --unshallow - name: Set up Python uses: actions/setup-python@v4 @@ -235,11 +239,11 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-22.04, ubuntu-22.04, macos-12, macos-13] - pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"] + os: [ubuntu-22.04, ubuntu-24.04, macos-12, macos-13] + pyver: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.pyver }} on ${{ matrix.os }} uses: actions/setup-python@v4 @@ -282,10 +286,10 @@ jobs: fail-fast: true matrix: os: [windows-2019, windows-2022] - pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"] + pyver: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.pyver }} on ${{ matrix.os }} uses: actions/setup-python@v4 @@ -326,11 +330,11 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-22.04, ubuntu-22.04] - pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"] + os: [ubuntu-22.04, ubuntu-24.04] + pyver: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.pyver }} on ${{ matrix.os }} uses: actions/setup-python@v4 @@ -368,10 +372,10 @@ jobs: fail-fast: true matrix: os: [macos-12, macos-13] - pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"] + pyver: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.pyver }} on ${{ matrix.os }} uses: actions/setup-python@v4 @@ -409,10 +413,10 @@ jobs: fail-fast: true matrix: os: [windows-2019, windows-2022] - pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"] + pyver: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.pyver }} on ${{ matrix.os }} uses: actions/setup-python@v4 @@ -457,12 +461,6 @@ jobs: name: source_app path: dist - - name: Download a single artifact macos_app for python 3.8 - uses: actions/download-artifact@v3 - with: - name: macos_app_py_3.8 - path: dist - - name: Download a single artifact macos_app for python 3.9 uses: actions/download-artifact@v3 with: @@ -487,12 +485,6 @@ jobs: name: macos_app_py_3.12 path: dist - - name: Download a single artifact linux_app for python 3.8 - uses: actions/download-artifact@v3 - with: - name: linux_app_py_3.8 - path: dist - - name: Download a single artifact linux_app for python 3.9 uses: actions/download-artifact@v3 with: @@ -517,12 +509,6 @@ jobs: name: linux_app_py_3.12 path: dist - - name: Download a single artifact windows_app for python 3.8 - uses: actions/download-artifact@v3 - with: - name: windows_app_py_3.8 - path: dist - - name: Download a single artifact windows_app for python 3.9 uses: actions/download-artifact@v3 with: @@ -573,13 +559,13 @@ jobs: strategy: fail-fast: true matrix: - dist_names: ["wheels-3.8", "wheels-3.9", "wheels-3.10", "wheels-3.11", "wheels-3.12", sdists] + dist_names: ["wheels-3.9", "wheels-3.10", "wheels-3.11", "wheels-3.12", sdists] steps: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.9 - name: Download a single artifact uses: actions/download-artifact@v3 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 921762fd424..ec6546f4d41 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -37,6 +37,9 @@ v33.0.0 (next next, roadmap) of these in other summary plugins. See https://github.com/nexB/scancode-toolkit/issues/1745 +v32.3.0 - 2024-10-21 +-------------------- + Major API/other changes: - Output Format Version updated to 4.0.0 (major version bump) @@ -74,6 +77,15 @@ Changes in Output Data Structure: - Fix Python ``SyntaxWarning`` in textcode module. +- Improve python, npm, yarn, go package detections: + https://github.com/aboutcode-org/scancode-toolkit/pull/3857 + https://github.com/aboutcode-org/scancode-toolkit/pull/3869 + https://github.com/aboutcode-org/scancode-toolkit/pull/3943 + https://github.com/aboutcode-org/scancode-toolkit/pull/3894 + +- Drop python 3.8 support as this is end of life. Please use older releases if you + are using python 3.8 but this is not recommended. + v32.2.1 - 2024-07-02 --------------------- diff --git a/INSTALL.rst b/INSTALL.rst index e3b8ab1f415..9e34a869e20 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -16,9 +16,9 @@ Prerequisites ------------- Before installing ScanCode make sure you have installed these prerequisites. -The main one is to have Python installed version 3.8, 3.9, 3.10, 3.11 or 3.12 +The main one is to have Python installed version 3.9, 3.10, 3.11 or 3.12 -- For Linux(Ubuntu): ``sudo apt install python3.8-dev bzip2 xz-utils zlib1g libxml2-dev libxslt1-dev`` +- For Linux(Ubuntu): ``sudo apt install python3.9-dev bzip2 xz-utils zlib1g libxml2-dev libxslt1-dev`` - For MacOS: Install Python 3.x from https://www.python.org/ - For Windows: Install Python 3.x from https://www.python.org/ using the 64 bits amd64 variant - For FreeBSD: (this needs to be documented) diff --git a/README.rst b/README.rst index 1860d46b490..b660c05473b 100644 --- a/README.rst +++ b/README.rst @@ -139,15 +139,15 @@ Installation ============ Before installing ScanCode make sure that you have installed the prerequisites -properly. This means installing Python 3.8 for x86/64 architectures. -We support Python 3.8, 3.9, 3.10, 3.11 and 3.12. +properly. This means installing Python 3.9 for x86/64 architectures. +We support Python 3.9, 3.10, 3.11 and 3.12. See `prerequisites `_ for detailed information on the support platforms and Python versions. There are a few common ways to `install ScanCode `_. -- `**Installation as an application: Install Python 3.8, download a release archive, extract and run**. +- `**Installation as an application: Install Python 3.9, download a release archive, extract and run**. `_ This is the recommended installation method. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 65bf09d0411..d6348b0d529 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.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] 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.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] 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.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] 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.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py --reruns 2 @@ -157,7 +157,7 @@ jobs: parameters: job_name: win2019_cpython_1 image_name: windows-2019 - python_versions: ['3.8'] + python_versions: ['3.9'] python_architecture: x64 test_suites: all: venv\Scripts\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.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: all: venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py --reruns 2 @@ -175,7 +175,7 @@ jobs: parameters: job_name: win2022_cpython_1 image_name: windows-2022 - python_versions: ['3.8'] + python_versions: ['3.9'] python_architecture: x64 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.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] python_architecture: x64 test_suites: all: venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py --reruns 2 @@ -199,7 +199,7 @@ jobs: parameters: job_name: ubuntu20_test_all_supported_click_versions image_name: ubuntu-20.04 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] python_architecture: x64 test_suites: click_versions: | @@ -219,7 +219,7 @@ jobs: parameters: job_name: ubuntu22_cpython_latest_from_pip image_name: ubuntu-22.04 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] 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,7 +227,7 @@ jobs: parameters: job_name: ubuntu20_cpython_latest_from_pip image_name: ubuntu-20.04 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] 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 @@ -235,7 +235,7 @@ jobs: parameters: job_name: macos12_cpython_latest_from_pip image_name: macos-12 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] 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.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] 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.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] 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.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] 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/docs/source/contribute/contrib_dev.rst b/docs/source/contribute/contrib_dev.rst index af9b010e5dd..1f6c1f94dee 100644 --- a/docs/source/contribute/contrib_dev.rst +++ b/docs/source/contribute/contrib_dev.rst @@ -186,7 +186,7 @@ recursive dependencies. There are utility scripts in ``etc/release`` that can help with the dependencies management process in particular to build or update wheels with native code for -multiple OSes (Linux, macOS and Windows) and multiple Python versions (3.8+), +multiple OSes (Linux, macOS and Windows) and multiple Python versions (3.9+), which is not a completely simple operation (and requires eventually 12 wheels and one source distribution to be published as we support 3 OSes and 5 Python versions). diff --git a/docs/source/getting-started/install.rst b/docs/source/getting-started/install.rst index a91cdd23e36..14620c77525 100644 --- a/docs/source/getting-started/install.rst +++ b/docs/source/getting-started/install.rst @@ -44,7 +44,7 @@ For advanced usage and experienced users, you can also use any of these mode: Before Installing ----------------- -- ScanCode requires a Python version between 3.8 to 3.12 and is +- ScanCode requires a Python version between 3.9 to 3.12 and is tested on Linux, macOS, and Windows. It should work fine on FreeBSD. .. _system_requirements: @@ -71,8 +71,8 @@ System Requirements Prerequisites ^^^^^^^^^^^^^ -ScanCode needs a Python 3.8+ interpreter; We support all Python versions from -3.8 to 3.12. The default version for the application archives is Python 3.8 +ScanCode needs a Python 3.9+ interpreter; We support all Python versions from +3.9 to 3.12. The default version for the application archives is Python 3.9 - **On Linux**: @@ -90,11 +90,11 @@ ScanCode needs a Python 3.8+ interpreter; We support all Python versions from - On RPM-based distros run:: - sudo yum install python3.8-devel zlib bzip2-libs xz-libs libxml2-devel libxslt-devel libpopt0 + sudo yum install python3.9-devel zlib bzip2-libs xz-libs libxml2-devel libxslt-devel libpopt0 - On Fedora 22 and later run:: - sudo dnf install python3.8-devel xz-libs zlib libxml2-devel libxslt-devel bzip2-libs libpopt0 + sudo dnf install python3.9-devel xz-libs zlib libxml2-devel libxslt-devel bzip2-libs libpopt0 If these packages are not available from your package manager, you must @@ -103,13 +103,13 @@ ScanCode needs a Python 3.8+ interpreter; We support all Python versions from - **On Mac**: - The default Python 3 provided with macOS is 3.8. - Alternatively you can download and install Python 3.8 from https://www.python.org/ + The default Python 3 provided with macOS is 3.9. + Alternatively you can download and install Python 3.9 from https://www.python.org/ - **On Windows**: - Download and install Python 3.8 from https://www.python.org/ + Download and install Python 3.9 from https://www.python.org/ .. Note:: @@ -136,7 +136,7 @@ under assets options. ScanCode app archives come with packaged with all required dependencies except for Python that has to be downloaded and installed separately. - On more recent versions of Ubuntu, you will have to install Python 3.8 manually. + On more recent versions of Ubuntu, you will have to install Python 3.9 manually. One possibility is to use the Deadsnakes PPA (Personal Package Archive) which is a project that provides older Python version builds for Debian and Ubuntu and is available at https://github.com/deadsnakes/ and https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa @@ -144,7 +144,7 @@ under assets options. sudo apt-get update && sudo apt-get upgrade sudo add-apt-repository ppa:deadsnakes/ppa --yes - sudo apt-get install python3.8 python3.8-distutils + sudo apt-get install python3.9 python3.9-distutils Installation on Linux and Mac diff --git a/requirements.txt b/requirements.txt index bc1db1fa341..38dfdc65b7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,7 +31,7 @@ importlib-metadata==4.12.0 inflection==0.5.1 intbitset==3.1.0 isodate==0.6.1 -jaraco.functools==3.5.1 +jaraco.functools==4.1.0 javaproperties==0.8.1 Jinja2==3.1.3 jsonstreams==0.6.0 @@ -41,7 +41,7 @@ MarkupSafe==2.1.5 more-itertools==8.13.0 normality==2.3.3 packageurl-python==0.15.0 -packaging==21.3 +packaging==24.1 packvers==21.5 parameter-expansion-patched==0.3.1 pdfminer.six==20220524 diff --git a/setup-mini.cfg b/setup-mini.cfg index 0465d2e581a..e435bd76c75 100644 --- a/setup-mini.cfg +++ b/setup-mini.cfg @@ -1,6 +1,6 @@ [metadata] name = scancode-toolkit-mini -version = 32.2.1 +version = 32.3.0 license = Apache-2.0 AND CC-BY-4.0 AND LicenseRef-scancode-other-permissive AND LicenseRef-scancode-other-copyleft # description must be on ONE line https://github.com/pypa/setuptools/issues/1390 @@ -17,7 +17,6 @@ classifiers = Intended Audience :: Developers Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 @@ -60,7 +59,7 @@ zip_safe = false py_modules = scancode_config -python_requires = >=3.8 +python_requires = >=3.9 install_requires = attrs >= 18.1,!=20.1.0;python_version<'3.11' diff --git a/setup.cfg b/setup.cfg index 4174b422cdd..b73f1d931db 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = scancode-toolkit -version = 32.2.1 +version = 32.3.0 license = Apache-2.0 AND CC-BY-4.0 AND LicenseRef-scancode-other-permissive AND LicenseRef-scancode-other-copyleft # description must be on ONE line https://github.com/pypa/setuptools/issues/1390 @@ -17,7 +17,6 @@ classifiers = Intended Audience :: Developers Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 @@ -60,7 +59,7 @@ zip_safe = false py_modules = scancode_config -python_requires = >=3.8 +python_requires = >=3.9 install_requires = attrs >= 18.1,!=20.1.0;python_version<'3.11' diff --git a/src/scancode_config.py b/src/scancode_config.py index 5c5e27ef04b..fe146456ef2 100644 --- a/src/scancode_config.py +++ b/src/scancode_config.py @@ -132,12 +132,12 @@ def _create_dir(location): # 4. hardcoded This is the default, fallback version in case package is not installed or we # do not have a proper version otherwise. if not __version__: - __version__ = '32.2.1' + __version__ = '32.3.0' ####################### # used to warn user when the version is out of date # this is (year, month, day) -__release_date__ = datetime.datetime(2024, 7, 2) +__release_date__ = datetime.datetime(2024, 10, 21) # See https://github.com/nexB/scancode-toolkit/issues/2653 for more information # on the data format version diff --git a/tests/packagedcode/data/pypi/requirements_txt/invalid_spec/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/invalid_spec/output.expected.json index 1ce72156d8f..9de4315d61e 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/invalid_spec/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/invalid_spec/output.expected.json @@ -36,30 +36,7 @@ "is_private": false, "is_virtual": false, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:pypi/test", - "extracted_requirement": "test>>1.2.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_pinned": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": { - "is_editable": false, - "link": null, - "hash_options": [], - "is_constraint": false, - "is_archive": null, - "is_wheel": false, - "is_url": null, - "is_vcs_url": null, - "is_name_at_url": false, - "is_local_path": null - } - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null,