[Python] Updating rules_python to 1.5.4#40602
Closed
sreenithi wants to merge 1 commit intogrpc:masterfrom
Closed
Conversation
sergiitk
approved these changes
Sep 3, 2025
Member
sergiitk
left a comment
There was a problem hiding this comment.
Skimming over the changelog, all changes affecting us seem to be no-breaking. I couldn't find any usages of find_requirements BTW.
Contributor
Author
|
Right thanks for verifying. My bad, the VSCode's search on my machine was temporarily messed up and showing unrelated files which is probably why I saw |
sreenithi
added a commit
to sreenithi/grpc
that referenced
this pull request
Sep 3, 2025
Changelog: everything above https://rules-python.readthedocs.io/en/stable/changelog.html#v1-0-0 till https://rules-python.readthedocs.io/en/stable/changelog.html#id2 (1.5.3). Closes grpc#40602 COPYBARA_INTEGRATE_REVIEW=grpc#40602 from sreenithi:rules_python_update 758530a PiperOrigin-RevId: 802453541
anniefrchz
pushed a commit
to anniefrchz/grpc
that referenced
this pull request
Sep 3, 2025
Changelog: everything above https://rules-python.readthedocs.io/en/stable/changelog.html#v1-0-0 till https://rules-python.readthedocs.io/en/stable/changelog.html#id2 (1.5.3). Closes grpc#40602 COPYBARA_INTEGRATE_REVIEW=grpc#40602 from sreenithi:rules_python_update 758530a PiperOrigin-RevId: 802453541
sergiitk
pushed a commit
that referenced
this pull request
Sep 4, 2025
Backport of #40602 to v1.75.x. --- Changelog: everything above https://rules-python.readthedocs.io/en/stable/changelog.html#v1-0-0 till https://rules-python.readthedocs.io/en/stable/changelog.html#id2 (1.5.3).
copybara-service bot
pushed a commit
that referenced
this pull request
Sep 8, 2025
… tests (#40403) This PR enables Python 3.14 in all the different tests - Basic tests (Native Python tests), Bazel tests and Distrib tests to build Python 3.14 artifacts. In addition, it also updates all the public facing METADATA versions. ## Distribtests Required pre-requisite changes to enable 3.14 artifacts are covered in #40289 . ## Bazel tests Enabling Python 3.14 required updating the rules_python version to a more recent version that supports 3.14. This was done in #40602 ## Basic tests The following errors were caught by the Basic tests when running via Python 3.14 and resolved in this PR: ### 1) No running event loop for AsyncIO when run outside an async function ``` Traceback (most recent call last): File "src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi", line 184, in grpc._cython.cygrpc.get_working_loop RuntimeError: no running event loop ``` This was caught by the `tests_aio.unit.outside_init_test.TestOutsideInit` and `tests_aio.unit.init_test.TestInit` tests, and was also previously reported in #39507 with the root cause. Following some investigation, the fix is being worked on by @sergiitk in PR #40293. In order to parallelize the fix and this PR, these 2 tests are currently being skipped for Python 3.14 and above. ### 2) Pickling error from the `multiprocessing` library ``` _pickle.PicklingError: Can't pickle <function _test_well_known_types at 0x7f3937eee610>: it's not the same object as tests.unit._dynamic_stubs_test._test_well_known_types when serializing dict item '_target' when serializing multiprocessing.context.Process state when serializing multiprocessing.context.Process object ``` This was caught by the `tests.unit._dynamic_stubs_test.DynamicStubTest` which runs test cases in a subprocess using the `multiprocessing` library. Error root cause: - The default start method of multiprocessing in linux has changed to `forkserver` instead of `fork` from Python 3.14. - `forkserver` has a few extra restrictions for picklability as compared to `fork` (Ref: [Python Docs](https://docs.python.org/3.14/library/multiprocessing.html#the-spawn-and-forkserver-start-methods)) - All the [test case functions](https://github.com/grpc/grpc/blob/0243842d5d10f624bf8f09f45026dd300805502f/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py#L115) in the DynamicStubTest that are provided as `target` to the `multiprocessing.Process` use decorators. This causes problems when pickling them. Hence to resolve this, we manually set the 'start method' of `multiprocessing` to use the `fork` start method. Closes #40403 PiperOrigin-RevId: 804290760
asheshvidyut
pushed a commit
to asheshvidyut/grpc
that referenced
this pull request
Sep 12, 2025
Changelog: everything above https://rules-python.readthedocs.io/en/stable/changelog.html#v1-0-0 till https://rules-python.readthedocs.io/en/stable/changelog.html#id2 (1.5.3). Closes grpc#40602 COPYBARA_INTEGRATE_REVIEW=grpc#40602 from sreenithi:rules_python_update 758530a PiperOrigin-RevId: 802453541
asheshvidyut
pushed a commit
to asheshvidyut/grpc
that referenced
this pull request
Sep 12, 2025
… tests (grpc#40403) This PR enables Python 3.14 in all the different tests - Basic tests (Native Python tests), Bazel tests and Distrib tests to build Python 3.14 artifacts. In addition, it also updates all the public facing METADATA versions. ## Distribtests Required pre-requisite changes to enable 3.14 artifacts are covered in grpc#40289 . ## Bazel tests Enabling Python 3.14 required updating the rules_python version to a more recent version that supports 3.14. This was done in grpc#40602 ## Basic tests The following errors were caught by the Basic tests when running via Python 3.14 and resolved in this PR: ### 1) No running event loop for AsyncIO when run outside an async function ``` Traceback (most recent call last): File "src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi", line 184, in grpc._cython.cygrpc.get_working_loop RuntimeError: no running event loop ``` This was caught by the `tests_aio.unit.outside_init_test.TestOutsideInit` and `tests_aio.unit.init_test.TestInit` tests, and was also previously reported in grpc#39507 with the root cause. Following some investigation, the fix is being worked on by @sergiitk in PR grpc#40293. In order to parallelize the fix and this PR, these 2 tests are currently being skipped for Python 3.14 and above. ### 2) Pickling error from the `multiprocessing` library ``` _pickle.PicklingError: Can't pickle <function _test_well_known_types at 0x7f3937eee610>: it's not the same object as tests.unit._dynamic_stubs_test._test_well_known_types when serializing dict item '_target' when serializing multiprocessing.context.Process state when serializing multiprocessing.context.Process object ``` This was caught by the `tests.unit._dynamic_stubs_test.DynamicStubTest` which runs test cases in a subprocess using the `multiprocessing` library. Error root cause: - The default start method of multiprocessing in linux has changed to `forkserver` instead of `fork` from Python 3.14. - `forkserver` has a few extra restrictions for picklability as compared to `fork` (Ref: [Python Docs](https://docs.python.org/3.14/library/multiprocessing.html#the-spawn-and-forkserver-start-methods)) - All the [test case functions](https://github.com/grpc/grpc/blob/0243842d5d10f624bf8f09f45026dd300805502f/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py#L115) in the DynamicStubTest that are provided as `target` to the `multiprocessing.Process` use decorators. This causes problems when pickling them. Hence to resolve this, we manually set the 'start method' of `multiprocessing` to use the `fork` start method. Closes grpc#40403 PiperOrigin-RevId: 804290760
sreenithi
added a commit
to sreenithi/grpc
that referenced
this pull request
Sep 17, 2025
… tests (grpc#40403) This PR enables Python 3.14 in all the different tests - Basic tests (Native Python tests), Bazel tests and Distrib tests to build Python 3.14 artifacts. In addition, it also updates all the public facing METADATA versions. Required pre-requisite changes to enable 3.14 artifacts are covered in grpc#40289 . Enabling Python 3.14 required updating the rules_python version to a more recent version that supports 3.14. This was done in grpc#40602 The following errors were caught by the Basic tests when running via Python 3.14 and resolved in this PR: ``` Traceback (most recent call last): File "src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi", line 184, in grpc._cython.cygrpc.get_working_loop RuntimeError: no running event loop ``` This was caught by the `tests_aio.unit.outside_init_test.TestOutsideInit` and `tests_aio.unit.init_test.TestInit` tests, and was also previously reported in grpc#39507 with the root cause. Following some investigation, the fix is being worked on by @sergiitk in PR grpc#40293. In order to parallelize the fix and this PR, these 2 tests are currently being skipped for Python 3.14 and above. ``` _pickle.PicklingError: Can't pickle <function _test_well_known_types at 0x7f3937eee610>: it's not the same object as tests.unit._dynamic_stubs_test._test_well_known_types when serializing dict item '_target' when serializing multiprocessing.context.Process state when serializing multiprocessing.context.Process object ``` This was caught by the `tests.unit._dynamic_stubs_test.DynamicStubTest` which runs test cases in a subprocess using the `multiprocessing` library. Error root cause: - The default start method of multiprocessing in linux has changed to `forkserver` instead of `fork` from Python 3.14. - `forkserver` has a few extra restrictions for picklability as compared to `fork` (Ref: [Python Docs](https://docs.python.org/3.14/library/multiprocessing.html#the-spawn-and-forkserver-start-methods)) - All the [test case functions](https://github.com/grpc/grpc/blob/0243842d5d10f624bf8f09f45026dd300805502f/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py#L115) in the DynamicStubTest that are provided as `target` to the `multiprocessing.Process` use decorators. This causes problems when pickling them. Hence to resolve this, we manually set the 'start method' of `multiprocessing` to use the `fork` start method. Closes grpc#40403 PiperOrigin-RevId: 804290760
sreenithi
added a commit
that referenced
this pull request
Sep 18, 2025
#40726) Backport of #40403 to v1.75.x. --- This PR enables Python 3.14 in all the different tests - Basic tests (Native Python tests), Bazel tests and Distrib tests to build Python 3.14 artifacts. In addition, it also updates all the public facing METADATA versions. ## Distribtests Required pre-requisite changes to enable 3.14 artifacts are covered in #40289 . ## Bazel tests Enabling Python 3.14 required updating the rules_python version to a more recent version that supports 3.14. This was done in #40602 ## Basic tests The following errors were caught by the Basic tests when running via Python 3.14 and resolved in this PR: ### 1) No running event loop for AsyncIO when run outside an async function ``` Traceback (most recent call last): File "src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi", line 184, in grpc._cython.cygrpc.get_working_loop RuntimeError: no running event loop ``` This was caught by the `tests_aio.unit.outside_init_test.TestOutsideInit` and `tests_aio.unit.init_test.TestInit` tests, and was also previously reported in #39507 with the root cause. Following some investigation, the fix is being worked on by @sergiitk in PR #40293. In order to parallelize the fix and this PR, these 2 tests are currently being skipped for Python 3.14 and above. ### 2) Pickling error from the `multiprocessing` library ``` _pickle.PicklingError: Can't pickle <function _test_well_known_types at 0x7f3937eee610>: it's not the same object as tests.unit._dynamic_stubs_test._test_well_known_types when serializing dict item '_target' when serializing multiprocessing.context.Process state when serializing multiprocessing.context.Process object ``` This was caught by the `tests.unit._dynamic_stubs_test.DynamicStubTest` which runs test cases in a subprocess using the `multiprocessing` library. Error root cause: - The default start method of multiprocessing in linux has changed to `forkserver` instead of `fork` from Python 3.14. - `forkserver` has a few extra restrictions for picklability as compared to `fork` (Ref: [Python Docs](https://docs.python.org/3.14/library/multiprocessing.html#the-spawn-and-forkserver-start-methods)) - All the [test case functions](https://github.com/grpc/grpc/blob/0243842d5d10f624bf8f09f45026dd300805502f/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py#L115) in the DynamicStubTest that are provided as `target` to the `multiprocessing.Process` use decorators. This causes problems when pickling them. Hence to resolve this, we manually set the 'start method' of `multiprocessing` to use the `fork` start method.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog: everything above https://rules-python.readthedocs.io/en/stable/changelog.html#v1-0-0 till https://rules-python.readthedocs.io/en/stable/changelog.html#id2 (1.5.3).