Commit Graph

1633 Commits

Author SHA1 Message Date
Yihua Zhang 3fefdde3cc remove ALTS shared resources 2018-11-13 09:44:28 -08:00
Lidi Zheng 9b65b40247 Label wait-for-ready argument in multicallables as experimental 2018-11-12 13:57:59 -08:00
Richard Belleville ecd9063424 Use single NullHandler for whole library
I was trying to get a feel for what the rest of the python ecosystem
does with its logging, so I looked into the top few libraries on pypi:

urllib3 maintains a logger for not quite every module, but for each
one that does heavy lifting. The logger name is `__name__`, and no
handlers are registered for any module-level loggers, including
NullHandler. Their documentation spells out how to configure logging
for the library.

They explicitly configure a library root-level logger called `urllib3`
to which they attach a `NullHandler`. This addresses the "no handlers
could be found" problem.

Their tests explicitly configure handlers, just like ours do.

scrapy is more hands-on. It provides a configuration module for its
logging and a whole document on how to handle logging with scrapy. It
looks like log.py's whole reason for existence is making sure that a
handler is attached to to the scrapy handler at startup.

I think the extra complexity here is because scrapy also offers a CLI,
so there has to be some way to configure logging without resorting to
writing python, so I felt we didn't need to resort to this added
complexity.

---

Based on all of the libraries I've looked at, I think our current
approach is reasonable. The one change I would make is to explicitly
configure a `grpc` logger and to only attach a `NullHandler` to it
instead of putting the burden on the author of each new module to
configure it there.

With this change, I have

- Configured a logger in each module that cares about logging
- Removed all NullHandlers attached to module-level loggers
- Explicitly configured a `grpc` logger with a `NullHandler` attached

Resolves: #16572
Related: #17064
2018-11-09 08:47:42 -08:00
Lidi Zheng 678ea08950
Merge pull request #16919 from lidizheng/wait-for-ready
Add wait-for-ready semantics
2018-11-07 11:10:23 -08:00
Lidi Zheng a7a3f5b42e
Merge pull request #17074 from lidizheng/python-doc-gen
The new gRPC Python documentation generator
2018-11-07 11:08:19 -08:00
Lidi Zheng cabe8d8f10 New Python documentation generation
* Use templates instead of generating them every time
* Theme changed
* Add grpc_* modules
* APIs grouped
* No documentation for class members without docstring
* Add docstring for status code
2018-11-06 18:07:03 -08:00
Lidi Zheng 4821221e3a Add wait-for-ready semantics
* Include unit tests to test default behaviour, disable behaviour, enable behaviour of the wait-for-ready mechanism
* Import flags constants from grpc_types.h
* Use WaitGroup to wait for TRANSIENT_FAILURE state in unit test
2018-11-06 17:16:52 -08:00
Lidi Zheng 88150dbe2c
Merge pull request #17128 from lidizheng/add-comment-to-commands-py
Add background about gRPC Python's building process on macOS
2018-11-06 17:05:55 -08:00
Lidi Zheng 03841be6ce Add background about the special condition 2018-11-06 16:12:27 -08:00
Jan Tattermusch 7517b839ac
Merge pull request #17057 from jtattermusch/faster_python_build
Add python monkey-patch for parallel build_ext compilation
2018-11-06 12:13:18 +01:00
Lidi Zheng 2a1fbccb2c
Merge pull request #16976 from benjaminp/remove-pkg_resources
Replace pkg_resources with pkgutil.
2018-11-05 17:00:46 -08:00
Lidi Zheng b8a9989005 Add support for utf-8 error messages
* Both server and client should be fine with utf-8 error messages now
* Adding an interop test: special status message
2018-11-05 13:31:02 -08:00
yihuaz 5e9c9792b5
Merge pull request #16773 from yihuazhang/alts_tsi_handshaker_use_pollset_set
Use gRPC thread model (i.e., pollset_set) in ALTS TSI implementation
2018-11-02 11:05:54 -07:00
Noah Eisen 53657b5de3
Merge pull request #17050 from ncteisen/channelz-sockets
Channelz: Socket Tracks Addresses
2018-11-01 23:39:51 -04:00
Benjamin Peterson 187f7e4e4c Replace pkg_resources with pkgutil.
pkg_resources (part of setuptools) is overkill for reading resource files. The standard library module pkgutil can do that just fine.
2018-11-01 17:01:12 -07:00
Yihua Zhang cd768ec12a use gRPC thread model 2018-11-01 16:26:46 -07:00
Richard Belleville b741454fe4
Merge pull request #17064 from gnossen/fix-logging
Fix logging
2018-11-01 16:11:28 -07:00
Lidi Zheng f091ba1b66
Merge pull request #17008 from stub42/yay_destructors
Handle missing globals in Python Channel destructors
2018-11-01 14:15:16 -07:00
ncteisen 44b262c361 fix build and sanity 2018-10-31 21:11:28 -07:00
ncteisen 1a3c2d3e3a Move uri_parser to lib 2018-10-31 14:14:09 -07:00
Jan Tattermusch 185a0a7028 add python monkey-patch for parallel build_ext compilation 2018-10-31 09:01:01 +01:00
Richard Belleville 4d086ef0f4 Fix various mind-numbing typos 2018-10-30 18:53:00 -07:00
Richard Belleville 839722adc5 Add NullHandler to avoid warnings about no handler 2018-10-30 18:16:53 -07:00
Richard Belleville 1e05d48d2d Revert "Configure module level loggers with basicConfig()"
This reverts commit a20e2073c1.
2018-10-30 17:53:50 -07:00
ncteisen 3cb8b0b8cb Move uri_parser to common spot 2018-10-30 11:39:26 -07:00
Lidi Zheng 4e5ee57000 Change flag to `REQUIRE_CUSTOM_LIBRARIES_opt` 2018-10-30 10:00:55 -07:00
Lidi Zheng 7502a2311a
Try cleaner separation
* reduce possible contamination of environment variables
2018-10-29 22:48:35 -07:00
Lidi Zheng 688db0ec5b
Remove the environment variable changing line
* This commit failed `tools/run_tests/artifacts/build_artifact_csharp.sh`
* It doesn't make any sense!
2018-10-29 21:14:49 -07:00
Lidi Zheng 9569ebe770 Add reference to the issue 2018-10-29 16:38:20 -07:00
Lidi Zheng 465886533f Ensure libboringssl.a is always built for Python 2018-10-29 16:35:21 -07:00
Stuart Bishop 11ab724b97
Handle missing globals in Python Channel destructors
If the last reference to a Python object is at module scope, when
its destructor is run before program termination it may find that
the globals it requires no longer exist. Destructors of objects
likely to be stored at module global scope need to check that
globals exist before attempting to use them, to avoid warnings
being printed by the Python interpreter.

See grpc#17004
2018-10-26 00:54:21 +07:00
Mark D. Roth 496d0676c8
Merge pull request #16507 from markdroth/health_checking_client
Health checking client
2018-10-24 13:17:01 -07:00
Mark D. Roth f85fd026e3 Client-side health checking support. 2018-10-24 12:29:04 -07:00
Yihua Zhang 81bc942cd8 security connector refactor 2018-10-22 09:37:48 -07:00
Vishal Powar a33e796575 Changes to register xds plugin init and shutdown.
Also,
 - Changes to extract grpclb_proto into its own build target
 - Remove client_load_reporting_filter from xds plugin.
2018-10-18 12:43:42 -07:00
Lidi Zheng 118e134ded fix Exception throw for invalid channel args
* unit test included
* throw ValueError exception from Cython to Python
* prevent the deconstruction method from failing when Channel initialization failed
2018-10-14 23:33:58 -07:00
Stanley Cheung e5ce1e36e6 Regenerate projects 2018-10-08 15:50:50 -07:00
hcaseyal a46ac13db3
Merge pull request #16735 from hcaseyal/delete_lookup_table
Delete hpack lookup table
2018-10-01 15:22:05 -07:00
Hope Casey-Allen 4772a743e8 Delete hpack lookup table 2018-09-28 13:47:04 -07:00
Vijay Pai be18cedf90 Delete epollsig poller and tests using it 2018-09-22 08:07:47 -07:00
hcaseyal 5bb69e0f01
Merge pull request #16488 from hcaseyal/hpack_static_table
Hpack changes part 1: make grpc use the static hpack table on the encode path and optimize encoding
2018-09-20 09:32:59 -07:00
Hope Casey-Allen 327c514fe7 Some reorganizing to respond to code review comments 2018-09-19 13:50:25 -07:00
Mehrdad Afshari 3586ac1c99 Fix SSL channel credential when an argument is None 2018-09-17 11:08:00 -07:00
Nathaniel Manista 9eebb6d13d
Merge pull request #16378 from ghostwriternr/module-level-logger-fix
Configure module level loggers with basicConfig().
2018-09-06 17:45:50 +02:00
Ruslan Nigmatullin dcc0a223c6 [bazel] Fix python BUILD rules
* Add missing cython sources
* Make grpcio a library as it is not a binary
2018-09-04 23:19:57 +00:00
Juanli Shen 35501ad1df
Merge pull request #16467 from AspirinSJL/bump_master
Bump version to 1.16.0-dev
2018-08-27 18:34:38 -07:00
Yash Tibrewal 8d47cd4992
Revert "Revert "Fathom tcp changes"" 2018-08-27 14:56:01 -07:00
Juanli Shen 8ceb27a324 Regenerate projects 2018-08-27 14:27:55 -07:00
Jan Tattermusch 97ba943f17
Revert "Fathom tcp changes" 2018-08-27 12:43:20 +02:00
Yash Tibrewal aab47cbdf2
Merge pull request #15941 from yashykt/fathomtcpchanges
Fathom tcp changes
2018-08-24 12:27:56 -07:00