Commit Graph

25 Commits

Author SHA1 Message Date
Xuan Wang 73b0ac2067 [Python Version] Drop support for Python 3.7 (#34450)
### NOTE
* We shouldn't merge this PR until GCP cloud functions drops support for Python 3.7 ([Currently scheduled for GCF](https://cloud.google.com/functions/docs/runtime-support#python))

As part of supporting Python 3.12, we're now officially drop support for Python 3.7.

This PR:

* Changed supported Python version from 3.7 to 3.8 in README.
* Replaced distribution test image from `debian:buster` to `debian:bullseye` since the default Python version in buster is 3.7.

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #34450

PiperOrigin-RevId: 622899511
2024-04-08 11:17:51 -07:00
Xuan Wang ffdb58dd5f
[Python 3.12] Support Python 3.12 (#34398)
Support Python 3.12.

### Testing
* Passed all Distribution Tests.
* Also tested locally by installing 3.12 artifact.


<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-09-22 09:57:29 -07:00
Xuan Wang c7a1336566
[Python 3.12] Deprecate distutil (#34186)
### Background

* `distutils` is deprecated with removal planned for Python 3.12
([pep-0632](https://peps.python.org/pep-0632/)), thus we're trying to
replace all distutils usage with setuptools.
* Please note that user still have access to `distutils` if setuptools
is installed and `SETUPTOOLS_USE_DISTUTILS` is set to `local` (The
default in setuptools, more details can be found [in this
discussion](https://github.com/pypa/setuptools/issues/2806#issuecomment-1193336591)).

### How we decide the replacement

* We're following setuptools [Porting from Distutils
guide](https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html#porting-from-distutils)
when deciding the replacement.

#### Replacement not mentioned in the guide

* Replaced `distutils.utils.get_platform()` with
`sysconfig.get_platform()`.
* Based on the [answer
here](https://stackoverflow.com/questions/71664875/what-is-the-replacement-for-distutils-util-get-platform),
and also checked the document that `sysconfig.get_platform()` is good
enough for our use cases.
* Replaced `DistutilsOptionError` with `OptionError`.
* `setuptools.error` is exporting it as `OptionError` [in the
code](https://github.com/pypa/setuptools/blob/v59.6.0/setuptools/errors.py).
* Upgrade `setuptools` in `test_packages.sh` and changed the version
ping to `59.6.0` in `build_artifact_python.bat`.
* `distutils.errors.*` is not fully re-exported until `59.0.0` (See
[this issue](https://github.com/pypa/setuptools/issues/2698) for more
details).

### Changes not included in this PR

* We're patching some compiler related functions provided by distutils
in our code
([example](ee4efc31c1/src/python/grpcio/_spawn_patch.py (L30))),
but since `setuptools` doesn't have similar interface (See [this issue
for more details](https://github.com/pypa/setuptools/issues/2806)), we
don't have a clear path to replace them yet.


<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-09-06 14:32:30 -07:00
Richard Belleville d714ae72e7
[dependency] Restrict cython to less than 3.X (#33738)
This should resolve breakage on master caused by the jump to Cython
3.0.0 this morning.
2023-07-18 12:56:16 -07:00
Lidi Zheng d76397480c
Remove Windows Python27 build support (#29364) 2022-04-11 12:55:59 -07:00
Lidi Zheng 997aae5cc4
Fix "twine"'s dependency "packaging" missing issue (#29360)
* Fix "twine"'s dependency "packaging" missing issue

* Use twine==3.8.0
2022-04-08 16:36:40 -07:00
Lidi Zheng 33135abbee
Pin twine to 3.8.0 for Windows (#28991) 2022-03-01 15:38:37 -08:00
Jan Tattermusch 9d73b3e85a
Use ninja for all grpc_csharp_ext builds on windows (#28841)
* cleanup C# win artifact build

* build C# basictests on win with ninja

* specify default parallelism for C# win artifact

* honor GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS in build_artifact_python.bat

* set --inner_jobs for windows grpc_build_artifact job

* fixup C# build picking env variables from C core build

* get rid of no longer needed NativeDependenciesConfiguration C# setting
2022-02-11 18:58:04 +01:00
Lidi Zheng 511af22c78 Hopefully fixed 27 build on winserver2016
* Download the working msys64 and use it to compile 27
* Remove the cygwin detection override logic
* Only install Python interpreters in jobs running on winserver2016
* Fix the batch script substring check
* Increase the timeout for related jobs
* TIL that there is an allow list for Kokoro env vars
2020-11-23 14:17:58 -08:00
Lidi Zheng 82f0f51690 Pin to 44.1.1 for Python 2 compatibility 2020-08-31 11:33:03 -07:00
Lidi Zheng 6a5d7106a0 Pin setuptools to 49.6.0 2020-08-31 11:20:44 -07:00
Lidi Zheng 151e5b72af Install required packages with --user 2019-12-11 16:28:27 -08:00
Lidi Zheng c5d194062c Attempt to fix all CI failures:
* Fixes the Windows Cython obsolate issue
* Fixes the post fork threading issue
2019-12-03 15:57:42 -08:00
Lidi Zheng db4ce94ebb
Revert "Revert "Release Python3.8 wheels for Windows"" 2019-12-02 10:59:03 -08:00
Jan Tattermusch 42039d09b7
Revert "Release Python3.8 wheels for Windows" 2019-12-02 18:01:42 +01:00
Lidi Zheng 6dc57b3b0c Let's see CI is happy with additional changes 2019-11-25 18:06:53 -08:00
Esun Kim 4dd753084a Fix the version of twine to 2.0 2019-11-20 09:41:54 -08:00
Srini Polavarapu ec640a53c6 Merge pull request #19105 from gnossen/twine_check_artifacts
Produce Python Wheels with a Valid long_description field
2019-05-28 10:11:34 -07:00
Jan Tattermusch 185a0a7028 add python monkey-patch for parallel build_ext compilation 2018-10-31 09:01:01 +01:00
Jan Tattermusch 7da82ecefa fix python windows artifact build 2018-02-05 20:57:58 +01:00
Jan Tattermusch a2eb6f7e70 set path to mingw on kokoro 2017-07-18 17:26:26 +02:00
Jan Tattermusch 5c74d90a33 improve python artifact building 2017-07-04 14:49:23 +02:00
Jan Tattermusch 7897ae9308 auto-fix most of licenses 2017-06-08 11:22:41 +02:00
Jan Tattermusch 47c7521960 simplify building artifacts on a single machine 2017-05-12 10:18:49 +02:00
Jan Tattermusch 5c79a3199c cleanup tools/run_tests directory 2016-12-22 10:47:52 +01:00