Skip to content

Python: upgrade black 22.1.0 -> 22.3.0 #11494

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

Merged
merged 1 commit into from
Mar 29, 2022
Merged

Conversation

grubberr
Copy link
Contributor

@grubberr grubberr commented Mar 29, 2022

Signed-off-by: Sergey Chvalyuk [email protected]

What

After click has upgraded from 8.0.4 -> 8.1.0, black 22.1.0 started to fail

./gradlew :airbyte-integrations:connectors:source-amazon-ads:blackFormat

Traceback (most recent call last):
  File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/user/airbyte/airbyte-integrations/connectors/source-amazon-ads/.venv/lib/python3.7/site-packages/black/__main__.py", line 3, in <module>
    patched_main()
  File "src/black/__init__.py", line 1423, in patched_main
  File "src/black/__init__.py", line 1409, in patch_click
ImportError: cannot import name '_unicodefun' from 'click' (/home/user/airbyte/airbyte-integrations/connectors/source-amazon-ads/.venv/lib/python3.7/site-packages/click/__init__.py)

How

We need to upgrade black to the latest version 22.3.0

Signed-off-by: Sergey Chvalyuk <[email protected]>
@grubberr grubberr self-assigned this Mar 29, 2022
@grubberr grubberr linked an issue Mar 29, 2022 that may be closed by this pull request
@grubberr
Copy link
Contributor Author

grubberr commented Mar 29, 2022

/test connector=connectors/source-intercom

🕑 connectors/source-intercom https://github.com/airbytehq/airbyte/actions/runs/2056681056
✅ connectors/source-intercom https://github.com/airbytehq/airbyte/actions/runs/2056681056
Python tests coverage:

Name                                                 Stmts   Miss  Cover
------------------------------------------------------------------------
source_acceptance_test/utils/__init__.py                 6      0   100%
source_acceptance_test/tests/__init__.py                 4      0   100%
source_acceptance_test/__init__.py                       2      0   100%
source_acceptance_test/tests/test_full_refresh.py       52      2    96%
source_acceptance_test/utils/asserts.py                 37      2    95%
source_acceptance_test/config.py                        74      6    92%
source_acceptance_test/utils/json_schema_helper.py     105     13    88%
source_acceptance_test/utils/common.py                  70     17    76%
source_acceptance_test/utils/compare.py                 62     23    63%
source_acceptance_test/tests/test_core.py              275    106    61%
source_acceptance_test/base.py                          10      4    60%
source_acceptance_test/utils/connector_runner.py       110     48    56%
source_acceptance_test/tests/test_incremental.py        69     38    45%
------------------------------------------------------------------------
TOTAL                                                  876    259    70%
Name                          Stmts   Miss  Cover
-------------------------------------------------
source_intercom/__init__.py       2      0   100%
source_intercom/source.py       232     44    81%
-------------------------------------------------
TOTAL                           234     44    81%
Name                          Stmts   Miss  Cover
-------------------------------------------------
source_intercom/__init__.py       2      0   100%
source_intercom/source.py       232     21    91%
-------------------------------------------------
TOTAL                           234     21    91%

@grubberr grubberr changed the title upgrade black 22.1.0 -> 22.3.0 Pyhton: upgrade black 22.1.0 -> 22.3.0 Mar 29, 2022
@grubberr grubberr changed the title Pyhton: upgrade black 22.1.0 -> 22.3.0 Python: upgrade black 22.1.0 -> 22.3.0 Mar 29, 2022
@grubberr grubberr temporarily deployed to more-secrets March 29, 2022 05:54 Inactive
@grubberr grubberr temporarily deployed to more-secrets March 29, 2022 05:55 Inactive
@ChristopheDuong
Copy link
Contributor

We need to run tests on a wider scope of connectors / normalization to see if the changes to black version is not breaking anything else

@grubberr
Copy link
Contributor Author

grubberr commented Mar 29, 2022

/test connector=bases/base-python

🕑 bases/base-python https://github.com/airbytehq/airbyte/actions/runs/2057453188
✅ bases/base-python https://github.com/airbytehq/airbyte/actions/runs/2057453188
No Python unittests run

@grubberr
Copy link
Contributor Author

grubberr commented Mar 29, 2022

/test connector=bases/base-normalization

🕑 bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/2057513423

@grubberr
Copy link
Contributor Author

grubberr commented Mar 29, 2022

/test connector=bases/base-normalization

🕑 bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/2058008268
❌ bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/2058008268
🐛

@grubberr grubberr merged commit 84b2d32 into master Mar 29, 2022
@grubberr grubberr deleted the grubberr/11493-upgrade-black branch March 29, 2022 11:13
@ChristopheDuong
Copy link
Contributor

it seems weird the normalization integration tests are failing though

@grubberr
Copy link
Contributor Author

/test connector=bases/base-normalization

1 similar comment
@grubberr
Copy link
Contributor Author

/test connector=bases/base-normalization

@grubberr
Copy link
Contributor Author

/test connector=bases/base-normalization

@lazebnyi lazebnyi removed their request for review May 30, 2022 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

black 22.1.0 failed, it requires click 8.1.0
3 participants