aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/grpc/__init__.py
Commit message (Collapse)AuthorAge
* Switch to absolute importGravatar Richard Belleville2019-01-09
|
* Make gRPC version string available as grpc.__version__Gravatar Richard Belleville2018-12-27
|
* Update the documentation about the status code constraintGravatar Lidi Zheng2018-12-12
|
* New abort with grpc.Status APIGravatar Lidi Zheng2018-12-12
| | | | | | * Add `abort_with_status` method in ServicerContext * Add `Status` interface similar to the design of Details in interceptor * Add 3 unit test cases for abort mechanism
* fix docstring on grpc.serverGravatar Eric Gribkoff2018-11-28
|
* Label wait-for-ready argument in multicallables as experimentalGravatar Lidi Zheng2018-11-12
|
* Use single NullHandler for whole libraryGravatar Richard Belleville2018-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge pull request #16919 from lidizheng/wait-for-readyGravatar Lidi Zheng2018-11-07
|\ | | | | Add wait-for-ready semantics
* | New Python documentation generationGravatar Lidi Zheng2018-11-06
| | | | | | | | | | | | | | | | | | * 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
| * Add wait-for-ready semanticsGravatar Lidi Zheng2018-11-06
|/ | | | | | * 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
* Specify thread-safety of grpc-created channelsGravatar Nathaniel Manista2018-06-14
|
* Merge pull request #15689 from ↵Gravatar Nathaniel Manista2018-06-11
|\ | | | | | | | | nathanielmanistaatgoogle/generic-rpc-handler-validation Check conformance to grpc.GenericRpcHandler type.
| * Check conformance to grpc.GenericRpcHandler typeGravatar Nathaniel Manista2018-06-08
| |
* | Fix code to pass len-as-condition pylint testGravatar Mehrdad Afshari2018-06-07
|/
* Python: wordsmith documentation on Server.stop()Gravatar Augie Fackler2018-05-31
| | | | | | @nathanielmanistaatgoogle and I just had a good session helping me figure out how to use this API correctly, and this rewording of the documentation was the result.
* Add grpc.Channel.closeGravatar Nathaniel Manista2018-05-02
|
* Clarify add_done_callback works on both success and failureGravatar Mehrdad Afshari2018-02-13
|
* Reformat Python docstringsGravatar Mehrdad Afshari2018-01-17
|
* Upgrade yapf to 0.20.0Gravatar Mehrdad Afshari2018-01-02
| | | | Upgrade yapf version to 0.20.0 and reformat Python files.
* Add gRPC Python client-side interceptor machineryGravatar Mehrdad Afshari2017-12-12
|
* Add gRPC Python service-side interceptor machineryGravatar Mehrdad Afshari2017-12-12
|
* Introduce ServicerContext.abort to abort an RPCGravatar Mehrdad Afshari2017-12-10
| | | | | | | | | | | | gRPC Python required RPCs terminating with non-OK status code to still return a valid response value after calling set_code, even though the response value was not supposed to be communicated to the client, and returning None is considered a programming error. This commit introduces an alternative mechanism to terminate RPCs by calling the `abort` method on `ServicerContext` passed to the handler, which raises an exception and signals to the gRPC runtime to abort the RPC with the specified status code and details.
* Change client-side credentials' use of gRPC CoreGravatar Nathaniel Manista2017-12-03
| | | | | | Rather than allocating gRPC Core memory when instantiated and retaining it until deleted, gRPC Python's credentials objects now offer methods to create gRPC Core structures on demand.
* Fix some doc string formatting and contentGravatar Nathaniel Manista2017-12-03
|
* Refactor _plugin_wrappingGravatar Nathaniel Manista2017-12-01
|
* Correct AccessTokenAuthMetadataPlugin nameGravatar Nathaniel Manista2017-12-01
| | | | It was never itself a "call credentials" of any sort.
* Avoid unsupported and unintended API self-useGravatar Nathaniel Manista2017-11-28
| | | | | | | "Do not make undocumented and unsupported use of one part of an API from within the implementation of another part of the same API" is one of the rules of Abstraction Club. Not sure if it's important enough to be the first two rules, but it's up there.
* grpc.CallCredentials doc string correctionGravatar Nathaniel Manista2017-11-28
|
* Avoid abbreviation in Python APIGravatar Nathaniel Manista2017-11-21
| | | | | I should have requested this during code review of bcf083fa9099e5c919 but it slipped my mind.
* Add Python support for server SSL cert reloadingGravatar Giang Nguyen2017-11-20
| | | | | | | | | | | | | | Previously, a secure server is configured with SSL credentials during initialization, and those credentials will be used for the lifetime of the server. If the user wants the server to use new credentials, the user has to restart the server, resulting in server downtime. This change enables the user to optionally configure the server with a "certificiate config fetcher," such that on every new client connection, the server will call the config fetcher before performing the handshake, allowing the user application to optionally specify new certificate configuration for the server to use (the fetcher can return a "no change" and the server continues to use its current certificate configuration).
* auto-fix most of licensesGravatar Jan Tattermusch2017-06-08
|
* Expose Auth Context in PythonGravatar Ken Payson2017-05-11
|
* Regain sanityGravatar ncteisen2017-05-08
|
* Documentation fixes for python public API.Gravatar Makarand Dharmapurikar2017-05-05
| | | | Contains squashed commits for several typo fixes and comments made during review.
* Add max_requests argument to serverGravatar Ken Payson2017-03-17
| | | | If the server is already serving max requests, return RESOURCE_EXHAUSTED
* Work toward enabling cyclic-import lintGravatar Nathaniel Manista2017-03-02
|
* Re-run yapf code, and pin versionGravatar Ken Payson2017-02-06
|
* Doc string fix and tweaksGravatar Nathaniel Manista2017-01-19
| | | | | | | In those places where we return an object that implements two interfaces (let's say P and Q), consistently describe it as a "P-Q" rather than once mentioning that it is a P and describing it as a "Q" for the rest of prose.
* Run Python formattingGravatar Masood Malekghassemi2017-01-17
|
* v1.0.x → master upmergeGravatar Nathaniel Manista2016-12-16
|\ | | | | | | | | | | | | | | | | | | Manual changes: - Fixed use of Exception.message in _invalid_metadata_test.py - Fixed merge of one_failed_as_unavailable in rpc_server_spec.rb - Added "set -e" to generate_build_additions.sh
* \ Merge pull request #9006 from kpayson64/revert_bizarre_apiGravatar kpayson642016-12-13
|\ \ | | | | | | Revert "Add configurable exit grace periods and shutdown handlers"
| | * Recover 'namespace'd Python distribution packagesGravatar Masood Malekghassemi2016-12-12
| | | | | | | | | | | | | | | Uses dynamic loading to paper-over the negative effects of losing namespace packages in the previous commit.
* | | Recover 'namespace'd Python distribution packagesGravatar Masood Malekghassemi2016-12-12
| | | | | | | | | | | | | | | Uses dynamic loading to paper-over the negative effects of losing namespace packages in the previous commit.
* | | Add ServiceRpcHandler to exported namesGravatar Ken Payson2016-12-09
| | |
| | * ServicerContext methods doc string fix and tweakGravatar Nathaniel Manista2016-12-09
| | | | | | | | | | | | ServicerContext.set_code takes a (grpc.)StatusCode, not an integer.
* | | Merge pull request #8742 from kpayson64/service_names_hintGravatar kpayson642016-12-09
|\ \ \ | | | | | | | | Allow handlers to hint at the services they export
| * | | Allow handlers to hint at the services they exportGravatar kpayson642016-12-08
| | | |
| | * | Revert "Add configurable exit grace periods and shutdown handlers"Gravatar Ken Payson2016-12-08
| |/ / |/| | | | | | | | This reverts commit 3045a379aa76ce9ee930f427daa4ee799b0162aa.
* | | Add configurable exit grace periods and shutdown handlersGravatar Ken Payson2016-12-01
| | | | | | | | | | | | | | | | | | | | | | | | The server cleanup method is untested. The join() function that exposes it is only called by the internals of threading.py, and we don't hold a reference to the server thread to explicitly join() it, and I'm not sure we should add a reference just for this purpose. Moreover, the threading.py only calls join(None), the code path in question isn't even exercised by the internals of threading.py. Its just there to make sure we properly follow the join(timeout) semantics.
* | | Merge remote-tracking branch 'upstream/v1.0.x' into HEADGravatar Jan Tattermusch2016-11-22
|\ \ \ | |/ / |/| / | |/