Skip to content

Add gss_localname and friends#374

Open
JacobHenner wants to merge 2 commits into
pythongssapi:mainfrom
JacobHenner:feat/gss_localname-and-friends
Open

Add gss_localname and friends#374
JacobHenner wants to merge 2 commits into
pythongssapi:mainfrom
JacobHenner:feat/gss_localname-and-friends

Conversation

@JacobHenner

Copy link
Copy Markdown
  • gss_authorize_localname
  • gss_localname
  • gss_pname_to_uid
  • gss_userok

Fixes #49

* gss_authorize_localname
* gss_localname
* gss_pname_to_uid
* gss_userok

Fixes pythongssapi#49

Signed-off-by: Jacob Henner <code@ventricle.us>
@JacobHenner JacobHenner force-pushed the feat/gss_localname-and-friends branch from 82c3132 to 39b3677 Compare June 18, 2026 20:44
@@ -0,0 +1,93 @@
import typing as t

if t.TYPE_CHECKING:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need this check, I don't think the names and oids files will need to import this ext file and we shouldn't need to use the t.TYPE_CHECKING conditional import.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I was following the pattern I observed in the other ext_*.pyi files within the same directory, but perhaps I've overlooked some other aspect that establishes the necessity for this block. What's the criteria for including/not including?

Comment on lines +84 to +85
if isinstance(username, str):
username = username.encode(_utils._get_encoding())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a benefit to accepting both bytes and str here? I would have thought we would just use bytes but it's been a while since I've looked at what some of the other functions are doing.

Not available on Windows. Include it conditionally to prevent build
errors on Windows.

Signed-off-by: Jacob Henner <code@ventricle.us>
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.

Implement gss_localname and friends

2 participants