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 — fix: restore Actor.name_email_regex by Byron · Pull Request #2221 · gitpython-developers/GitPython

Conversation

@Byron

@Byron Byron commented Aug 28, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Tasks

This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.

  • refackiew

Everything below this line was generated by Codex GPT-5.

Created by Codex on behalf of Byron. Byron will review before this is ready to merge.

Fixes #2220

Summary

  • Restore the historical Actor.name_email_regex class member used by downstream projects such as python-semantic-release.
  • Deprecate access while preserving the original compiled-pattern API.
  • Warn that searching long malformed strings with the regex can take quadratic time and recommend Actor._from_string() or direct string parsing.
  • Keep Actor._from_string independent of the regex so malformed identities retain the linear-time parsing introduced for GHSA-g5vv-9gxw-82hx.

Validation

  • test/test_actor.py: 8 passed on Python 3.12.13.
  • Actor-related test/test_util.py coverage passed before the deprecation-only follow-up.
  • ruff check git/util.py test/test_actor.py
  • ruff format --check git/util.py test/test_actor.py
  • basedpyright git/util.py: no errors.
  • Codex review of commit 40825453: no findings.

Sorry, something went wrong.

Uh oh!

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

All reactions
Copilot AI lite review requested due to automatic review settings August 28, 2026 06:39
Copilot AI reviewed Aug 28, 2026

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sorry, something went wrong.

Uh oh!

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

All reactions
Copilot AI review requested due to automatic review settings August 28, 2026 06:42
Copilot AI reviewed Aug 28, 2026

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sorry, something went wrong.

Uh oh!

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

All reactions
@Byron
Byron force-pushed the re-add-regex branch from ee4b1d1 to 8afd1fd Compare August 28, 2026 08:50
Copilot AI review requested due to automatic review settings August 28, 2026 08:53
Copilot AI reviewed Aug 28, 2026

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sorry, something went wrong.

Uh oh!

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

All reactions
@Byron @codex
fix: restore Actor.name_email_regex (#2220)
bc63b02
<!-- agent -->
GitPython 3.1.60 removed the Actor.name_email_regex class attribute while
replacing internal actor parsing, which broke downstream consumers such as
python-semantic-release.

Bring back the historical compiled pattern for downstream compatibility,
but emit DeprecationWarning whenever the class member is accessed. The warning
explains its quadratic behavior on long malformed strings and points callers to
the public Actor(name, email) constructor when fields are separate, or direct
string parsing when they are not.

Assisted-by: GPT 5.6
Co-authored-by: GPT 5.6 <[email protected]>

# 252a84ac Add public Actor.from_string constructor (#2220)

Add public Actor.from_string constructor (#2220)

Promote the existing actor identity parser to Actor.from_string while retaining _from_string as a compatibility alias. Point the name_email_regex deprecation warning to the new public constructor or Actor(name, email).

Validation:
- actor-related test/test_actor.py and test/test_util.py cases: 12 passed
- ruff check and format checks passed
- basedpyright git/util.py: no errors

Co-authored-by: Codex GPT-5 <[email protected]>

# dd2181d8 Address review feedback about Actor subclasses

Address review feedback about Actor subclasses

Review feedback: Actor.from_string() should preserve the class on which the public classmethod is called instead of always returning a base Actor.

Construct through cls on both parsing paths and cover subclass construction directly.

Validation:
- actor-related test/test_actor.py and test/test_util.py cases: 13 passed
- ruff check and format checks passed
- basedpyright git/util.py: no errors

# fcf1ecb1 Address review feedback about constructor typing

Address review feedback about constructor typing

Review feedback: Actor.from_string() constructs subclasses at runtime but its Actor return annotation prevents type checkers from preserving subclass-specific members.

Use the project existing Python 3.7-compatible bound TypeVar pattern so the declared return type follows cls.

Validation:
- actor-related test/test_actor.py and test/test_util.py cases: 13 passed
- ruff check and format checks passed
- basedpyright git/util.py: no errors

Co-authored-by: Codex GPT-5 <[email protected]>
@Byron
Byron force-pushed the re-add-regex branch from 4082545 to bc63b02 Compare August 28, 2026 09:39
Copilot AI review requested due to automatic review settings August 28, 2026 09:39
Copilot AI reviewed Aug 28, 2026

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sorry, something went wrong.

Uh oh!

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

All reactions
@Byron
Byron merged commit d81336b into main Aug 28, 2026
53 checks passed

Uh oh!

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

@Byron
Byron deleted the re-add-regex branch August 28, 2026 10:57
@ramundomario ramundomario mentioned this pull request Aug 28, 2026
fix(config): replace removed Actor.name_email_regex from GitPython python-semantic-release/python-semantic-release#1477
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Undeclared breaking change affects python semantic release

Uh oh!

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

2 participants

@Byron
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 01402503 — 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.