You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Merge branch 'master' into python-2.4
This commit is contained in:
@@ -2,17 +2,17 @@
|
|||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
|
|
||||||
- [Get latest sources:](#get-latest-sources)
|
- [Get latest sources:](#get-latest-sources)
|
||||||
- [Change version in uncompyle6/version.py](#change-version-in-uncompyle6versionpy)
|
- [Change version in uncompyle6/version.py:](#change-version-in-uncompyle6versionpy)
|
||||||
- [Update ChangeLog:](#update-changelog)
|
- [Update ChangeLog:](#update-changelog)
|
||||||
- [Update NEWS from ChangeLog:](#update-news-from-changelog)
|
- [Update NEWS.md from ChangeLog:](#update-newsmd-from-changelog)
|
||||||
- [Make sure pyenv is running and check newer versions](#make-sure-pyenv-is-running-and-check-newer-versions)
|
- [Make sure pyenv is running and check newer versions](#make-sure-pyenv-is-running-and-check-newer-versions)
|
||||||
- [Switch to python-2.4, sync that up and build that first since it creates a tarball which we don't want.](#switch-to-python-24-sync-that-up-and-build-that-first-since-it-creates-a-tarball-which-we-dont-want)
|
- [Switch to python-2.4, sync that up and build that first since it creates a tarball which we don't want.](#switch-to-python-24-sync-that-up-and-build-that-first-since-it-creates-a-tarball-which-we-dont-want)
|
||||||
- [Update NEWS from master branch](#update-news-from-master-branch)
|
- [Check against older versions](#check-against-older-versions)
|
||||||
- [Check against all versions](#check-against-all-versions)
|
|
||||||
- [Make packages and tag](#make-packages-and-tag)
|
- [Make packages and tag](#make-packages-and-tag)
|
||||||
- [Upload single package and look at Rst Formating](#upload-single-package-and-look-at-rst-formating)
|
- [Check package on github](#check-package-on-github)
|
||||||
- [Upload rest of versions](#upload-rest-of-versions)
|
- [Release on Github](#release-on-github)
|
||||||
- [Push tags:](#push-tags)
|
- [Get onto PyPI](#get-onto-pypi)
|
||||||
|
- [Update tags:](#update-tags)
|
||||||
|
|
||||||
<!-- markdown-toc end -->
|
<!-- markdown-toc end -->
|
||||||
# Get latest sources:
|
# Get latest sources:
|
||||||
@@ -60,27 +60,36 @@
|
|||||||
$ git tag release-python-2.4-$VERSION
|
$ git tag release-python-2.4-$VERSION
|
||||||
$ . ./admin-tools/make-dist-newer.sh
|
$ . ./admin-tools/make-dist-newer.sh
|
||||||
|
|
||||||
# Upload single package and look at Rst Formating
|
# Check package on github
|
||||||
|
|
||||||
$ twine check dist/uncompyle6-${VERSION}*
|
$ mkdir /tmp/gittest; pushd /tmp/gittest
|
||||||
$ twine upload dist/uncompyle6-${VERSION}-py3.3.egg
|
$ pyenv local 3.7.5
|
||||||
|
$ pip install -e git://github.com/rocky/python-uncompyle6.git#egg=uncompyle6
|
||||||
|
$ uncompyle6 --help
|
||||||
|
$ pip uninstall uncompyle6
|
||||||
|
$ popd
|
||||||
|
|
||||||
# Upload rest of versions
|
# Release on Github
|
||||||
|
|
||||||
$ twine upload dist/uncompyle6-${VERSION}*
|
|
||||||
|
|
||||||
Goto https://github.com/rocky/python-uncompyle6/releases
|
Goto https://github.com/rocky/python-uncompyle6/releases
|
||||||
|
|
||||||
# Push tags:
|
Now check the *tagged* release. (Checking the untagged release was previously done).
|
||||||
|
|
||||||
|
Todo: turn this into a script in `admin-tools`
|
||||||
|
|
||||||
|
$ pushd /tmp/gittest
|
||||||
|
$ pip install -e git://github.com/rocky/python-uncompyle6.git@$VERSION#egg=uncompyle6
|
||||||
|
$ uncompyle6 --help
|
||||||
|
$ pip uninstall uncompyle6
|
||||||
|
$ popd
|
||||||
|
|
||||||
|
|
||||||
|
# Get onto PyPI
|
||||||
|
|
||||||
|
$ twine upload dist/uncompyle6-${VERSION}*
|
||||||
|
|
||||||
|
|
||||||
|
# Update tags:
|
||||||
|
|
||||||
$ git push --tags
|
$ git push --tags
|
||||||
|
$ git pull --tags
|
||||||
# Check on a VM
|
|
||||||
|
|
||||||
$ cd /virtual/vagrant/virtual/vagrant/ubuntu-zesty
|
|
||||||
$ vagrant up
|
|
||||||
$ vagrant ssh
|
|
||||||
$ pyenv local 3.5.2
|
|
||||||
$ pip install --upgrade uncompyle6
|
|
||||||
$ exit
|
|
||||||
$ vagrant halt
|
|
||||||
|
@@ -50,7 +50,7 @@ for VERSION in $PYVERSIONS ; do
|
|||||||
LOGFILE=/tmp/${MAIN}-$VERSION-$$.log
|
LOGFILE=/tmp/${MAIN}-$VERSION-$$.log
|
||||||
|
|
||||||
case "$VERSION" in
|
case "$VERSION" in
|
||||||
3.7.7 | 3.8.2 | 3.1.5 | 3.0.1 )
|
3.7.7 | 3.8.3 | 3.1.5 | 3.0.1 )
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
3.5.9 )
|
3.5.9 )
|
||||||
|
@@ -63,6 +63,7 @@ SKIP_TESTS=(
|
|||||||
|
|
||||||
[test_faulthandler.py]=1 # test takes too long before decompiling
|
[test_faulthandler.py]=1 # test takes too long before decompiling
|
||||||
[test_fileinput.py]=1 # Test assertion failures
|
[test_fileinput.py]=1 # Test assertion failures
|
||||||
|
[test_finalization.py]=1 # if/else logic
|
||||||
[test_frame.py]=1 # test assertion errors
|
[test_frame.py]=1 # test assertion errors
|
||||||
[test_ftplib.py]=1 # parse error
|
[test_ftplib.py]=1 # parse error
|
||||||
[test_fstring.py]=1 # need to disambiguate leading fstrings from docstrings
|
[test_fstring.py]=1 # need to disambiguate leading fstrings from docstrings
|
||||||
|
@@ -44,6 +44,7 @@ class Python38Parser(Python37Parser):
|
|||||||
stmt ::= try_elsestmtl38
|
stmt ::= try_elsestmtl38
|
||||||
stmt ::= try_except_ret38
|
stmt ::= try_except_ret38
|
||||||
stmt ::= try_except38
|
stmt ::= try_except38
|
||||||
|
stmt ::= try_except_as
|
||||||
stmt ::= whilestmt38
|
stmt ::= whilestmt38
|
||||||
stmt ::= whileTruestmt38
|
stmt ::= whileTruestmt38
|
||||||
stmt ::= call_stmt
|
stmt ::= call_stmt
|
||||||
@@ -132,6 +133,8 @@ class Python38Parser(Python37Parser):
|
|||||||
except_cond1 ::= DUP_TOP expr COMPARE_OP jmp_false
|
except_cond1 ::= DUP_TOP expr COMPARE_OP jmp_false
|
||||||
POP_TOP POP_TOP POP_TOP
|
POP_TOP POP_TOP POP_TOP
|
||||||
POP_EXCEPT
|
POP_EXCEPT
|
||||||
|
except_cond_as ::= DUP_TOP expr COMPARE_OP POP_JUMP_IF_FALSE
|
||||||
|
POP_TOP STORE_FAST POP_TOP
|
||||||
|
|
||||||
try_elsestmtl38 ::= SETUP_FINALLY suite_stmts_opt POP_BLOCK
|
try_elsestmtl38 ::= SETUP_FINALLY suite_stmts_opt POP_BLOCK
|
||||||
except_handler38 COME_FROM
|
except_handler38 COME_FROM
|
||||||
@@ -144,6 +147,10 @@ class Python38Parser(Python37Parser):
|
|||||||
# suite_stmts has a return
|
# suite_stmts has a return
|
||||||
try_except38 ::= SETUP_FINALLY POP_BLOCK suite_stmts
|
try_except38 ::= SETUP_FINALLY POP_BLOCK suite_stmts
|
||||||
except_handler38b
|
except_handler38b
|
||||||
|
try_except_as ::= SETUP_FINALLY POP_BLOCK suite_stmts
|
||||||
|
except_handler_as END_FINALLY COME_FROM
|
||||||
|
try_except_as ::= SETUP_FINALLY suite_stmts
|
||||||
|
except_handler_as END_FINALLY COME_FROM
|
||||||
|
|
||||||
try_except_ret38 ::= SETUP_FINALLY returns except_ret38a
|
try_except_ret38 ::= SETUP_FINALLY returns except_ret38a
|
||||||
try_except_ret38a ::= SETUP_FINALLY returns except_handler38c
|
try_except_ret38a ::= SETUP_FINALLY returns except_handler38c
|
||||||
@@ -164,6 +171,11 @@ class Python38Parser(Python37Parser):
|
|||||||
except_handler38a ::= COME_FROM_FINALLY POP_TOP POP_TOP POP_TOP
|
except_handler38a ::= COME_FROM_FINALLY POP_TOP POP_TOP POP_TOP
|
||||||
POP_EXCEPT POP_TOP stmts END_FINALLY
|
POP_EXCEPT POP_TOP stmts END_FINALLY
|
||||||
|
|
||||||
|
except_handler38c ::= COME_FROM_FINALLY except_cond1a except_stmts
|
||||||
|
POP_EXCEPT JUMP_FORWARD COME_FROM
|
||||||
|
except_handler_as ::= COME_FROM_FINALLY except_cond_as tryfinallystmt
|
||||||
|
POP_EXCEPT JUMP_FORWARD COME_FROM
|
||||||
|
|
||||||
tryfinallystmt ::= SETUP_FINALLY suite_stmts_opt POP_BLOCK
|
tryfinallystmt ::= SETUP_FINALLY suite_stmts_opt POP_BLOCK
|
||||||
BEGIN_FINALLY COME_FROM_FINALLY suite_stmts_opt
|
BEGIN_FINALLY COME_FROM_FINALLY suite_stmts_opt
|
||||||
END_FINALLY
|
END_FINALLY
|
||||||
|
@@ -50,12 +50,24 @@ def customize_for_version38(self, version):
|
|||||||
"%|%c\n", 0
|
"%|%c\n", 0
|
||||||
),
|
),
|
||||||
|
|
||||||
|
"except_cond_as": (
|
||||||
|
"%|except %c as %c:\n",
|
||||||
|
(1, "expr"),
|
||||||
|
(-2, "STORE_FAST"),
|
||||||
|
),
|
||||||
|
|
||||||
'except_handler38': (
|
'except_handler38': (
|
||||||
'%c', (2, 'except_stmts') ),
|
'%c', (2, 'except_stmts') ),
|
||||||
|
|
||||||
'except_handler38a': (
|
'except_handler38a': (
|
||||||
'%c', (-2, 'stmts') ),
|
'%c', (-2, 'stmts') ),
|
||||||
|
|
||||||
|
"except_handler_as": (
|
||||||
|
"%c%+\n%+%c%-",
|
||||||
|
(1, "except_cond_as"),
|
||||||
|
(2, "tryfinallystmt"),
|
||||||
|
),
|
||||||
|
|
||||||
'except_ret38a': (
|
'except_ret38a': (
|
||||||
'return %c', (4, 'expr') ),
|
'return %c', (4, 'expr') ),
|
||||||
|
|
||||||
@@ -105,6 +117,13 @@ def customize_for_version38(self, version):
|
|||||||
'try_except38': (
|
'try_except38': (
|
||||||
'%|try:\n%+%c\n%-%|except:\n%|%-%c\n\n',
|
'%|try:\n%+%c\n%-%|except:\n%|%-%c\n\n',
|
||||||
(-2, 'suite_stmts_opt'), (-1, 'except_handler38a') ),
|
(-2, 'suite_stmts_opt'), (-1, 'except_handler38a') ),
|
||||||
|
|
||||||
|
"try_except_as": (
|
||||||
|
"%|try:\n%+%c%-\n%|%-%c\n\n",
|
||||||
|
(-4, "suite_stmts"), # Go from the end because of POP_BLOCK variation
|
||||||
|
(-3, "except_handler_as"),
|
||||||
|
),
|
||||||
|
|
||||||
"try_except_ret38": (
|
"try_except_ret38": (
|
||||||
"%|try:\n%+%c%-\n%|except:\n%+%|%c%-\n\n",
|
"%|try:\n%+%c%-\n%|except:\n%+%|%c%-\n\n",
|
||||||
(1, "returns"),
|
(1, "returns"),
|
||||||
|
Reference in New Issue
Block a user