Skip to content

Commit

Permalink
Remove vendored nvd3 and slugify libraries (apache#9136)
Browse files Browse the repository at this point in the history
We pulled in them because slugify _used_ to default to the GPL'd
`unidecode` module, but since Slugify 3.0[1] it has used text-unidecode
by first (and only installs the GPL library by an optional extra, not by
default) so we can now use it.

This lets us upgreade text-unidecode from 1.2 to the latest 1.3, which
is the version one of dbt's dependencies needs.

[1]: https://github.com/un33k/python-slugify/blob/4.0.0/CHANGELOG.md#300
  • Loading branch information
ashb authored Jun 4, 2020
1 parent 7696286 commit 2580b04
Show file tree
Hide file tree
Showing 49 changed files with 30 additions and 2,594 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ omit =
airflow/migrations/*
airflow/www/node_modules/**
airflow/www_rbac/node_modules/**
airflow/_vendor/*
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[flake8]
max-line-length = 110
ignore = E731,W504,I001,W503
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,.eggs,*.egg,*/_vendor/*,node_modules
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,.eggs,*.egg,node_modules
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
per-file-ignores =
airflow/models/__init__.py:F401
Expand Down
30 changes: 14 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ repos:
rev: v1.1.7
hooks:
- id: forbid-tabs
exclude: ^airflow/_vendor/.*$|^docs/Makefile$
exclude: ^docs/Makefile$
- id: insert-license
name: Add license for all SQL files
files: \.sql$
exclude: ^\.github/.*$|^airflow/_vendor/.*$
exclude: ^\.github/.*$
args:
- --comment-style
- "/*||*/"
Expand All @@ -38,7 +38,7 @@ repos:
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all other files
exclude: ^\.github/.*$"|^airflow/_vendor/.*$
exclude: ^\.github/.*$
args:
- --comment-style
- "|#|"
Expand All @@ -49,7 +49,7 @@ repos:
\.properties$|\.cfg$|\.conf$|\.ini$|\.ldif$|\.readthedocs$|\.service$|^Dockerfile.*$
- id: insert-license
name: Add license for all rst files
exclude: ^\.github/.*$"|^airflow/_vendor/.*$
exclude: ^\.github/.*$
args:
- --comment-style
- "||"
Expand All @@ -60,7 +60,7 @@ repos:
- id: insert-license
name: Add license for all JS/CSS files
files: \.(js|css)$
exclude: ^\.github/.*$|^airflow/_vendor/.*$
exclude: ^\.github/.*$
args:
- --comment-style
- "/**| *| */"
Expand All @@ -71,7 +71,7 @@ repos:
name: Add license for all JINJA template files
files: "^airflow/www/templates/.*\\.html$|^docs/templates/.*\\.html$|^airflow/contrib/plugins/\
metastore_browser/templates/.*\\.html$|.*\\.jinja2"
exclude: ^\.github/.*$|^airflow/_vendor/.*$
exclude: ^\.github/.*$
args:
- --comment-style
- "{#||#}"
Expand All @@ -80,7 +80,7 @@ metastore_browser/templates/.*\\.html$|.*\\.jinja2"
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all shell files
exclude: ^\.github/.*$"|^airflow/_vendor/.*$
exclude: ^\.github/.*$
files: ^breeze$|^breeze-complete$|\.sh$|\.bash$|\.bats$
args:
- --comment-style
Expand All @@ -90,7 +90,7 @@ metastore_browser/templates/.*\\.html$|.*\\.jinja2"
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all python files
exclude: ^\.github/.*$"|^airflow/_vendor/.*$
exclude: ^\.github/.*$
types: [python]
args:
- --comment-style
Expand All @@ -100,7 +100,7 @@ metastore_browser/templates/.*\\.html$|.*\\.jinja2"
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all XML files
exclude: ^\.github/.*$"|^airflow/_vendor/.*$
exclude: ^\.github/.*$
types: [xml]
args:
- --comment-style
Expand All @@ -110,7 +110,7 @@ metastore_browser/templates/.*\\.html$|.*\\.jinja2"
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all yaml files
exclude: ^\.github/.*$"|^airflow/_vendor/.*$
exclude: ^\.github/.*$
types: [yaml]
args:
- --comment-style
Expand All @@ -121,7 +121,7 @@ metastore_browser/templates/.*\\.html$|.*\\.jinja2"
- id: insert-license
name: Add license for all md files
files: \.md$
exclude: ^\.github/.*$|^airflow/_vendor/.*|PROVIDERS_CHANGES.*\.md
exclude: ^\.github/.*$|PROVIDERS_CHANGES.*\.md
args:
- --comment-style
- "<!--|| -->"
Expand Down Expand Up @@ -154,7 +154,6 @@ metastore_browser/templates/.*\\.html$|.*\\.jinja2"
- id: fix-encoding-pragma
args:
- --remove
exclude: ^airflow/_vendor/.*$
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.5.1
hooks:
Expand All @@ -174,7 +173,6 @@ metastore_browser/templates/.*\\.html$|.*\\.jinja2"
language: docker_image
entry: koalaman/shellcheck:stable -x -a
files: ^breeze$|^breeze-complete$|\.sh$|^hooks/build$|^hooks/push$|\.bash$|\.bats$
exclude: ^airflow/_vendor/.*$
- id: lint-openapi
name: Lint OpenAPI using speccy
language: docker_image
Expand All @@ -198,7 +196,7 @@ metastore_browser/templates/.*\\.html$|.*\\.jinja2"
entry: isort
files: \.py$
# To keep consistent with the global isort skip config defined in setup.cfg
exclude: ^airflow/_vendor/.*$|^build/.*$|^.tox/.*$|^venv/.*$
exclude: ^build/.*$|^.tox/.*$|^venv/.*$
additional_dependencies: ['isort']
- id: setup-order
name: Checks for an order of dependencies in setup.py
Expand Down Expand Up @@ -333,14 +331,14 @@ metastore_browser/templates/.*\\.html$|.*\\.jinja2"
language: system
entry: "./scripts/ci/pre_commit_mypy.sh"
files: \.py$
exclude: ^airflow/_vendor/.*$|^dev|^backport_packages
exclude: ^dev|^backport_packages
require_serial: true
- id: pylint
name: Run pylint for main sources
language: system
entry: "./scripts/ci/pre_commit_pylint_main.sh"
files: \.py$
exclude: ^tests/.*\.py$|^airflow/_vendor/.*|^scripts/.*\.py$|^dev|^backport_packages|^kubernetes_tests
exclude: ^tests/.*\.py$|^scripts/.*\.py$|^dev|^backport_packages|^kubernetes_tests
pass_filenames: true
require_serial: true # Pylint tests should be run in one chunk to detect all cycles
- id: pylint-tests
Expand Down
3 changes: 0 additions & 3 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ apache-airflow-.*\+bin.tar.gz.*
PULL_REQUEST_TEMPLATE.md
PROVIDERS_CHANGES*.md

# vendored modules
_vendor/*

# Temporary list of files to make compatible with Pylint
pylint_todo.txt

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
(MIT License) ElasticMock v1.3.2 (https://github.com/vrcmarcos/elasticmock)
(MIT License) MomentJS v2.24.0 (http://momentjs.com/)
(MIT License) moment-strftime v0.5.0 (https://github.com/benjaminoakes/moment-strftime)
(MIT License) python-slugify v2.0.1 (https://github.com/un33k/python-slugify)
(MIT License) python-slugify v4.0.0 (https://github.com/un33k/python-slugify)
(MIT License) python-nvd3 v0.15.0 (https://github.com/areski/python-nvd3)
(MIT License) eonasdan-bootstrap-datetimepicker v4.17.37 (https://github.com/eonasdan/bootstrap-datetimepicker/)

Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ graft licenses
graft airflow/www
graft airflow/www/static
graft airflow/www/templates
graft airflow/_vendor/
include airflow/alembic.ini
include airflow/git_version
include airflow/serialization/schema.json
Expand Down
13 changes: 0 additions & 13 deletions airflow/_vendor/README

This file was deleted.

18 changes: 0 additions & 18 deletions airflow/_vendor/__init__.py

This file was deleted.

24 changes: 0 additions & 24 deletions airflow/_vendor/nvd3/LICENSE

This file was deleted.

Loading

0 comments on commit 2580b04

Please sign in to comment.