Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue30215

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:Make re.compile() locale agnostic
Type:behaviorStage:resolved
Components:Extension Modules, Library (Lib), Regular ExpressionsVersions:Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: serhiy.storchakaNosy List: ezio.melotti, mrabarnett, serhiy.storchaka
Priority:normalKeywords:

Created on2017-04-30 05:21 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 1361mergedserhiy.storchaka,2017-04-30 05:37
Messages (3)
msg292618 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2017-04-30 05:21
Currently the result of re.compile() with the re.LOCALE flag depends on the locale at compile time.  The locale at matching time should be the same as the locale at compile time, otherwise the matching can work incorrectly. This complicates caching in module global functions and increase the chance of race condition.Proposed patch makes re.compile() not depending on locale. Only the locale at matching time affects the result of matching.This is more comprehensive solution ofissue22410.
msg292970 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2017-05-04 09:23
This change can be considered as a bug fix, but I hesitate to apply it to maintained releases because the effect on the performance of case-sensitive locale-depending bytes matching is hardly predicable. Some matches become 5 times faster, others become 1.5 times slower, depending on the cases of the pattern and the matched bytestring.
msg293044 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2017-05-05 05:53
New changeset898ff03e1e7925ecde3da66327d3cdc7e07625ba by Serhiy Storchaka in branch 'master':bpo-30215: Make re.compile() locale agnostic. (#1361)https://github.com/python/cpython/commit/898ff03e1e7925ecde3da66327d3cdc7e07625ba
History
DateUserActionArgs
2022-04-11 14:58:45adminsetgithub: 74401
2017-05-05 06:42:44serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-05-05 05:53:42serhiy.storchakasetmessages: +msg293044
2017-05-04 09:23:25serhiy.storchakasetmessages: +msg292970
2017-05-04 05:51:55serhiy.storchakasetassignee:serhiy.storchaka
2017-04-30 05:37:20serhiy.storchakasetpull_requests: +pull_request1471
2017-04-30 05:21:39serhiy.storchakacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp