Skip to content

Commit

Permalink
Remove vendored nvd3 and slugify libraries (#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

(cherry picked from commit 2580b04)
  • Loading branch information
ashb authored and potiuk committed Jun 29, 2020
1 parent 16a98e9 commit 5bffaf7
Show file tree
Hide file tree
Showing 46 changed files with 53 additions and 2,593 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,5 +1,5 @@
[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
27 changes: 13 additions & 14 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/.*$|^airflow/www/static/.*|^airflow/www_rbac/static/.*$
exclude: ^\.github/.*$
args:
- --comment-style
- "/**| *| */"
Expand All @@ -70,7 +70,7 @@ repos:
- id: insert-license
name: Add license for all JINJA template files
files: ^airflow/www/templates/.*\.html$|^docs/templates/.*\.html$|^airflow/contrib/plugins/metastore_browser/templates/.*\.html$ # yamllint disable-line rule:line-length
exclude: ^\.github/.*$|^airflow/_vendor/.*$
exclude: ^\.github/.*$
args:
- --comment-style
- "{#||#}"
Expand All @@ -79,7 +79,7 @@ repos:
- --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 @@ -89,7 +89,7 @@ repos:
- --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 @@ -99,7 +99,7 @@ repos:
- --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 @@ -109,7 +109,7 @@ repos:
- --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 @@ -120,7 +120,7 @@ repos:
- id: insert-license
name: Add license for all md files
files: \.md$
exclude: ^\.github/.*$|^airflow/_vendor/.*$
exclude: ^\.github/.*$
args:
- --comment-style
- "<!--|| -->"
Expand Down Expand Up @@ -169,7 +169,6 @@ repos:
language: docker_image
entry: koalaman/shellcheck:stable -x -a
files: ^breeze$|^breeze-complete$|\.sh$|^hooks/build$|^hooks/push$|\.bash$|\.bats$
exclude: ^airflow/_vendor/.*$
##
## Dear committer.
##
Expand Down Expand Up @@ -240,7 +239,7 @@ repos:
^\sdef\s*\S*\(.*\):\s*\-\>\s*\S*.* # Matches -> return value syntax from Python3
)$
files: \.py$
exclude: ^airflow/_vendor|^dev/
exclude: ^dev/
pass_filenames: true
- id: python2-compile
name: Compile code using python2
Expand Down Expand Up @@ -288,7 +287,7 @@ repos:
language: system
entry: "./scripts/ci/pre_commit_mypy.sh"
files: \.py$
exclude: ^airflow/_vendor/.*$|^dev
exclude: ^dev
require_serial: true
- id: flake8
name: Run flake8
Expand Down
5 changes: 3 additions & 2 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ apache-airflow-.*\+source.tar.gz.*
apache-airflow-.*\+bin.tar.gz.*
PULL_REQUEST_TEMPLATE.md

# vendored modules
_vendor/*

# Locally mounted files
.*egg-info/*
.bash_history
.bash_aliases
.inputrc

# the example notebook is ASF 2 licensed but RAT cannot read this
input_notebook.ipynb
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,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.22.2 (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 @@ -27,7 +27,6 @@ graft airflow/www_rbac
graft airflow/www_rbac/static
graft airflow/www_rbac/templates
graft airflow/www_rbac/translations
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 5bffaf7

Please sign in to comment.