GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: bump minimum version of google-cloud-documentai to 2.4.1 by parthea · Pull Request #2584 · googleapis/gapic-generator-python

This repository was archived by the owner on Aug 25, 2026. It is now read-only.

Conversation

@parthea

@parthea parthea commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

PR #2502 updated the minimum version of python to 3.9

After making this change, we're seeing ModuleNotFoundError: No module named 'pkg_resources' in PR googleapis/google-cloud-python#16079 for google-cloud-contentwarehouse

2026-03-12T02:21:22.3794611Z google/cloud/contentwarehouse_v1/types/document.py:23: in <module>
2026-03-12T02:21:22.3803051Z     from google.cloud.documentai_v1.types import document as gcd_document
2026-03-12T02:21:22.3803944Z .nox/unit-3-9-protobuf_implementation-python/lib/python3.9/site-packages/google/cloud/documentai_v1/__init__.py:17: in <module>
2026-03-12T02:21:22.3804603Z     from .services.document_processor_service import (
2026-03-12T02:21:22.3805367Z .nox/unit-3-9-protobuf_implementation-python/lib/python3.9/site-packages/google/cloud/documentai_v1/services/document_processor_service/__init__.py:16: in <module>
2026-03-12T02:21:22.3806160Z     from .async_client import DocumentProcessorServiceAsyncClient
2026-03-12T02:21:22.3807220Z .nox/unit-3-9-protobuf_implementation-python/lib/python3.9/site-packages/google/cloud/documentai_v1/services/document_processor_service/async_client.py:27: in <module>
2026-03-12T02:21:22.3808046Z     import pkg_resources
2026-03-12T02:21:22.3808339Z E   ModuleNotFoundError: No module named 'pkg_resources'

The issue is that is google-cloud-documentai==2.0.0 has a runtime dependency on setuptools. This was fixed in #1471 and google-cloud-documentai==2.4.1 (See https://github.com/googleapis/python-documentai/releases/tag/v2.4.1 and
googleapis/python-documentai#424)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
@parthea
chore: bump minimum version of google-cloud-documentai
8d8530e
@parthea
parthea requested a review from a team as a code owner March 12, 2026 11:22
@blunderbuss-gcf blunderbuss-gcf Bot assigned vchudnov-g Mar 12, 2026
@product-auto-label product-auto-label Bot added the size: xs Pull request size is extra small. label Mar 12, 2026
@gemini-code-assist

gemini-code-assist Bot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a ModuleNotFoundError that arose after a recent update to the minimum Python version. The issue was traced to an older version of google-cloud-documentai having a runtime dependency on setuptools via pkg_resources, which is no longer reliably available in newer Python environments. By updating the minimum required version of google-cloud-documentai, this change ensures compatibility and prevents the module import error.

Highlights

  • Dependency Version Bump: Increased the minimum version requirement for google-cloud-documentai from 2.0.0 to 2.4.1 to resolve a ModuleNotFoundError.
Changelog
  • gapic/templates/_pypi_packages.j2
    • Updated the lower_bound for google-cloud-documentai to 2.4.1.
Activity
  • No human activity (comments, reviews, etc.) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot]
gemini-code-assist Bot reviewed Mar 12, 2026
View reviewed changes

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly bumps the minimum version of google-cloud-documentai to 2.4.1 to resolve a dependency issue. My review includes one suggestion to update a related code comment that has become outdated as a result of this change, to ensure the code remains maintainable.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread gapic/templates/_pypi_packages.j2 Resolved

Uh oh!

There was an error while loading. Please reload this page.

chalmerlowe
chalmerlowe suggested changes Mar 12, 2026
View reviewed changes

@chalmerlowe chalmerlowe left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the comment in _pypi_packages.j2 as noted.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
parthea added 2 commits March 12, 2026 11:34
@parthea
remove obsolete comment
dd3c4f0
@parthea
Merge branch 'main' into bump-google-cloud-documentai
015fa97
@parthea
parthea requested a review from chalmerlowe March 12, 2026 11:40
chalmerlowe
chalmerlowe approved these changes Mar 12, 2026
View reviewed changes

@chalmerlowe chalmerlowe left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@parthea
parthea enabled auto-merge (squash) March 12, 2026 11:55
@parthea
parthea merged commit 30ab1e5 into main Mar 12, 2026
113 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@parthea
parthea deleted the bump-google-cloud-documentai branch March 12, 2026 12:05
@parthea parthea mentioned this pull request Mar 12, 2026
chore: librarian release pull request: 20260312T133909Z #2587
Merged
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
@chalmerlowe chalmerlowe chalmerlowe approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@vchudnov-g vchudnov-g

Labels

size: xs Pull request size is extra small.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@parthea @chalmerlowe @vchudnov-g
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.