Skip to content

Commit 1379de2

Browse files
authored
Merge branch 'main' into pylock-file-name-priority
2 parents 6616a37 + a86fed2 commit 1379de2

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

source/specifications/glob-patterns.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Valid glob patterns
1515
For PyPA purposes, a *valid glob pattern* MUST be a string matched against
1616
filesystem entries as specified below:
1717

18-
- Alphanumeric characters, underscores (``_``), hyphens (``-``) and dots (``.``)
19-
MUST be matched verbatim.
18+
- Alphanumeric characters, spaces (`` ``), underscores (``_``), hyphens (``-``),
19+
and dots (``.``) MUST be matched verbatim.
2020

2121
- Special glob characters: ``*``, ``?``, ``**`` and character ranges: ``[]``
2222
containing only the verbatim matched characters MUST be supported.
@@ -107,9 +107,15 @@ The code below is as a simple reference implementation:
107107
raise ValueError(
108108
f"Pattern {pattern!r} should be relative and must not start with '/'"
109109
)
110-
if re.match(r'^[\w\-\.\/\*\?\[\]]+$', pattern) is None:
110+
if re.match(r'^[\w \-\.\/\*\?\[\]]+$', pattern) is None:
111111
raise ValueError(f"Pattern '{pattern}' contains invalid characters.")
112112
found = glob(pattern, recursive=True)
113113
if not found:
114114
raise ValueError(f"Pattern '{pattern}' did not match any files.")
115115
return found
116+
117+
History
118+
=======
119+
120+
- January 2025: Initial version
121+
- March 2026: Treat spaces as a verbatim character

source/specifications/pylock-toml/pylock.example.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
lock-version = '1.0'
22
environments = ["sys_platform == 'win32'", "sys_platform == 'linux'"]
3-
requires-python = '== 3.12'
3+
requires-python = '== 3.12.*'
44
created-by = 'mousebender'
55

66
[[packages]]

0 commit comments

Comments
 (0)