Skip to content

Bump mypy-protobuf in sync_tensorflow script and improve generation scripts - #11740

Merged
JelleZijlstra merged 2 commits into
python:mainfrom
Avasam:improve-protobuf-generation-scripts
Apr 10, 2024
Merged

JelleZijlstra merged 2 commits into
python:mainfrom
Avasam:improve-protobuf-generation-scripts

Conversation

@Avasam

@Avasam Avasam commented Apr 10, 2024

Copy link
Copy Markdown
Collaborator

Extracted from #11696 but w/o bumping tensorflow in the script or metadata.toml.

  • Bump mypy-protobuf to 3.6.0
  • Removed redundant extra Ruff run (fixed separately by both the mypy-protobuf bump and Re-order ruff runs in pre-commit #11737 )
  • Download and install protoc rather than relying on the system one. libprotoc 3.6.1 that's bundled with my Ubuntu WSL doesn't support explicit optionals.
  • print protoc version
  • Speedup downloads by downloading source code zip instead of cloning tensorflow repo. Especially on subsequent runs where the download is already cached by wget
  • Cleanup (delete) the temp dir after work in it is complete
  • Delete old _pb2.pyi files before generating new ones
  • Made the tensorflow script look a lot more like the protobuf script
  • some formatting

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JelleZijlstra
JelleZijlstra merged commit fe02cba into python:main Apr 10, 2024
@Avasam
Avasam deleted the improve-protobuf-generation-scripts branch April 10, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants