Skip to content

bpo-43372: Re-generate frozen code for __hello__. #24708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ jobs:
- name: Build CPython
run: |
# Build Python with the libpython dynamic library
./configure --with-pydebug --enable-shared
make -j4 regen-all
make regen-stdlib-module-names
./configure --with-pydebug --enable-shared PYTHON_FOR_REGEN=./python
make -j4
LD_LIBRARY_PATH=. make -j4 regen-all
LD_LIBRARY_PATH=. make regen-stdlib-module-names
- name: Check for changes
run: |
changes=$(git status --porcelain)
Expand Down
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,9 @@ install:
# Travis provides only 2 cores, so don't overdo the parallelism and waste memory.
before_script:
# -Og is much faster than -O0
- CFLAGS="${CFLAGS} -Og" ./configure --with-pydebug
- eval "$(pyenv init -)"
- pyenv global 3.8
- PYTHON_FOR_REGEN=python3.8 make -j4 regen-all
- CFLAGS="${CFLAGS} -Og" ./configure --with-pydebug PYTHON_FOR_REGEN=./python
- make -j4
- make -j4 regen-all
- make regen-stdlib-module-names
- changes=`git status --porcelain`
- |
Expand All @@ -182,7 +181,6 @@ before_script:
echo "$changes"
exit 1
fi
- make -j4
- make pythoninfo

script:
Expand Down
6 changes: 3 additions & 3 deletions Lib/ctypes/test/test_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ class struct_frozen(Structure):
continue
items.append((entry.name.decode("ascii"), entry.size))

expected = [("__hello__", 125),
("__phello__", -125),
("__phello__.spam", 125),
expected = [("__hello__", 129),
("__phello__", -129),
("__phello__.spam", 129),
]
self.assertEqual(items, expected, "PyImport_FrozenModules example "
"in Doc/library/ctypes.rst may be out of date")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Re-generate frozen code for ``__hello__`` using an up-to-date Python. The
marshal format for code objects has changed with bpo-42246, commit 877df851.
Update expected code sizes in ctypes test_frozentable.
2 changes: 1 addition & 1 deletion Python/frozen_hello.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ static unsigned char M___hello__[] = {
100,218,5,112,114,105,110,116,169,0,114,2,0,
0,0,114,2,0,0,0,218,4,110,111,110,101,
218,8,60,109,111,100,117,108,101,62,1,0,0,
0,115,2,0,0,0,4,1,
0,115,6,0,0,0,4,0,12,1,255,128,
};