Skip to content

GH-116380: Add tests for glob.glob0() and glob.glob1(). - #117305

Closed
barneygale wants to merge 1 commit into
python:mainfrom
barneygale:gh-116380-glob0-glob1-tests
Closed

GH-116380: Add tests for glob.glob0() and glob.glob1().#117305
barneygale wants to merge 1 commit into
python:mainfrom
barneygale:gh-116380-glob0-glob1-tests

Conversation

@barneygale

@barneygalebarneygale commented Mar 27, 2024

Copy link
Copy Markdown
Contributor

These undocumented functions expand a single literal or (non-recursive) wildcard segment.

These undocumented functions expand a single literal or (non-recursive)
wildcard segment.
@serhiy-storchaka

Copy link
Copy Markdown
Member

They are undocumented and no longer used in the stdlib. glob.escape() and the root_dir parameter make them obsolete.

@barneygale

Copy link
Copy Markdown
ContributorAuthor

Indeed. But they're used by third-party code, and neither deprecated nor underscore-prefixed.

@serhiy-storchaka

Copy link
Copy Markdown
Member

They are not underscored because this is not needed.

Opened #117337.

@barneygale

Copy link
Copy Markdown
ContributorAuthor

Does deprecating these functions preclude the addition of tests in your view?

@serhiy-storchaka

Copy link
Copy Markdown
Member

The new tests LGTM. Some tests will be needed for deprecation anyway. But all tests added in this PR will be changed, and maybe moved to other place. This will only increase the size of the logs.

Would you mind creating a PR to deprecate these functions, along with adding new tests? Or do you prefer merging this PR first?

@barneygale

Copy link
Copy Markdown
ContributorAuthor

Good shout. I've opened #117371 to deprecate the functions, and incorporated the tests there. I'll close this PR!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core reviewskip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@barneygale@serhiy-storchaka