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: Remove py37 support, and unify compatibility matrix from 3.8-3.9 #2226

Merged
merged 7 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/common_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.7.x"]
python-version: ['3.8.x', '3.9.x']
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/databuilder_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.7.x"]
python-version: ['3.8.x', '3.9.x']
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup python 3.7
- name: Setup python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.8
- name: Add wheel dependency
run: pip install wheel
- name: Generate dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.7.x", "3.8.x"]
python-version: ['3.8.x', '3.9.x']
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/metadata_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.7.x"]
python-version: ['3.8.x', '3.9.x']
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/monthly_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.8
- name: Checkout master
uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/noop_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6.x", "3.7.x", "3.8.x"]
python-version: ['3.8.x', '3.9.x']
steps:
- name: Do nothing
run: exit 0
2 changes: 1 addition & 1 deletion .github/workflows/search_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.7.x"]
python-version: ['3.8.x', '3.9.x']
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.frontend.local
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN npm run dev-build

COPY ./frontend /app

FROM python:3.7-slim
FROM python:3.8-slim
WORKDIR /app

COPY ./frontend /app
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.frontend.public
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN npm install
COPY ./frontend/amundsen_application/static /app/amundsen_application/static
RUN npm run build

FROM python:3.7-slim as base
FROM python:3.8-slim as base
WORKDIR /app
RUN pip3 install gunicorn

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.metadata.public
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-slim as base
FROM python:3.8-slim as base
WORKDIR /app
RUN pip3 install gunicorn

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.search.public
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-slim
FROM python:3.8-slim
WORKDIR /app
RUN pip3 install gunicorn

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ We want your input about what is important, for that, add your votes using the
* [Top Questions](https://github.com/amundsen-io/amundsen/issues?q=is%3Aissue+is%3Aclosed+sort%3Areactions-%2B1-desc+label%3Atype%3Aquestion+label%3Astatus%3Aneeds_votes)

## Requirements
- Python 3.7
- Python >= 3.8
- Node v12

## User Interface
Expand Down
2 changes: 1 addition & 1 deletion common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Amundsen Common library holds common codes among micro services in Amundsen.
For information about Amundsen and our other services, visit the [main repository](https://github.com/amundsen-io/amundsen). Please also see our instructions for a [quick start](https://github.com/amundsen-io/amundsen/blob/master/docs/installation.md#bootstrap-a-default-version-of-amundsen-using-docker) setup of Amundsen with dummy data, and an [overview of the architecture](https://github.com/amundsen-io/amundsen/blob/master/docs/architecture.md#architecture).

## Requirements
- Python >= 3.6
- Python >= 3.8

## Doc
- https://www.amundsen.io/amundsen/
4 changes: 2 additions & 2 deletions common/amundsen_common/log/action_log_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

LOGGER = logging.getLogger(__name__)

__pre_exec_callbacks = [] # type: List[Callable[..., Any]]
__post_exec_callbacks = [] # type: List[Callable[..., Any]]
__pre_exec_callbacks: List[Callable[..., Any]] = []
__post_exec_callbacks: List[Callable[..., Any]] = []


def register_pre_exec_callback(action_log_callback: Callable[..., Any]) -> None:
Expand Down
6 changes: 5 additions & 1 deletion common/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
extras_require={
'all': requirements_dev
},
python_requires=">=3.7",
python_requires=">=3.8",
package_data={'amundsen_common': ['py.typed']},
classifiers=[
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
)
2 changes: 1 addition & 1 deletion databuilder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Amundsen Databuilder is a data ingestion library, which is inspired by [Apache G
For information about Amundsen and our other services, visit the [main repository](https://github.com/amundsen-io/amundsen#amundsen) `README.md` . Please also see our instructions for a [quick start](https://github.com/amundsen-io/amundsen/blob/master/docs/installation.md#bootstrap-a-default-version-of-amundsen-using-docker) setup of Amundsen with dummy data, and an [overview of the architecture](https://github.com/amundsen-io/amundsen/blob/master/docs/architecture.md#architecture).

## Requirements
- Python >= 3.6.x
- Python >= 3.8.x
- elasticsearch 7.x

## Doc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ def _fetch_minmax(table: ScrapedTableMetadata, partition_column: str) -> Tuple[s
_table_columns = table.columns
else:
_table_columns = []
columns_with_valid_type = list(map(lambda l: l.name,
filter(lambda l: str(l.data_type).lower() in valid_types, _table_columns)
columns_with_valid_type = list(map(lambda n: n.name,
filter(lambda d: str(d.data_type).lower() in valid_types, _table_columns)
)
)

Expand Down
2 changes: 1 addition & 1 deletion databuilder/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ output = build/coverage.xml
directory = build/coverage_html

[mypy]
python_version = 3.6
python_version = 3.8
disallow_untyped_defs = True
ignore_missing_imports = True
exclude = example
Expand Down
10 changes: 6 additions & 4 deletions databuilder/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
with open(requirements_path, 'r') as requirements_file:
requirements_dev = requirements_file.readlines()

kafka = ['confluent-kafka==1.0.0']
kafka = ['confluent-kafka==2.3.0']

cassandra = ['cassandra-driver==3.20.1']

Expand Down Expand Up @@ -70,7 +70,8 @@

feast = [
'feast==0.17.0',
'fastapi!=0.76.*'
'fastapi!=0.76.*',
'protobuf<=3.20.1'
]

atlas = [
Expand Down Expand Up @@ -114,7 +115,7 @@
include_package_data=True,
dependency_links=[],
install_requires=requirements,
python_requires='>=3.7',
python_requires='>=3.8',
extras_require={
'all': all_deps,
'dev': requirements_dev,
Expand All @@ -139,6 +140,7 @@
'schema_registry': schema_registry,
},
classifiers=[
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
)
2 changes: 1 addition & 1 deletion frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The frontend service leverages a separate [search service](./../search) for allo
For information about Amundsen and our other services, refer to this [README.md](https://github.com/amundsen-io/amundsen). Please also see our instructions for a [quick start](https://www.amundsen.io/amundsen/installation/) setup of Amundsen with dummy data, and an [overview of the architecture](https://www.amundsen.io/amundsen/architecture/).

## Requirements
- Python >= 3.6
- Python >= 3.8
- Node = v12
- npm >= 6.x.x

Expand Down
2 changes: 1 addition & 1 deletion frontend/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ output = build/coverage.xml
directory = build/coverage_html

[mypy]
python_version = 3.6
python_version = 3.8
disallow_untyped_defs = True
ignore_missing_imports = True
strict_optional = True
Expand Down
5 changes: 3 additions & 2 deletions frontend/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@ def build_js() -> None:
'asana': asana,
'all': all_deps,
},
python_requires=">=3.7",
python_requires=">=3.8",
entry_points="""
[action_log.post_exec.plugin]
logging_action_log=amundsen_application.log.action_log_callback:logging_action_log
""",
classifiers=[
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
)
2 changes: 1 addition & 1 deletion metadata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Amundsen Metadata service serves Restful API and is responsible for providing an
For information about Amundsen and our other services, refer to this [README.md](./../README.md). Please also see our instructions for a [quick start](./../docs/installation.md#bootstrap-a-default-version-of-amundsen-using-docker) setup of Amundsen with dummy data, and an [overview of the architecture](./../docs/architecture.md#architecture).

## Requirements
- Python >= 3.7
- Python >= 3.8

## Doc
- https://www.amundsen.io/amundsen/
Expand Down
2 changes: 1 addition & 1 deletion metadata/metadata_service/proxy/gremlin_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def _safe_get_list(root, *keys, transform: Optional[Callable] = None):
raise RuntimeError(f'{values} is not a List! root={root} keys={keys}')
elif transform is None:
return sorted(values)
elif len(values) > 0 and type(values[0]) == datetime and transform == int:
elif len(values) > 0 and type(values[0]) is datetime and transform == int:
# need to do something special for datetimes we are transforming into int's
return sorted([transform(value.timestamp()) for value in values])
else:
Expand Down
2 changes: 1 addition & 1 deletion metadata/metadata_service/proxy/neo4j_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def _exec_table_query(self, table_uri: str) -> Tuple:

resource_reports = self._extract_resource_reports_from_query(table_records.get('resource_reports', []))

return wmk_results, table_writer, table_apps, timestamp_value,\
return wmk_results, table_writer, table_apps, timestamp_value, \
tags, src, badges, prog_descriptions, resource_reports

@timer_with_counter
Expand Down
2 changes: 1 addition & 1 deletion metadata/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exclude_lines =
import *

[mypy]
python_version = 3.6
python_version = 3.8
disallow_untyped_defs = True
ignore_missing_imports = True
strict_optional = True
Expand Down
5 changes: 3 additions & 2 deletions metadata/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
'rds': rds,
'gremlin': gremlin
},
python_requires=">=3.7",
python_requires=">=3.8",
classifiers=[
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
)
4 changes: 2 additions & 2 deletions metadata/tests/unit/proxy/test_neo4j_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ def test_get_lineage_success(self) -> None:
key = "alpha"
mock_execute.return_value = [{
"upstream_entities": [
{"key": "beta", "source": "gold", "level": 1, "badges": [], "usage":100, "parent": None},
{"key": "beta", "source": "gold", "level": 1, "badges": [], "usage": 100, "parent": None},
{"key": "gamma", "source": "dyno", "level": 1,
"badges":
[
Expand All @@ -1541,7 +1541,7 @@ def test_get_lineage_success(self) -> None:
expected = Lineage(
key=key,
upstream_entities=[
LineageItem(**{"key": "beta", "source": "gold", "level": 1, "badges": [], "usage":100}),
LineageItem(**{"key": "beta", "source": "gold", "level": 1, "badges": [], "usage": 100}),
LineageItem(**{"key": "gamma", "source": "dyno", "level": 1,
"badges":
[
Expand Down
2 changes: 1 addition & 1 deletion search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For information about Amundsen and our other services, refer to this [README.md]

## Requirements

- Python >= 3.7
- Python >= 3.8
- Elasticsearch, supported versions:
- 7.x
- 8.0.0
Expand Down
2 changes: 1 addition & 1 deletion search/search_service/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class LocalConfig(Config):
PORT=PROXY_PORT)
)
ES_PROXY_CLIENT = PROXY_CLIENTS[os.environ.get('ES_PROXY_CLIENT', 'ELASTICSEARCH_V2_1')]
ELASTICSEARCH_CLIENT = os.environ.get('ELASTICSEARCH_CLIENT') # type: Optional[Any]
ELASTICSEARCH_CLIENT: Optional[Any] = os.environ.get('ELASTICSEARCH_CLIENT')
PROXY_USER = os.environ.get('CREDENTIALS_PROXY_USER', 'elastic')
PROXY_PASSWORD = os.environ.get('CREDENTIALS_PROXY_PASSWORD', 'elastic')

Expand Down
2 changes: 1 addition & 1 deletion search/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exclude_lines =
import *

[mypy]
python_version = 3.6
python_version = 3.8
disallow_untyped_defs = True
ignore_missing_imports = True
strict_optional = True
Expand Down
6 changes: 5 additions & 1 deletion search/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,9 @@
'dev': requirements_dev,
'oidc': oidc
},
python_requires=">=3.7"
python_requires=">=3.8",
classifiers=[
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
)
Loading