Skip to content

Commit 02263bd

Browse files
authored
wcmatch will not allow EXTGLOB (#9)
* wcmatch will not allow EXTGLOB * Proper Python 3.7 testing * Fix travis * Need sudo for Python 3.7
1 parent 42ed85a commit 02263bd

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ matrix:
1414
env: TOXENV=py35
1515
- python: 3.6
1616
env: TOXENV=py36
17-
- python: 3.7-dev
17+
- python: 3.7
18+
dist: xenial
1819
env: TOXENV=py37
20+
sudo: true
1921
- python: 3.6
2022
env: TOXENV=lint
2123
- python: 3.6

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ environment:
77
TOXENV: "py35"
88
- PYTHON: "C:/Python36"
99
TOXENV: "py36"
10+
- PYTHON: "C:/Python37"
11+
TOXENV: "py37"
1012
- PYTHON: "C:/Python36"
1113
TOXENV: "lint"
1214
init:

docs/src/markdown/changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- **NEW**: Glob's `DOTGLOB` and `EXTGLOB` also have the respective aliases `DOTMATCH` and `EXTMATCH` to provide consistent flags across provided libraries, but the `GLOB` variants that match Bash's feature names can still be used.
1010
- **NEW**: Fnmatch's `PERIOD` flag has been replaced with `DOTMATCH` with inverted logic from what was originally provided.
1111
- **NEW**: Documentation exposes the shorthand form of flags: `FORCECASE` --> `F`, etc.
12-
- **FIX**: Wcmatch always documented that it had the flag named `EXTMATCH`, but internally it was actually `EXTGLOB`, this was a bug though. To prevent breakage, `EXTGLOB` will still be accepted up to version 3.0.0, but should be considered deprecated.
12+
- **FIX**: Wcmatch always documented that it had the flag named `EXTMATCH`, but internally it was actually `EXTGLOB`, this was a bug though. `EXTMATCH` is now the documented and the actual flag to use.
1313

1414
## 1.0.2
1515

docs/src/markdown/wcmatch.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,6 @@ On match returns the path of the matched file. You can override `on_match` and
234234

235235
`EXTMATCH` enables extended pattern matching which includes special pattern lists such as `+(...)`, `*(...)`, `?(...)`, etc.
236236

237-
!!! warning "2.0.0 Deprecation"
238-
`EXTGLOB` flag has been deprecated in favor of `EXTMATCH`. `EXTGLOB` was never meant to be the name of the flag in wcmatch, but due to mistake it was the default flag despite the fact that the documentation expressed that `EXTMATCH` was the flag. `EXTGLOB` will be removed in version 3.0.0, so please discontinue use of `EXTGLOB` moving forward.
239-
240-
Unfortunately, no warnings will be shown due to the difficulty of raising a warning on a flag name.
241-
242237
#### wcmatch.BRACE, wcmatch.B {: #wcmatchbrace}
243238

244239
`BRACE` enables Bash style brace expansion: `a{b,{c,d}}` --> `ab ac ad`. Brace expansion is applied before anything else. When applied, a pattern will be expanded into multiple patterns. Each pattern will then be parsed separately.

wcmatch/wcmatch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828

2929
__all__ = (
3030
"FORCECASE", "IGNORECASE", "RAWCHARS", "FILEPATHNAME", "DIRPATHNAME",
31-
"EXTGLOB", "EXTMATCH", "GLOBSTAR", "BRACE", "MINUSNEGATE",
31+
"EXTMATCH", "GLOBSTAR", "BRACE", "MINUSNEGATE",
3232
"F", "I", "R", "P", "E", "G", "M", "DP", "FP",
3333
"WcMatch"
3434
)
3535

3636
F = FORCECASE = _wcparse.FORCECASE
3737
I = IGNORECASE = _wcparse.IGNORECASE
3838
R = RAWCHARS = _wcparse.RAWCHARS
39-
E = EXTGLOB = EXTMATCH = _wcparse.EXTMATCH # EXTGLOB is deprecated
39+
E = EXTMATCH = _wcparse.EXTMATCH
4040
G = GLOBSTAR = _wcparse.GLOBSTAR
4141
B = BRACE = _wcparse.BRACE
4242
M = MINUSNEGATE = _wcparse.MINUSNEGATE

0 commit comments

Comments
 (0)