Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: drop 3.6 support #1661

Merged
merged 18 commits into from
Sep 3, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
- '3.9'
- '3.8'
- '3.7'
- '3.6'

python-architecture:
- x64
Expand Down Expand Up @@ -91,7 +90,6 @@ jobs:
- '3.9'
- '3.8'
- '3.7'
- '3.6'

runs-on: macOS-11

Expand Down Expand Up @@ -148,11 +146,11 @@ jobs:
- '3.9'
- '3.8'
- '3.7'
- '3.6'

numpy-package:
- "numpy"
include:
- python-version: '3.6'
numpy-version: 1.13.1
- python-version: '3.7'
numpy-package: "oldest-supported-numpy"

runs-on: ubuntu-20.04

Expand All @@ -170,7 +168,7 @@ jobs:
with:
key: >-
${{ github.job
}}-${{matrix.python-version}}-${{matrix.numpy-version}}
}}-${{matrix.python-version}}-${{matrix.numpy-package}}

- name: Use ccache
run: |
Expand All @@ -183,12 +181,7 @@ jobs:
python-version: '${{ matrix.python-version }}'

- name: Install NumPy
run: |
if [[ -z "${NUMPY_VERSION}" ]]; then
python -m pip install numpy;
else
python -m pip install "numpy==${NUMPY_VERSION}";
fi
run: python -m pip install "${{ matrix.numpy-package }}"

- name: Build
run: 'python -m pip install -v .[test,dev]'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
- uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: universal2
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
CIBW_BUILD: cp39-win_amd64 cp36-manylinux_x86_64 cp38-macosx_universal2
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
agoose77 marked this conversation as resolved.
Show resolved Hide resolved
CIBW_BUILD: cp39-win_amd64 cp37-manylinux_x86_64 cp38-macosx_universal2

- uses: pypa/[email protected]
if: matrix.os == 'ubuntu-latest'
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ jobs:
build: ["cp*", "pp*"]

include:
- os: ubuntu-latest
type: ManyLinux1
arch: auto64
build: "cp{36,37,38}-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1

- os: macos-latest
type: "Universal"
arch: universal2
Expand All @@ -51,7 +45,7 @@ jobs:

- os: windows-latest
arch: auto32
build: "cp{36,37,38,39}-*"
build: "cp{37,38,39}-*"


steps:
Expand All @@ -62,8 +56,8 @@ jobs:
- uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.build }}
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.CIBW_MANYLINUX_X86_64_IMAGE }}
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
agoose77 marked this conversation as resolved.
Show resolved Hide resolved

- name: Upload wheels
uses: actions/upload-artifact@v3
Expand All @@ -76,7 +70,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [36, 37, 38, 39, 310, 311]
python: [37, 38, 39, 310, 311]
arch: [aarch64]
steps:

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ Templating is only used for integer specialization.

### Python standard

We target Python 3.6 and above. Import statements can assume Python 3 names, string-checking can assume Python 3 meanings of `str` and `bytes`, Unicode literals don't need to be prefixed by `u`, and dict order can be assumed to be stable. Python's f-strings can now be used, but not with equals signs (e.g. `f"{something = }"` rather than `f"something = {something}"`) because that's a Python 3.8 feature (its main use is in debugging, anyway).
We target Python 3.7 and above. Import statements can assume Python 3 names, string-checking can assume Python 3 meanings of `str` and `bytes`, Unicode literals don't need to be prefixed by `u`, and dict order can be assumed to be stable. Python's f-strings can now be used, but not with equals signs (e.g. `f"{something = }"` rather than `f"something = {something}"`) because that's a Python 3.8 feature (its main use is in debugging, anyway).

If you see any outdated (pre-Python 3.6) code, you can safely clean them up. Some strings are not easier to read as f-strings or require some work to make them more readable; it should be a case-by-case basis.
If you see any outdated (pre-Python 3.7) code, you can safely clean them up. Some strings are not easier to read as f-strings or require some work to make them more readable; it should be a case-by-case basis.

Python 3.6 will be the standard until it becomes "painful" to keep it (like, when CI and build tools no longer support it, or if we adopt type annotations).
Python 3.7 will be the standard until it becomes "painful" to keep it (like, when CI and build tools no longer support it, or if we adopt type annotations).
jpivarski marked this conversation as resolved.
Show resolved Hide resolved

### Third party dependencies

Expand Down
2 changes: 1 addition & 1 deletion README-pypi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![PyPI version](https://badge.fury.io/py/awkward.svg)](https://pypi.org/project/awkward)
[![Conda-Forge](https://img.shields.io/conda/vn/conda-forge/awkward)](https://github.com/conda-forge/awkward-feedstock)
[![Python 3.6‒3.10](https://img.shields.io/badge/python-3.6%E2%80%923.10-blue)](https://www.python.org)
[![Python 3.7‒3.10](https://img.shields.io/badge/python-3.7%E2%80%923.10-blue)](https://www.python.org)
agoose77 marked this conversation as resolved.
Show resolved Hide resolved
[![BSD-3 Clause License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Continuous integration tests](https://img.shields.io/azure-devops/build/jpivarski/Scikit-HEP/3/main?label=tests)](https://dev.azure.com/jpivarski/Scikit-HEP/_build)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![PyPI version](https://badge.fury.io/py/awkward.svg)](https://pypi.org/project/awkward)
[![Conda-Forge](https://img.shields.io/conda/vn/conda-forge/awkward)](https://github.com/conda-forge/awkward-feedstock)
[![Python 3.6‒3.10](https://img.shields.io/badge/python-3.6%E2%80%923.10-blue)](https://www.python.org)
[![Python 3.7‒3.10](https://img.shields.io/badge/python-3.7%E2%80%923.10-blue)](https://www.python.org)
[![BSD-3 Clause License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Build Test](https://github.com/scikit-hep/awkward/actions/workflows/build-test.yml/badge.svg?branch=main)](https://github.com/scikit-hep/awkward/actions/workflows/build-test.yml)

Expand Down
4 changes: 2 additions & 2 deletions docs-sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
:alt: Conda-Forge
:target: https://github.com/conda-forge/awkward-feedstock

.. image:: https://img.shields.io/badge/python-3.6%E2%80%923.10-blue
:alt: Python 3.6‒3.10
.. image:: https://img.shields.io/badge/python-3.7%E2%80%923.10-blue
:alt: Python 3.7‒3.10
:target: https://www.python.org

.. image:: https://img.shields.io/badge/license-BSD%203--Clause-blue.svg
Expand Down
2 changes: 1 addition & 1 deletion docs-src/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kernelspec:

[![PyPI version](https://badge.fury.io/py/awkward.svg)](https://pypi.org/project/awkward)
[![Conda-Forge](https://img.shields.io/conda/vn/conda-forge/awkward)](https://github.com/conda-forge/awkward-feedstock)
[![Python 3.6‒3.10](https://img.shields.io/badge/python-3.6%E2%80%923.10-blue)](https://www.python.org)
[![Python 3.7‒3.10](https://img.shields.io/badge/python-3.7%E2%80%923.10-blue)](https://www.python.org)
[![BSD-3 Clause License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Continuous integration tests](https://img.shields.io/azure-devops/build/jpivarski/Scikit-HEP/3/main?label=tests)](https://dev.azure.com/jpivarski/Scikit-HEP/_build)

Expand Down
4 changes: 2 additions & 2 deletions docs-src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ matplotlib
uproot
uproot3
jupyter-book
jax>=0.2.7;python_version>="3.6" and sys_platform != "win32"
jaxlib>=0.1.57;python_version>="3.6" and sys_platform != "win32"
jax>=0.2.7;sys_platform != "win32"
jaxlib>=0.1.57;sys_platform != "win32"
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nox

ALL_PYTHONS = ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
ALL_PYTHONS = ["3.7", "3.8", "3.9", "3.10", "3.11"]

nox.options.sessions = ["lint", "tests"]

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PIP_ONLY_BINARY = "cmake,numpy"

[[tool.cibuildwheel.overrides]]
select = "cp3?-*"
manylinux-x86_64-image = "manylinux2010"
manylinux-x86_64-image = "manylinux2014"


[tool.pytest.ini_options]
Expand All @@ -79,7 +79,7 @@ filterwarnings = [
log_cli_level = "info"

[tool.pylint]
master.py-version = "3.6"
master.py-version = "3.7"
master.jobs = "0"
master.ignore-paths = [
"src/awkward/_typeparser/generated_parser.py"
Expand Down
8 changes: 4 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
autograd
flake8
fsspec;python_version > "3.6" and sys_platform != "win32"
jax>=0.2.7;sys_platform != "win32" and python_version > "3.6" and python_version < "3.11"
jaxlib>=0.1.57,!=0.1.68;sys_platform != "win32" and python_version > "3.6" and python_version < "3.11"
fsspec;sys_platform != "win32"
jax>=0.2.7;sys_platform != "win32" and python_version < "3.11"
jaxlib>=0.1.57,!=0.1.68;sys_platform != "win32" and python_version < "3.11"
numba>=0.50.0;python_version < "3.11"
numexpr;python_version < "3.11"
pandas>=0.24.0
pyarrow>=7.0.0;python_version > "3.6" and sys_platform != "win32" and python_version < "3.11"
pyarrow>=7.0.0;sys_platform != "win32" and python_version < "3.11"
PyYAML
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Expand All @@ -46,7 +45,7 @@ project_urls =

[options]
packages = find:
python_requires = >=3.6
python_requires = >=3.7
include_package_data = True
package_dir =
=src
Expand Down
8 changes: 0 additions & 8 deletions src/awkward/_v2/_connect/jax/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE

import awkward as ak
import sys

try:
import jax
Expand Down Expand Up @@ -55,13 +54,6 @@ def import_jax(name="Awkward Arrays with JAX"):
if jax is None:
raise ak._v2._util.error(ModuleNotFoundError(error_message.format(name)))

if not (sys.version_info.major == 3 and sys.version_info.minor >= 7):
raise ak._v2._util.error(
AssertionError(
"Using Awkward Arrays with JAX requires Python version >= 3.7"
)
)

global pytrees_registered

if not pytrees_registered:
Expand Down