Commit Graph

32 Commits

Author SHA1 Message Date
Sergii Tkachenko de6ed9ba9f
[Python] Migrate from yapf to black (#33138)
- Switched  from yapf to black
- Reconfigure isort for black
- Resolve black/pylint idiosyncrasies 

Note: I used `--experimental-string-processing` because black was
producing "implicit string concatenation", similar to what described
here: https://github.com/psf/black/issues/1837. While currently this
feature is experimental, it will be enabled by default:
https://github.com/psf/black/issues/2188. After running black with the
new string processing so that the generated code merges these `"hello" "
world"` strings concatenations, then I removed
`--experimental-string-processing` for stability, and regenerated the
code again.

To the reviewer: don't even try to open "Files Changed" tab 😄 It's
better to review commit-by-commit, and ignore `run black and isort`.
2023-06-09 15:08:55 -07:00
Cheng-Yu Chung 384982ba2b
[bugfixes] Fix vulnerability for PyYAML (#32007)
* Fix vulnerability for PyYAML

* Fix

* Revert "Fix"

This reverts commit 5522d226c4.

* Fix

* Fix format
2023-01-04 12:33:29 +08:00
Lidi Zheng 2231c2ba77
Introduce Python import sorting to our sanity test suite (#26768)
* Add isort_code.sh to sanity tests

* Run tools/distrib/isort_code.sh

* Fine tune the import order for relative imports

* Make pylint and project generation happy

* Fix a few corner cases

* Use --check instead of --diff

* The import order impacts test result somehow

* Make isort print diff and check output at the same time

* Let tools/run_tests/python_utils be firstparty library

* Run isort against latest HEAD
2021-07-26 12:31:21 -07:00
Lidi Zheng 5ea36eb47c
Revert "Revert "Resolve warnings and deprecations in several scripts in tools"" 2020-11-17 16:30:26 -08:00
Jan Tattermusch dcb3f8c73e
Revert "Resolve warnings and deprecations in several scripts in tools" 2020-11-16 16:21:28 +01:00
Lidi Zheng 76aade3eac Resolve warnings and deprecations in several scripts in tools 2020-11-13 12:17:38 -08:00
Alexander Polcyn 2c133c562d Fix sorting of gRPCLB addresses when resolved via DNS 2020-05-29 10:43:45 -07:00
Jan Tattermusch 41ac287f7b generate build metadata from bazel BUILD 2020-02-26 19:56:49 -05:00
Esun Kim e52081f903 More pythons to be formatted 2020-01-03 22:21:23 -08:00
Yash Tibrewal dfa45cb7ac Merge branch 'master' into svccfgerrortransient 2019-05-08 16:44:33 -07:00
Alexander Polcyn 2a4d62819b Revise c-ares timeouts to use c-ares's internal timeout/retry logic 2019-05-08 09:57:39 -07:00
Yash Tibrewal 6cba63eb47 reviewer comments and tests 2019-05-08 03:36:37 -07:00
Alexander Polcyn 93b7acd9bf Disable service config resolution with c-ares by default 2019-02-11 10:30:08 -08:00
Alexander Polcyn 2b328ee0ca Re-enable c-ares as the default resolver; but keep SRV queries off by default 2019-01-18 17:18:33 -08:00
yang-g e00ca0371a Promote gpr_test_util to part of grpc_test_util, add a sample to show it works, build.yaml change first 2018-12-06 13:40:12 -08:00
Alex Polcyn 5cd8b1eb81 Enable c-ares queries on Windows 2018-08-08 15:21:26 -07:00
Alexander Polcyn 9896c64186 Revert "Merge pull request #16158 from apolcyn/revert_windows_breakage"
This reverts commit d9e8f86675, reversing
changes made to 04847aeb1e.
2018-07-27 01:38:26 -07:00
Alexander Polcyn f34c653936 Revert "Merge pull request #15797 from apolcyn/windows_compile_and_sort"
This reverts commit ae8d3efc3a, reversing
changes made to e41215e181.
2018-07-26 14:32:07 -07:00
Alex Polcyn 1b1d5e52e7 Get c-ares to compile and do address sorting on windows 2018-07-25 13:21:43 -07:00
apolcyn 87a63e0e8a
Merge pull request #15691 from apolcyn/roll_forward_fix_shutdown_closed_socket
Revert "Revert "Fix shutdown of closed fd when c-ares opens a second fd""
2018-06-12 11:50:53 -07:00
Alexander Polcyn 50a7213929 Revert "Fix c-ares tests ipv6-only brokenness"
This reverts commit 27718ce64d.
2018-06-11 11:35:32 -07:00
Alexander Polcyn d2e357b10d Revert "Merge pull request #15685 from grpc/revert-15435-fix_shutdown_closed_socket"
This reverts commit 8b5e45a35b, reversing
changes made to 2ea5e1d1de.
2018-06-08 14:19:46 -07:00
Jan Tattermusch 61278f3aa7
Revert "Fix shutdown of closed fd when c-ares opens a second fd" 2018-06-08 11:11:59 +02:00
apolcyn 0e8b122f7f
Merge pull request #14649 from apolcyn/fix_cares_test_on_ipv6_only
Address comments on #14610, fix c-ares tests on ipv6-only hosts
2018-06-07 16:40:34 -07:00
apolcyn 701a4b1c32
Merge pull request #15435 from apolcyn/fix_shutdown_closed_socket
Fix shutdown of closed fd when c-ares opens a second fd
2018-06-07 15:15:49 -07:00
Alexander Polcyn 27718ce64d Fix c-ares tests ipv6-only brokenness 2018-06-06 13:55:13 -07:00
Alexander Polcyn 96dbfe1664 Fix shutdown of closed fd when c-ares opens a second fd 2018-06-04 10:15:47 -07:00
Alexander Polcyn fd1a6604ab Remove a test 2018-05-25 11:53:34 -07:00
Alexander Polcyn 550621c1b5 Make local DNS server tests more generic 2018-05-11 16:24:39 -07:00
Alexander Polcyn 690dde672a Add address sorting submodule for use in c-ares wrapper 2018-03-20 23:51:19 -07:00
Alexander Polcyn 9e3a76ba71 Add c-ares resolver tests against GCE DNS, using the unit test. 2017-09-27 16:47:56 -07:00
Alexander Polcyn 27bf05d003 Add tests for c-ares wrapper using a local DNS server. 2017-09-14 14:32:30 -07:00