Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue32775

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:fnmatch.translate() can produce a pattern which emits a nested set warning
Type:behaviorStage:resolved
Components:Library (Lib)Versions:Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: serhiy.storchakaNosy List: Tim.Graham, serhiy.storchaka
Priority:highKeywords:patch

Created on2018-02-05 20:07 byTim.Graham, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 5583mergedserhiy.storchaka,2018-02-07 17:17
PR 5596mergedmiss-islington,2018-02-09 11:31
Messages (4)
msg311687 -(view)Author: Tim Graham (Tim.Graham)*Date: 2018-02-05 20:07
As discussed inissue30349#msg311684, fnmatch.translate() can produce a pattern which emits a nested set warning:>>> import fnmatch, re>>> re.compile(fnmatch.translate('[[]foo]'))__main__:1: FutureWarning: Possible nested set at position 10re.compile('(?s:\\(.s:[[]foo\\\\\\]\\)\\\\Z)\\Z')
msg311689 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2018-02-05 20:17
It is easy to fix sets starting with '['. It is more hard to fix sets with doubled '-', '&', '|' or '~'.>>> fnmatch.fnmatch('#', '[#--]')/home/serhiy/py/cpython/Lib/fnmatch.py:46: FutureWarning: Possible set difference at position 6  return re.compile(res).matchTrue
msg311878 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2018-02-09 11:30
New changeset23cdbfa744f0ec0e9e7575d378df4cb758691cd3 by Serhiy Storchaka in branch 'master':bpo-32775: Fix regular expression warnings in fnmatch. (#5583)https://github.com/python/cpython/commit/23cdbfa744f0ec0e9e7575d378df4cb758691cd3
msg311881 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2018-02-09 11:56
New changeset0e361730b0954f7560640dd932f00f507e328c45 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7':bpo-32775: Fix regular expression warnings in fnmatch. (GH-5583) (GH-5596)https://github.com/python/cpython/commit/0e361730b0954f7560640dd932f00f507e328c45
History
DateUserActionArgs
2022-04-11 14:58:57adminsetgithub: 76956
2018-02-09 11:57:42serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-02-09 11:56:55serhiy.storchakasetmessages: +msg311881
2018-02-09 11:31:30miss-islingtonsetpull_requests: +pull_request5412
2018-02-09 11:30:22serhiy.storchakasetmessages: +msg311878
2018-02-07 17:17:38serhiy.storchakasetkeywords: +patch
stage: patch review
pull_requests: +pull_request5400
2018-02-05 20:17:37serhiy.storchakasetpriority: normal -> high
assignee:serhiy.storchaka
messages: +msg311689
2018-02-05 20:07:22Tim.Grahamcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp