Visitar URL original
bpo-32911: Remove the docstring attribute of AST types by serhiy-storchaka · Pull Request #7121 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a news entry and bump a magic number.
  • Loading branch information
serhiy-storchaka committed May 28, 2018
commit eba9f13128816c8fea9a90365466ca383ea3ee38
4 changes: 3 additions & 1 deletion Lib/importlib/_bootstrap_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ def _write_atomic(path, data, mode=0o666):
# Python 3.7a2 3391 (update GET_AITER #31709)
# Python 3.7a4 3392 (PEP 552: Deterministic pycs #31650)
# Python 3.7b1 3393 (remove STORE_ANNOTATION opcode #32550)
# Python 3.7rc1 3394 (restored docstring as the firts stmt in the body;
# this might affected the first line number #32911)
#
# MAGIC must change whenever the bytecode emitted by the compiler may no
# longer be understood by older implementations of the eval loop (usually
Expand All @@ -254,7 +256,7 @@ def _write_atomic(path, data, mode=0o666):
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.

MAGIC_NUMBER = (3393).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3394).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c

_PYCACHE = '__pycache__'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Reverted :issue:`29463`. ``docstring`` field is removed from Module, ClassDef,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should say why we are doing this. Perhaps start the entry with:
"Due to unexpected compatibility issues discovered during downstream beta testing, reverted ... "

FunctionDef, and AsyncFunctionDef ast nodes which is added in 3.7a1. Docstring

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"which was added"

expression is restored as a first statement in their body. Based on patch by
Inada Naoki.
Loading