Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
0bd152cd
Kaydet (Commit)
0bd152cd
authored
Tem 16, 2011
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove ast.__version__ (closes #12273)
üst
e720725c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
44 deletions
+3
-44
ast.rst
Doc/library/ast.rst
+0
-3
ast.py
Lib/ast.py
+0
-1
NEWS
Misc/NEWS
+3
-0
asdl_c.py
Parser/asdl_c.py
+0
-29
Python-ast.c
Python/Python-ast.c
+0
-11
No files found.
Doc/library/ast.rst
Dosyayı görüntüle @
0bd152cd
...
@@ -96,9 +96,6 @@ Node classes
...
@@ -96,9 +96,6 @@ Node classes
Abstract Grammar
Abstract Grammar
----------------
----------------
The module defines a string constant ``__version__`` which is the Mercurial
revision of the file shown below.
The abstract grammar is currently defined as follows:
The abstract grammar is currently defined as follows:
.. literalinclude:: ../../Parser/Python.asdl
.. literalinclude:: ../../Parser/Python.asdl
...
...
Lib/ast.py
Dosyayı görüntüle @
0bd152cd
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
:license: Python License.
:license: Python License.
"""
"""
from
_ast
import
*
from
_ast
import
*
from
_ast
import
__version__
def
parse
(
source
,
filename
=
'<unknown>'
,
mode
=
'exec'
):
def
parse
(
source
,
filename
=
'<unknown>'
,
mode
=
'exec'
):
...
...
Misc/NEWS
Dosyayı görüntüle @
0bd152cd
...
@@ -10,6 +10,9 @@ What's New in Python 3.3 Alpha 1?
...
@@ -10,6 +10,9 @@ What's New in Python 3.3 Alpha 1?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #12273: Remove ast.__version__. AST changes can be accounted for by
checking sys.version_info or sys._mercurial.
- Issue #11627: Fix segfault when __new__ on a exception returns a non-exception
- Issue #11627: Fix segfault when __new__ on a exception returns a non-exception
class.
class.
...
...
Parser/asdl_c.py
Dosyayı görüntüle @
0bd152cd
...
@@ -900,10 +900,6 @@ class ASTModuleVisitor(PickleVisitor):
...
@@ -900,10 +900,6 @@ class ASTModuleVisitor(PickleVisitor):
self
.
emit
(
'if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return NULL;'
,
1
)
self
.
emit
(
'if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return NULL;'
,
1
)
self
.
emit
(
'if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)'
,
1
)
self
.
emit
(
'if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)'
,
1
)
self
.
emit
(
"return NULL;"
,
2
)
self
.
emit
(
"return NULL;"
,
2
)
# Value of version: "$Revision$"
self
.
emit
(
'if (PyModule_AddStringConstant(m, "__version__", "
%
s") < 0)'
%
(
mod
.
version
,),
1
)
self
.
emit
(
"return NULL;"
,
2
)
for
dfn
in
mod
.
dfns
:
for
dfn
in
mod
.
dfns
:
self
.
visit
(
dfn
)
self
.
visit
(
dfn
)
self
.
emit
(
"return m;"
,
1
)
self
.
emit
(
"return m;"
,
1
)
...
@@ -1124,29 +1120,6 @@ class ChainOfVisitors:
...
@@ -1124,29 +1120,6 @@ class ChainOfVisitors:
common_msg
=
"/* File automatically generated by
%
s. */
\n\n
"
common_msg
=
"/* File automatically generated by
%
s. */
\n\n
"
c_file_msg
=
"""
/*
__version__
%
s.
This module must be committed separately after each AST grammar change;
The __version__ number is set to the revision number of the commit
containing the grammar change.
*/
"""
def
get_file_revision
(
f
):
"""Fish out the last change to a file in hg."""
args
=
[
"hg"
,
"log"
,
"--template"
,
"{node|short}"
,
"--limit"
,
"1"
,
f
]
p
=
subprocess
.
Popen
(
args
,
stdout
=
subprocess
.
PIPE
)
out
=
p
.
communicate
()[
0
]
if
p
.
returncode
:
print
>>
sys
.
stderr
,
"error return code from hg"
sys
.
exit
(
1
)
return
out
def
main
(
srcfile
):
def
main
(
srcfile
):
argv0
=
sys
.
argv
[
0
]
argv0
=
sys
.
argv
[
0
]
components
=
argv0
.
split
(
os
.
sep
)
components
=
argv0
.
split
(
os
.
sep
)
...
@@ -1155,7 +1128,6 @@ def main(srcfile):
...
@@ -1155,7 +1128,6 @@ def main(srcfile):
mod
=
asdl
.
parse
(
srcfile
)
mod
=
asdl
.
parse
(
srcfile
)
if
not
asdl
.
check
(
mod
):
if
not
asdl
.
check
(
mod
):
sys
.
exit
(
1
)
sys
.
exit
(
1
)
mod
.
version
=
get_file_revision
(
srcfile
)
if
INC_DIR
:
if
INC_DIR
:
p
=
"
%
s/
%
s-ast.h"
%
(
INC_DIR
,
mod
.
name
)
p
=
"
%
s/
%
s-ast.h"
%
(
INC_DIR
,
mod
.
name
)
f
=
open
(
p
,
"w"
)
f
=
open
(
p
,
"w"
)
...
@@ -1175,7 +1147,6 @@ def main(srcfile):
...
@@ -1175,7 +1147,6 @@ def main(srcfile):
p
=
os
.
path
.
join
(
SRC_DIR
,
str
(
mod
.
name
)
+
"-ast.c"
)
p
=
os
.
path
.
join
(
SRC_DIR
,
str
(
mod
.
name
)
+
"-ast.c"
)
f
=
open
(
p
,
"w"
)
f
=
open
(
p
,
"w"
)
f
.
write
(
auto_gen_msg
)
f
.
write
(
auto_gen_msg
)
f
.
write
(
c_file_msg
%
(
mod
.
version
,))
f
.
write
(
'#include "Python.h"
\n
'
)
f
.
write
(
'#include "Python.h"
\n
'
)
f
.
write
(
'#include "
%
s-ast.h"
\n
'
%
mod
.
name
)
f
.
write
(
'#include "
%
s-ast.h"
\n
'
%
mod
.
name
)
f
.
write
(
'
\n
'
)
f
.
write
(
'
\n
'
)
...
...
Python/Python-ast.c
Dosyayı görüntüle @
0bd152cd
/* File automatically generated by Parser/asdl_c.py. */
/* File automatically generated by Parser/asdl_c.py. */
/*
__version__ e0e663132363.
This module must be committed separately after each AST grammar change;
The __version__ number is set to the revision number of the commit
containing the grammar change.
*/
#include "Python.h"
#include "Python.h"
#include "Python-ast.h"
#include "Python-ast.h"
...
@@ -6750,8 +6741,6 @@ PyInit__ast(void)
...
@@ -6750,8 +6741,6 @@ PyInit__ast(void)
NULL
;
NULL
;
if
(
PyModule_AddIntConstant
(
m
,
"PyCF_ONLY_AST"
,
PyCF_ONLY_AST
)
<
0
)
if
(
PyModule_AddIntConstant
(
m
,
"PyCF_ONLY_AST"
,
PyCF_ONLY_AST
)
<
0
)
return
NULL
;
return
NULL
;
if
(
PyModule_AddStringConstant
(
m
,
"__version__"
,
"e0e663132363"
)
<
0
)
return
NULL
;
if
(
PyDict_SetItemString
(
d
,
"mod"
,
(
PyObject
*
)
mod_type
)
<
0
)
return
if
(
PyDict_SetItemString
(
d
,
"mod"
,
(
PyObject
*
)
mod_type
)
<
0
)
return
NULL
;
NULL
;
if
(
PyDict_SetItemString
(
d
,
"Module"
,
(
PyObject
*
)
Module_type
)
<
0
)
if
(
PyDict_SetItemString
(
d
,
"Module"
,
(
PyObject
*
)
Module_type
)
<
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