Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6192df10
Commit
6192df10
authored
May 10, 2008
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate the compiler package for removal in 3.0.
parent
af878048
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
2 deletions
+11
-2
Doc/library/compiler.rst
Doc/library/compiler.rst
+4
-0
Lib/compiler/__init__.py
Lib/compiler/__init__.py
+3
-0
Lib/test/test_compiler.py
Lib/test/test_compiler.py
+2
-2
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/compiler.rst
View file @
6192df10
...
...
@@ -5,6 +5,9 @@
Python compiler package
***********************
.. deprecated:: 2.6
The compiler package has been removed in Python 3.0.
.. sectionauthor:: Jeremy Hylton <jeremy@zope.com>
...
...
@@ -34,6 +37,7 @@ The basic interface
.. module:: compiler
:synopsis: Python code compiler written in Python.
:deprecated:
The top-level of the package defines four functions. If you import
...
...
Lib/compiler/__init__.py
View file @
6192df10
...
...
@@ -20,6 +20,9 @@ compile(source, filename, mode, flags=None, dont_inherit=None)
compileFile(filename)
Generates a .pyc file by compiling filename.
"""
from
warnings
import
warnpy3k
warnpy3k
(
"the compiler package has been removed in Python 3.0"
,
stacklevel
=
2
)
del
warnpy3k
from
compiler.transformer
import
parse
,
parseFile
from
compiler.visitor
import
walk
...
...
Lib/test/test_compiler.py
View file @
6192df10
import
compiler
import
test.test_support
compiler
=
test
.
test_support
.
import_module
(
'compiler'
,
deprecated
=
True
)
from
compiler.ast
import
flatten
import
os
,
sys
,
time
,
unittest
import
test.test_support
from
random
import
random
from
StringIO
import
StringIO
...
...
Misc/NEWS
View file @
6192df10
...
...
@@ -23,6 +23,8 @@ Extension Modules
Library
-------
- The compiler package has been deprecated for removal in Python 3.0.
- The Bastion and rexec modules have been deprecated for removal in Python 3.0.
- The bsddb185 module has been deprecated for removal in Python 3.0.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment