Commit Graph

63 Commits

Author SHA1 Message Date
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
Ben Beasley d483841001
Explicitly import importlib.abc; required on Python 3.10. Fixes #26062. (#26083) 2021-04-26 16:44:12 -07:00
Richard Belleville f13b324941 Include well-known types in sys.path when using runtime protos 2020-10-19 13:02:33 -07:00
Richard Belleville a80a3b72bb Do not import grpc_tools.protoc from grpc_tools 2020-09-22 12:35:52 -07:00
Richard Belleville d743defdaf Fix import errors on Windows 2020-09-10 19:26:43 -04:00
Richard Belleville 47dc875801 Make version check more stringent 2020-09-09 15:32:52 -07:00
Richard Belleville 65d14904e4 Add todo about deduping 2020-08-14 16:36:08 -07:00
Richard Belleville 13fa5040ca Sometimes, copyright headers can cause test failures 2020-08-10 15:12:13 -07:00
Richard Belleville b50110b583 Fix Windows 2020-08-10 14:49:48 -07:00
Richard Belleville 2d9e8bc736 Copyright 2020-08-06 17:24:28 -07:00
Richard Belleville 60f88e20a4 Fix bazel grpc_tools test 2020-08-06 17:04:22 -07:00
Richard Belleville 2c1efcd0ae Add documentation 2020-08-06 12:25:21 -07:00
Richard Belleville 9448150eec Remove option to specify path 2020-07-17 16:46:38 -07:00
Richard Belleville 999bbf1401 Format 2020-07-15 13:09:53 -07:00
Richard Belleville fd0d0f77df Fix Bazel warning 2020-07-15 13:03:16 -07:00
Richard Belleville df0978ceb0 Clean up build file 2020-07-10 15:18:46 -07:00
Richard Belleville d4e8d9956c Run tests under setup.py 2020-06-26 12:11:31 -07:00
Richard Belleville 6055bc564d Shorten type names 2020-06-17 22:32:41 -07:00
Richard Belleville 0d0d2c65bc Manually format Cython 2020-06-17 22:15:45 -07:00
Richard Belleville 1f655ad351 Fix gil relinquishment 2020-06-17 22:09:13 -07:00
Richard Belleville 1f53f13446 Merge remote-tracking branch 'origin/master' into dynamic_stubs 2020-06-17 14:47:07 -07:00
Esun Kim 7be821ac47 Yapf all target python sources 2020-01-03 09:25:10 -08:00
Richard Belleville c57cb10169 Release GIL while compiling protos 2019-12-12 17:45:59 -08:00
Richard Belleville 928c6f23ea Be completely safe for Python 2 2019-12-10 17:37:53 -08:00
Richard Belleville 7eb3dc2ccc Run grpc_tools tests under Bazel 2019-12-10 16:55:08 -08:00
Richard Belleville 12cf83fd70 Run under setuptools 2019-12-10 16:02:05 -08:00
Richard Belleville 5f5402505e Rehome grpc_tools tests 2019-12-10 15:16:21 -08:00
Richard Belleville d4ad4ad03b Remove checked-in generated code 2019-12-10 14:07:47 -08:00
Richard Belleville 447eba1ed7 Make imports thread-safe 2019-12-10 11:53:47 -08:00
Richard Belleville 5c76f50e2f Format Python code 2019-12-10 11:41:59 -08:00
Richard Belleville c8a72f092e Improve namespacing 2019-12-10 11:28:50 -08:00
Richard Belleville e9746f03d6 Format C++ 2019-12-10 11:07:59 -08:00
Richard Belleville 87b50e08b9 Formatting 2019-12-04 14:55:08 -08:00
Richard Belleville 467bc90a6f Simplify naming 2019-12-03 16:29:27 -08:00
Richard Belleville b9b126a237 Add new functions to grpc api surface 2019-12-03 16:14:40 -08:00
Richard Belleville 0f27c1630e Speed up transitive closure calculation 2019-12-03 11:17:08 -08:00
Richard Belleville 7400bc0657 Readability 2019-12-03 11:08:44 -08:00
Richard Belleville ecab62dc31 Support services too 2019-12-02 17:08:00 -08:00
Richard Belleville 595807e0c5 Create importlib path for protos 2019-12-02 16:47:15 -08:00
Richard Belleville 709143d1f5 Support multiple include paths. Pretty print errors. Support combined import 2019-12-02 13:01:33 -08:00
Richard Belleville 70d61da47e Test mixing of static and dynamic loading 2019-11-27 15:30:11 -08:00
Richard Belleville 4d3790271a Support importing a dependency tree of protos. 2019-11-27 13:47:37 -08:00
Richard Belleville a482fb21f8 Make include path work 2019-11-27 10:54:32 -08:00
Richard Belleville 555019b098 Clean up service import 2019-11-27 10:34:02 -08:00
Richard Belleville 01031e2fca Generate services in a dirty way 2019-11-27 10:09:19 -08:00
Richard Belleville 94ca493f4e Instantiate a module with the generated code 2019-11-26 16:46:49 -08:00
Richard Belleville 8dd1f3a394 Intelligently collect errors and warnings 2019-11-26 16:23:28 -08:00
Richard Belleville 9cc62a6208 WIP. Output protos in memory, not to STDOUT 2019-11-26 15:23:08 -08:00
Richard Belleville 0cfe955068 Add a simple unified importer 2019-11-22 16:32:23 -08:00
Richard Belleville 08a4bbf8b6 Make files build-system agnostic 2019-11-22 13:14:57 -08:00