René's URL Explorer Experiment


Title: Guard remaining config assignment paths against silent corruption by derek73 · Pull Request #246 · derek73/python-nameparser · GitHub

Open Graph Title: Guard remaining config assignment paths against silent corruption by derek73 · Pull Request #246 · derek73/python-nameparser

X Title: Guard remaining config assignment paths against silent corruption by derek73 · Pull Request #246 · derek73/python-nameparser

Description: Summary Four related config-validation gaps found by review of #240/#237, all in the same family as #238 (a bare string silently corrupting a config collection): #241 — the five plain SetManager attributes (first_name_titles, conjunctions, bound_first_names, non_first_name_prefixes, suffix_acronyms_ambiguous) accepted bare-value assignment silently, unlike the four _CachedUnionMember attributes. Extracted a shared _SetManagerAttribute base descriptor so all nine now guard consistently. #239 — HumanName.C was a plain attribute, so post-construction assignment (hn.C = 'garbage') bypassed the constructor's validation and failed later with an unrelated AttributeError. C is now a property backed by a shared _validate_constants helper; pickle format is unchanged. #242 — TupleManager/RegexTupleManager inherited dict.__init__ unchanged, so a bare string raised a cryptic ValueError, and an iterable of 2-character strings silently shredded into key/value pairs. TupleManager now has its own __init__ rejecting both. #244 — SetManager.__contains__ was the one operation that didn't normalize (lowercase, strip periods) its operand, so 'Dr.' in c.titles could return False even though the config was correctly set up. Now normalizes like every other SetManager operation. One commit per issue, plus three follow-ups: Updated docs/release_log.rst and AGENTS.md for the four fixes Fixed a CI-only failure: TupleManager.__init__'s *args: Any tripped ruff's ANN401; retyped with the actual accepted shape instead /simplify cleanup pass: extracted a shared _reject_bare_str_or_bytes helper (removing duplication the #242 fix had copy-pasted from SetManager's #238 guard) and short-circuited SetManager.__contains__ to skip lc() on the already-normalized hot path Test plan New unit tests for each issue (tests/test_constants.py), each added failing before its corresponding fix (TDD) Full test suite passes (pytest -q: 1406 passed) mypy and ruff check clean Sphinx doctest build passes (186 tests) CI green on all Python versions (3.10–3.14) plus CodeQL/analyze jobs

Open Graph Description: Summary Four related config-validation gaps found by review of #240/#237, all in the same family as #238 (a bare string silently corrupting a config collection): #241 — the five plain SetManager a...

X Description: Summary Four related config-validation gaps found by review of #240/#237, all in the same family as #238 (a bare string silently corrupting a config collection): #241 — the five plain SetManager a...

Opengraph URL: https://github.com/derek73/python-nameparser/pull/246

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:beb052dd-3e00-8917-c311-5cb5f9ee3e1a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB590:B33E1:157195F:1E3A7A6:6A574C86
html-safe-nonce195e5ccf57fd1cfb207860ed58f421561c1d17a1ec4fddd24dcd4a9976a16719
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTkwOkIzM0UxOjE1NzE5NUY6MUUzQTdBNjo2QTU3NEM4NiIsInZpc2l0b3JfaWQiOiI3NTA0MjUxNjY1NDg0NTY1NjM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3411e6766045c01435672c1b5205fa956643f7ad53e7be2587a9702320de9054
hovercard-subject-tagpull_request:3995717692
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/derek73/python-nameparser/pull/246/files
twitter:imagehttps://avatars.githubusercontent.com/u/18306?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/18306?s=400&v=4
og:image:altSummary Four related config-validation gaps found by review of #240/#237, all in the same family as #238 (a bare string silently corrupting a config collection): #241 — the five plain SetManager a...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/derek73/python-nameparser git https://github.com/derek73/python-nameparser.git
octolytics-dimension-user_id18306
octolytics-dimension-user_loginderek73
octolytics-dimension-repository_id18353524
octolytics-dimension-repository_nwoderek73/python-nameparser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id18353524
octolytics-dimension-repository_network_root_nwoderek73/python-nameparser
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release602250ea3b6dd8302a7220ef98adb828dbc807e4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/derek73/python-nameparser/pull/246/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fderek73%2Fpython-nameparser%2Fpull%2F246%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fderek73%2Fpython-nameparser%2Fpull%2F246%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=derek73%2Fpython-nameparser
Reloadhttps://github.com/derek73/python-nameparser/pull/246/files
Reloadhttps://github.com/derek73/python-nameparser/pull/246/files
Reloadhttps://github.com/derek73/python-nameparser/pull/246/files
derek73 https://github.com/derek73
python-nameparserhttps://github.com/derek73/python-nameparser
Notifications https://github.com/login?return_to=%2Fderek73%2Fpython-nameparser
Fork 111 https://github.com/login?return_to=%2Fderek73%2Fpython-nameparser
Star 711 https://github.com/login?return_to=%2Fderek73%2Fpython-nameparser
Code https://github.com/derek73/python-nameparser
Issues 22 https://github.com/derek73/python-nameparser/issues
Pull requests 2 https://github.com/derek73/python-nameparser/pulls
Actions https://github.com/derek73/python-nameparser/actions
Projects https://github.com/derek73/python-nameparser/projects
Wiki https://github.com/derek73/python-nameparser/wiki
Security and quality 0 https://github.com/derek73/python-nameparser/security
Insights https://github.com/derek73/python-nameparser/pulse
Code https://github.com/derek73/python-nameparser
Issues https://github.com/derek73/python-nameparser/issues
Pull requests https://github.com/derek73/python-nameparser/pulls
Actions https://github.com/derek73/python-nameparser/actions
Projects https://github.com/derek73/python-nameparser/projects
Wiki https://github.com/derek73/python-nameparser/wiki
Security and quality https://github.com/derek73/python-nameparser/security
Insights https://github.com/derek73/python-nameparser/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fderek73%2Fpython-nameparser%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fderek73%2Fpython-nameparser%2Fissues%2Fnew%2Fchoose
derek73https://github.com/derek73
masterhttps://github.com/derek73/python-nameparser/tree/master
fix/issue-241-239-242-244-config-guardshttps://github.com/derek73/python-nameparser/tree/fix/issue-241-239-242-244-config-guards
Conversation 1 https://github.com/derek73/python-nameparser/pull/246
Commits 7 https://github.com/derek73/python-nameparser/pull/246/commits
Checks 8 https://github.com/derek73/python-nameparser/pull/246/checks
Files changed 5 https://github.com/derek73/python-nameparser/pull/246/files
Guard remaining config assignment paths against silent corruption https://github.com/derek73/python-nameparser/pull/246/files#top
Show all changes 7 commits https://github.com/derek73/python-nameparser/pull/246/files
4d06435 Guard the five plain SetManager attributes against non-SetManager ass… derek73 Jul 6, 2026 https://github.com/derek73/python-nameparser/pull/246/commits/4d06435848891c8b56395e86b14963b5816833d8
a42f71b Make HumanName.C a property so post-construction assignment is validated derek73 Jul 6, 2026 https://github.com/derek73/python-nameparser/pull/246/commits/a42f71bc1ab5e4d04feb1d880516fdd1bdec4a89
69bc98c Reject bare strings and 2-char string elements in TupleManager derek73 Jul 6, 2026 https://github.com/derek73/python-nameparser/pull/246/commits/69bc98cce1d94b415b8784c062da00fa8ba11aa9
9da9645 Normalize str values in SetManager.__contains__ derek73 Jul 6, 2026 https://github.com/derek73/python-nameparser/pull/246/commits/9da96458c06b6cc41e35fcdf8b1465e13c0c609e
e830d3d Update release log and AGENTS.md for #241, #239, #242, #244 derek73 Jul 6, 2026 https://github.com/derek73/python-nameparser/pull/246/commits/e830d3d00ff41013beb384e5ffa50bfee4a9bbbe
b554820 Fix CI: type TupleManager.__init__ precisely instead of Any derek73 Jul 6, 2026 https://github.com/derek73/python-nameparser/pull/246/commits/b5548203a4bab4cd3155d5c69efb13d3e1e0ab0c
c95462f Simplify SetManager/TupleManager guards from cleanup review derek73 Jul 6, 2026 https://github.com/derek73/python-nameparser/pull/246/commits/c95462f9fa0a8f6ddcdccb079cb5e0ca1f581541
Clear filters https://github.com/derek73/python-nameparser/pull/246/files
Please reload this pagehttps://github.com/derek73/python-nameparser/pull/246/files
Please reload this pagehttps://github.com/derek73/python-nameparser/pull/246/files
AGENTS.md https://github.com/derek73/python-nameparser/pull/246/files#diff-a54ff182c7e8acf56acfd6e4b9c3ff41e2c41a31c9b211b2deb9df75d9a478f9
release_log.rst https://github.com/derek73/python-nameparser/pull/246/files#diff-3c065e5059f4ca46ff9ce2471af6f5a86086d0c517b8bc21ed9ef082943b3960
__init__.py https://github.com/derek73/python-nameparser/pull/246/files#diff-dcedfd4bdfcb3874407f561933a63d87851fb7640af137678ee1e18bc02089f7
parser.py https://github.com/derek73/python-nameparser/pull/246/files#diff-03c2f987f4d661012a7843bb797f32bcbbc5126415024e3dfc7255766a95d3fe
test_constants.py https://github.com/derek73/python-nameparser/pull/246/files#diff-85f35f24d7cc70f121d6ec00a1bcaa99af25d74a1621e0a610609fd1c40d7a3e
AGENTS.mdhttps://github.com/derek73/python-nameparser/pull/246/files#diff-a54ff182c7e8acf56acfd6e4b9c3ff41e2c41a31c9b211b2deb9df75d9a478f9
View file https://github.com/derek73/python-nameparser/blob/c95462f9fa0a8f6ddcdccb079cb5e0ca1f581541/AGENTS.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/derek73/python-nameparser/pull/246/{{ revealButtonHref }}
https://github.com/derek73/python-nameparser/pull/246/files#diff-a54ff182c7e8acf56acfd6e4b9c3ff41e2c41a31c9b211b2deb9df75d9a478f9
https://github.com/derek73/python-nameparser/pull/246/files#diff-a54ff182c7e8acf56acfd6e4b9c3ff41e2c41a31c9b211b2deb9df75d9a478f9
https://github.com/derek73/python-nameparser/pull/246/files#diff-a54ff182c7e8acf56acfd6e4b9c3ff41e2c41a31c9b211b2deb9df75d9a478f9
https://github.com/derek73/python-nameparser/pull/246/files#diff-a54ff182c7e8acf56acfd6e4b9c3ff41e2c41a31c9b211b2deb9df75d9a478f9
https://github.com/derek73/python-nameparser/pull/246/files#diff-a54ff182c7e8acf56acfd6e4b9c3ff41e2c41a31c9b211b2deb9df75d9a478f9
docs/release_log.rsthttps://github.com/derek73/python-nameparser/pull/246/files#diff-3c065e5059f4ca46ff9ce2471af6f5a86086d0c517b8bc21ed9ef082943b3960
View file https://github.com/derek73/python-nameparser/blob/c95462f9fa0a8f6ddcdccb079cb5e0ca1f581541/docs/release_log.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/derek73/python-nameparser/pull/246/{{ revealButtonHref }}
https://github.com/derek73/python-nameparser/pull/246/files#diff-3c065e5059f4ca46ff9ce2471af6f5a86086d0c517b8bc21ed9ef082943b3960
Please reload this pagehttps://github.com/derek73/python-nameparser/pull/246/files
Please reload this pagehttps://github.com/derek73/python-nameparser/pull/246/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.