Mercurial > cpython-lru_cache-weakref
annotate Lib/sre.py @ 79675:c0a2294de787 2.7
Issue #16199: Backport 2to3 typo fix from 3.2.
| author | Chris Jerdonek <chris.jerdonek@gmail.com> |
|---|---|
| date | Thu, 11 Oct 2012 16:15:46 -0700 |
| parents | ccc447a6d916 |
| children |
| rev | line source |
|---|---|
|
37019
7dad83ca702d
Spel compatibility write.
Neal Norwitz <nnorwitz@gmail.com>
parents:
37018
diff
changeset
|
1 """This file is only retained for backwards compatibility. |
|
37018
85eaf0ca64f2
Add back an sre.py that should be backwards compatible except for the warning.
Neal Norwitz <nnorwitz@gmail.com>
parents:
diff
changeset
|
2 It will be removed in the future. sre was moved to re in version 2.5. |
|
85eaf0ca64f2
Add back an sre.py that should be backwards compatible except for the warning.
Neal Norwitz <nnorwitz@gmail.com>
parents:
diff
changeset
|
3 """ |
|
85eaf0ca64f2
Add back an sre.py that should be backwards compatible except for the warning.
Neal Norwitz <nnorwitz@gmail.com>
parents:
diff
changeset
|
4 |
|
85eaf0ca64f2
Add back an sre.py that should be backwards compatible except for the warning.
Neal Norwitz <nnorwitz@gmail.com>
parents:
diff
changeset
|
5 import warnings |
|
85eaf0ca64f2
Add back an sre.py that should be backwards compatible except for the warning.
Neal Norwitz <nnorwitz@gmail.com>
parents:
diff
changeset
|
6 warnings.warn("The sre module is deprecated, please import re.", |
|
85eaf0ca64f2
Add back an sre.py that should be backwards compatible except for the warning.
Neal Norwitz <nnorwitz@gmail.com>
parents:
diff
changeset
|
7 DeprecationWarning, 2) |
|
85eaf0ca64f2
Add back an sre.py that should be backwards compatible except for the warning.
Neal Norwitz <nnorwitz@gmail.com>
parents:
diff
changeset
|
8 |
|
85eaf0ca64f2
Add back an sre.py that should be backwards compatible except for the warning.
Neal Norwitz <nnorwitz@gmail.com>
parents:
diff
changeset
|
9 from re import * |
|
85eaf0ca64f2
Add back an sre.py that should be backwards compatible except for the warning.
Neal Norwitz <nnorwitz@gmail.com>
parents:
diff
changeset
|
10 from re import __all__ |
|
41268
ccc447a6d916
Bug #1675967: re patterns pickled with older Python versions can
Žiga Seilnacht <ziga.seilnacht@gmail.com>
parents:
37019
diff
changeset
|
11 |
|
ccc447a6d916
Bug #1675967: re patterns pickled with older Python versions can
Žiga Seilnacht <ziga.seilnacht@gmail.com>
parents:
37019
diff
changeset
|
12 # old pickles expect the _compile() reconstructor in this module |
|
ccc447a6d916
Bug #1675967: re patterns pickled with older Python versions can
Žiga Seilnacht <ziga.seilnacht@gmail.com>
parents:
37019
diff
changeset
|
13 from re import _compile |
