This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Change in re.escape output is not documented in 3.7 whatsnew
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, ezio.melotti, mrabarnett, ned.deily, r.david.murray, serhiy.storchaka, wumpus
Priority: normal Keywords: patch

Created on 2017-04-23 18:39 by wumpus, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5978 merged cheryl.sabella, 2018-03-04 22:46
PR 5979 merged miss-islington, 2018-03-04 23:07
Messages (5)
msg292177 - (view) Author: Greg Lindahl (wumpus) Date: 2017-04-23 18:39
The following script runs fine in python 3.6 and recently started failing the assertion in 3.7-dev and nightly

import re

r = re.compile(re.escape('/foo'))
print(r)
print(r.pattern)
assert r.pattern.startswith('\\/')
msg292179 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-04-23 19:10
re.escape was escaping too much previously, and this has been fixed in 3.7 (and only 3.7, because it may cause testing issues such as you have observed).  See issue 29995.

A note needs to be added to the 'porting' section of whats new covering this.
msg313226 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-03-04 23:06
New changeset 18fd89246333bfa1b76c1623df689214f3ce2bf3 by Ned Deily (Cheryl Sabella) in branch 'master':
bpo-30147: Add re.escape changes to 3.7 What's New (GH-5978)
https://github.com/python/cpython/commit/18fd89246333bfa1b76c1623df689214f3ce2bf3
msg313227 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-03-04 23:22
New changeset f92478d57a6b4014dcc0882d43b534fae1e7b929 by Ned Deily (Miss Islington (bot)) in branch '3.7':
[3.7] bpo-30147: Add re.escape changes to 3.7 What's New (GH-5978) (GH-5979)
https://github.com/python/cpython/commit/f92478d57a6b4014dcc0882d43b534fae1e7b929
msg313228 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-03-04 23:24
Thanks, @csabella, for the PR!
History
Date User Action Args
2022-04-11 14:58:45adminsetgithub: 74333
2018-03-04 23:24:40ned.deilysetstatus: open -> closed
versions: + Python 3.8
title: Change in re.escape output is not documented in whatsnew -> Change in re.escape output is not documented in 3.7 whatsnew
messages: + msg313228

resolution: fixed
stage: patch review -> resolved
2018-03-04 23:22:35ned.deilysetmessages: + msg313227
2018-03-04 23:07:10miss-islingtonsetpull_requests: + pull_request5745
2018-03-04 23:06:59ned.deilysetnosy: + ned.deily
messages: + msg313226
2018-03-04 22:46:42cheryl.sabellasetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request5744
2017-04-23 19:39:06serhiy.storchakasettitle: change in re.escape output is not docuented in whatsnew -> Change in re.escape output is not documented in whatsnew
2017-04-23 19:10:05r.david.murraysetassignee: docs@python
type: behavior
components: + Documentation, - Regular Expressions
title: change in interface for compiled regex.pattern -> change in re.escape output is not docuented in whatsnew
nosy: + serhiy.storchaka, r.david.murray, docs@python

messages: + msg292179
stage: needs patch
2017-04-23 18:39:56wumpuscreate