Skip to content

ai/py-langchain-core: update to 1.7.6 - #3372

Open
laffer1 wants to merge 1 commit into
masterfrom
ai/py-langchain-core
Open

laffer1 wants to merge 1 commit into
masterfrom
ai/py-langchain-core

Conversation

@laffer1

@laffer1 laffer1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Update py-langchain-core to 1.7.6.
  • Add compatibility for both uuid-utils 0.x timestamp/nanos and 1.x nanoseconds APIs while preserving LangChain Core's public UUIDv7 interface.
  • Refresh runtime and test dependency requirements for the current release.

Validation

  • bmake patch, build, fake, package, check-fake, and check-license pass.
  • The unchanged upstream unit suite passes source and staged package against uuid-utils 0.14.1 and 1.2.0: 2,527 passed, 17 skipped, 9 xfailed, 1 xpassed, and 65 snapshots.
  • portlint -C: zero fatal errors; three advisories (hyphenated port name, patch generation suggestion, maintainer mode).

This update depends on the LangSmith compatibility update in #3371 and the separately prepared py-langchain-tests 1.1.9 provider for its test dependencies.

Summary by Sourcery

Update py-langchain-core to 1.7.6 and maintain UUIDv7 compatibility across supported uuid-utils releases.

Bug Fixes:

  • Add compatibility with both uuid-utils 0.x and 1.x UUIDv7 timestamp APIs while preserving LangChain Core's public interface.

Enhancements:

  • Update py-langchain-core to 1.7.6 with refreshed runtime and test dependency requirements.
  • Require Python 3.11 or newer and align the package's default unit-test configuration with upstream.

Build:

  • Update the port metadata, license declaration, and package checksums for the 1.7.6 release.

Tests:

  • Refresh test dependencies and configure the upstream unit-test subset with network access restrictions and benchmarks disabled.

Add UUIDv7 compatibility for uuid-utils 1.x while preserving the older timestamp API.

AI-Assisted-by: OpenAI Codex <noreply@openai.com>
Signed-off-by: Lucas Holt <luke@foolishgames.com>
@sourcery-ai

sourcery-ai Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Sorry @laffer1, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 12 hours and 20 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Implementation

Add runtime detection of the uuid-utils UUIDv7 signature so LangChain Core can call either the 0.x timestamp/nanos API or the 1.x nanoseconds API.

  • ai/py-langchain-core/files/patch-langchain_core_utils_uuid.py L1-28

Configuration

Update the port version, license and runtime/test dependency requirements, Python constraint, and default unit-test arguments for the 1.7.6 release.

  • ai/py-langchain-core/Makefile L14-27, L33-36, L41-46 (+2 small edits)

Lock files and vendored code

Refresh the port's distinfo checksums for the updated release.

  • ai/py-langchain-core/distinfo L1-3

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Claude finished @laffer1's task in 21s —— View job


Review of #3372 (py-langchain-core 1.7.6)

Verdict: the Makefile has no syntax or convention problems. The PR can't build or merge until its dependency PRs land. Two small items could be tightened.

Blocking (dependencies in this tree are too old)

Checked against master (this branch has no separate version bumps):

  • ai/py-langsmith is 0.7.34, but this PR requires >=0.14.9. That's ai/py-langsmith: update to 0.14.17 #3371, which the PR description already names as a prerequisite.
  • security/py-certifi is 2026.4.6, but this PR requires >=2026.10.19. I found no PR for it in the description, so it may need its own update.
  • ai/py-langchain-tests is 1.1.5, but TEST_DEPENDS needs >=1.1.9. The description says a separate provider is prepared.
  • ai/py-langchain-protocol is 0.0.20, which meets >=0.0.20.
  • misc/py-uuid-utils is 1.2.0, so the >=0.12.0 requirement is fine.

Please make sure the certifi bump merges too, or the port will fail dependency resolution.

Notes

  • Makefile (RUN_DEPENDS): langsmith>=0.14.9 and langsmith<1.0.0 are listed as two entries pointing at the same origin. Same for pydantic2. That's valid, and the framework's tuple syntax can't combine them. The new tenacity>=8.4.1 is fine too, and the comment about 8.4.0 explains why.
  • Makefile (PORTREVISION): Removing PORTREVISION=2 on a version bump is correct.
  • Makefile (LICENSE_FILE): LICENSE_FILE=${WRKSRC}/LICENSE and mit look right. I didn't check that the file exists in the sdist, but the description says check-license passes. If the license changed upstream, please confirm that explicitly.
  • Makefile (USES): python:3.11+ is a valid form. The extra pytest, certifi and httpx dependencies look consistent with the ,1 epoch usage elsewhere in the tree. numpy and pytest both have PORTEPOCH=1, so ,1 is correct.
  • Makefile (TEST_ARGS): TEST_ARGS hardcodes --allow-unix-socket. That option comes from pytest-socket and is already a test dependency, so it's fine.
  • files/patch-langchain_core_utils_uuid.py: The patch name follows the convention, and the logic is sound. It uses signature detection at import time, so it handles both uuid-utils APIs. One small risk is that inspect.signature on a compiled (Rust) function could raise ValueError if the extension has no text signature. Your testing against 0.14.1 and 1.2.0 covers that, so it's fine as is. Consider wrapping it in try/except (ValueError, TypeError) for safety.
  • Other checks: No architecture-specific code is dropped or added. There are no security concerns, and the fetch is from PyPI. NO_ARCH is retained, pkg-plist is handled by autoplist, and there's no WWW line in pkg-descr.
  • Dependent ports: The other py-langchain-* ports depend on core. Pure-Python bumps don't need a PORTREVISION change, but you may want to confirm their langchain-core version bounds still accept 1.7.x.

@@ -0,0 +1,28 @@
--- langchain_core/utils/uuid.py.orig
+++ langchain_core/utils/uuid.py
@@ -7,6 +7,7 @@
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