You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
Compare commits
775 Commits
3.9.1
...
release-py
Author | SHA1 | Date | |
---|---|---|---|
|
aa1e6a7567 | ||
|
9e2ba8f01d | ||
|
3ea0d67be9 | ||
|
f41a16b7e9 | ||
|
6ba779b915 | ||
|
c07814538c | ||
|
2b9887ce9b | ||
|
86ba02d5f2 | ||
|
7e362a8635 | ||
|
d42fee1b50 | ||
|
54e9de4a7d | ||
|
e0aa4e9fad | ||
|
f8798945ab | ||
|
c1a5d3ce8d | ||
|
a941326a30 | ||
|
555fbe81da | ||
|
bef6ba7445 | ||
|
5b36e45805 | ||
|
a774cc1892 | ||
|
e03274c78c | ||
|
c2ed6776e6 | ||
|
5ff3a54ed7 | ||
|
1323500a76 | ||
|
9923a4c775 | ||
|
69c5954815 | ||
|
d14365766f | ||
|
dd20a38412 | ||
|
b83bcb871a | ||
|
076a40c06d | ||
|
504845668c | ||
|
375101d960 | ||
|
2a393a408b | ||
|
e596fb0917 | ||
|
2f3ffd5044 | ||
|
0ce23288cb | ||
|
8776657302 | ||
|
1ecceb6471 | ||
|
8c60166cf6 | ||
|
7d1b306b10 | ||
|
7cf4e31101 | ||
|
7ce05a1934 | ||
|
b89409a6d0 | ||
|
61784c4f43 | ||
|
f926acf7f1 | ||
|
291b8e0f90 | ||
|
a49f21bb1c | ||
|
68c646f1bb | ||
|
28bd433c9a | ||
|
3fcdc323f5 | ||
|
e1f41b724e | ||
|
6aa0725bae | ||
|
c37301b02b | ||
|
2fc80fc747 | ||
|
eaa063a15f | ||
|
83bf645535 | ||
|
43ed4f249e | ||
|
a173f27e7c | ||
|
e4e9cb2758 | ||
|
55368c8b29 | ||
|
17300f631f | ||
|
3b3ff705f9 | ||
|
dabc57a1fd | ||
|
a59e9c1aa8 | ||
|
4789ae0d94 | ||
|
66fe00ffb6 | ||
|
8483a5102b | ||
|
507a754616 | ||
|
6daca33443 | ||
|
930d03ab07 | ||
|
0ca5866ec7 | ||
|
d03a4235df | ||
|
7a4df3226e | ||
|
32114b5550 | ||
|
697d765a43 | ||
|
b512b20b56 | ||
|
175821f9d5 | ||
|
a99f0e51ab | ||
|
50f6625cd1 | ||
|
14fe8c5356 | ||
|
0ca2eca32f | ||
|
4096d310e4 | ||
|
5c6c6c663d | ||
|
8f09437537 | ||
|
d89153f910 | ||
|
c504bb2491 | ||
|
540f619745 | ||
|
4b9b3f27f9 | ||
|
550273d117 | ||
|
b8cc1be32b | ||
|
a040439f48 | ||
|
5f48a8bf2f | ||
|
0170e39f5d | ||
|
b8856993d2 | ||
|
4f6d3a3d7e | ||
|
fa62724f14 | ||
|
5220aa3b65 | ||
|
c8b94cf48f | ||
|
5268796134 | ||
|
e930c9c6ef | ||
|
a2780bc1c2 | ||
|
9fe3f94240 | ||
|
3471d11dd5 | ||
|
2a0a6c904c | ||
|
2d6f31df97 | ||
|
e5d82f7613 | ||
|
d8d8ed60d7 | ||
|
0f525c142d | ||
|
ee4d166e71 | ||
|
4be5c89efb | ||
|
7720c8aa10 | ||
|
003ad0ceef | ||
|
484ded7635 | ||
|
cdacc9770e | ||
|
aff0cd4baa | ||
|
a3c1943806 | ||
|
dd98eb8764 | ||
|
7ef3284f17 | ||
|
ee439540da | ||
|
5b2db856ec | ||
|
ae68f1823d | ||
|
9539a5c95c | ||
|
6899f2bd96 | ||
|
81e4169dea | ||
|
3c2ed93b34 | ||
|
97f8d91e35 | ||
|
48fc42d182 | ||
|
6e00a3bdbb | ||
|
b0250f4f9a | ||
|
27583856cb | ||
|
c5bc21bf6a | ||
|
f89a3e8fa1 | ||
|
2efe2b5b47 | ||
|
209f19c1da | ||
|
76f7bae0a6 | ||
|
05f743ed14 | ||
|
a93bec73cf | ||
|
997942e235 | ||
|
3ab9272eb0 | ||
|
7c4b82243b | ||
|
b5203a077d | ||
|
92c0534cd4 | ||
|
54299bb3e6 | ||
|
256d19d9b4 | ||
|
3a80c765ac | ||
|
56f10a8cfa | ||
|
62bff2f78d | ||
|
82d10e025c | ||
|
08f79e67fb | ||
|
2ac85acca5 | ||
|
b3163d09e8 | ||
|
b96e1df14b | ||
|
90930b66ce | ||
|
89829fbe4f | ||
|
290f70f202 | ||
|
164168e7f4 | ||
|
5d0dc5fffd | ||
|
040ed20b59 | ||
|
f06bd69858 | ||
|
819524fbd0 | ||
|
ef03e7151d | ||
|
fbd5cf5994 | ||
|
5a7755e047 | ||
|
ae81a830a8 | ||
|
98d7e42886 | ||
|
3aadd0574e | ||
|
eff663cc4e | ||
|
9caceed001 | ||
|
a11b290a81 | ||
|
bba9c577d1 | ||
|
0a781164c3 | ||
|
7a98ac990d | ||
|
8bae4e8d9c | ||
|
c4baec28de | ||
|
62da9f4583 | ||
|
65cf9ac48f | ||
|
890230b791 | ||
|
f72070e6d0 | ||
|
94832d654f | ||
|
6bb2605bed | ||
|
47e615bbfc | ||
|
77742532aa | ||
|
948ecf3123 | ||
|
e233b2f63a | ||
|
343f0f781a | ||
|
e87b2d6718 | ||
|
0742f0b83f | ||
|
2fbe61aa11 | ||
|
f36acf6faa | ||
|
96617c0895 | ||
|
e50cd1e07d | ||
|
1358d40aef | ||
|
c8c6f1a63d | ||
|
850500c7ad | ||
|
9ec8918c1f | ||
|
08ed185608 | ||
|
25cd759dbe | ||
|
000c060093 | ||
|
39d79217ca | ||
|
5390e3b838 | ||
|
8aeb0aad8c | ||
|
a2e34ab75c | ||
|
5c2af69925 | ||
|
8076c60eee | ||
|
1b4b6b334e | ||
|
482dbb5c82 | ||
|
08e27a8b0f | ||
|
55ffaa1aff | ||
|
91fa73bf01 | ||
|
9a1b77aff4 | ||
|
79d5790e3f | ||
|
381a470d90 | ||
|
64b75625a9 | ||
|
536d45deb1 | ||
|
dce7e809e2 | ||
|
5ddbea73f4 | ||
|
8a9a4ca6cc | ||
|
b8e9ce8a7a | ||
|
d75bf1c32a | ||
|
cef3203601 | ||
|
5b657ac7d8 | ||
|
1509bc4828 | ||
|
fad5089175 | ||
|
52262dc38a | ||
|
b61255535e | ||
|
ce58ed7434 | ||
|
01859ce820 | ||
|
ada786e08c | ||
|
cfb5c442e2 | ||
|
37f953c353 | ||
|
4d84a723f4 | ||
|
ddbfc168c5 | ||
|
a463220df2 | ||
|
3684b38310 | ||
|
f472275196 | ||
|
2bca6753d3 | ||
|
a0cb9c5d6a | ||
|
3ca66d0184 | ||
|
316adff2d4 | ||
|
1a3bd3cabe | ||
|
9bc9532c24 | ||
|
732e3331b8 | ||
|
fae5525514 | ||
|
730b739907 | ||
|
844144f90a | ||
|
c105edff47 | ||
|
f65aac7b97 | ||
|
68a145d050 | ||
|
c2e3ff0f43 | ||
|
b49033d584 | ||
|
d822017520 | ||
|
3dc6c31ae5 | ||
|
8de663ff52 | ||
|
6e0b010cd3 | ||
|
4b2f26ca70 | ||
|
e91fe14612 | ||
|
8ce921c5b7 | ||
|
5d609ae1aa | ||
|
7042d00203 | ||
|
6c8b3bfbe9 | ||
|
38cd854b81 | ||
|
33be603e3d | ||
|
5753f8114c | ||
|
1bfa4228d6 | ||
|
6116eb64d1 | ||
|
cb411bcd04 | ||
|
527d1b4163 | ||
|
f82b862c25 | ||
|
cafe96a44a | ||
|
fe5cea7042 | ||
|
6981743788 | ||
|
0e0c5b91fc | ||
|
b29a008cb3 | ||
|
3bfc51e34b | ||
|
486f10be6c | ||
|
f5bcdeec95 | ||
|
880a60c3e4 | ||
|
0cb0de53ae | ||
|
f57a238e47 | ||
|
57109ed066 | ||
|
c52af6cee9 | ||
|
bd9a8261fa | ||
|
0e4e45518d | ||
|
bb5bbc9645 | ||
|
283db0faea | ||
|
049a3415a7 | ||
|
3d2fc7a5e6 | ||
|
2a040bee5f | ||
|
3bd29b9c9a | ||
|
d4381ef73f | ||
|
3918bf248d | ||
|
a37ae1be0d | ||
|
108c6ecfe3 | ||
|
9f4458db9a | ||
|
ac7bec5ad8 | ||
|
74848140c5 | ||
|
9db3f1cf1d | ||
|
799570d068 | ||
|
3db66fad1d | ||
|
4e6c449250 | ||
|
da119a31f7 | ||
|
ae9f83c191 | ||
|
846020bf5a | ||
|
cf5c81ab21 | ||
|
244ab4e3b3 | ||
|
07290bd443 | ||
|
ef9c34098a | ||
|
57bca5102d | ||
|
a29d1e1531 | ||
|
3d649e049b | ||
|
26a7b984aa | ||
|
9b41dfd951 | ||
|
1091d32882 | ||
|
432859d677 | ||
|
25b7752915 | ||
|
bac3fea8cd | ||
|
9cc9bceadf | ||
|
36e09738c3 | ||
|
90439c562f | ||
|
d9975defe9 | ||
|
425b50cf1c | ||
|
2216eb7b01 | ||
|
31468a2328 | ||
|
d39191477b | ||
|
5489ee9857 | ||
|
f8c437230d | ||
|
e30051b460 | ||
|
b12893f343 | ||
|
80b0d4284b | ||
|
afedf43ee1 | ||
|
8684137f80 | ||
|
dc16f03f50 | ||
|
2c608c7909 | ||
|
3540c951dc | ||
|
4b46a8ffdf | ||
|
74961caed1 | ||
|
359672415b | ||
|
5b889bf4f3 | ||
|
7adfc9c2dc | ||
|
773bbdab0a | ||
|
9df8dd7384 | ||
|
ae148d57e5 | ||
|
78c4db722a | ||
|
eefe7bdb6b | ||
|
e07e2a498e | ||
|
4bf7e60bad | ||
|
37b7a4b0b6 | ||
|
b842189d8a | ||
|
2f9284c3a0 | ||
|
49a65f9454 | ||
|
72526dc806 | ||
|
747ec0d0bc | ||
|
a3932c7aec | ||
|
c683f3a88d | ||
|
a1d0ee9694 | ||
|
bee7bea330 | ||
|
e82a37528d | ||
|
93b31a2fa4 | ||
|
59124c913f | ||
|
de4a15a5b3 | ||
|
1f1a734598 | ||
|
96270b34d0 | ||
|
bc21e3163f | ||
|
ab4a998867 | ||
|
efac5268a4 | ||
|
ddaa7ef337 | ||
|
120bdaedb9 | ||
|
a73ca4bf18 | ||
|
1c8f885629 | ||
|
dfac71e092 | ||
|
827bd32a67 | ||
|
34957487f0 | ||
|
1c943a465a | ||
|
c77d9233f0 | ||
|
8cbdaecfc9 | ||
|
9bde5c6cac | ||
|
ecf6de26a0 | ||
|
495a969ccf | ||
|
1dafe0bd6a | ||
|
2c33a06535 | ||
|
efd8fe54b2 | ||
|
d3acbe2641 | ||
|
5b0f772dc7 | ||
|
93e26c7326 | ||
|
914369bd36 | ||
|
fcc4aff62c | ||
|
a6e2074606 | ||
|
44382ec78e | ||
|
592aba9dd8 | ||
|
2fb9b8f64d | ||
|
d8d52d5181 | ||
|
94c01d395a | ||
|
9bced5d2c9 | ||
|
fd7caf7f3f | ||
|
e2d7fd5f09 | ||
|
e29e979fbf | ||
|
729fdc9c8d | ||
|
0574f5302c | ||
|
595ac95f32 | ||
|
ed92f03bed | ||
|
43b1981244 | ||
|
cb5d4f4989 | ||
|
0639fdbbb7 | ||
|
e56088b566 | ||
|
40d2ef3071 | ||
|
5afa14a945 | ||
|
4f5ad533c3 | ||
|
7f7487206a | ||
|
82d8e0cd47 | ||
|
1c21e1c9d2 | ||
|
cd2072b8e3 | ||
|
145c18fbeb | ||
|
18bb1bc9e3 | ||
|
c0e8ce22af | ||
|
72a95e7cce | ||
|
3983aa1b92 | ||
|
8d85e78960 | ||
|
d3eca29934 | ||
|
f3b72884c6 | ||
|
504164fcea | ||
|
aa21fe0b31 | ||
|
2995acb8d9 | ||
|
3436a3a256 | ||
|
d634c5c17a | ||
|
f9fd63d5f5 | ||
|
123be56e5d | ||
|
7f46d8bb2a | ||
|
60d96b6a5a | ||
|
f9bb0b0a46 | ||
|
325bba5be5 | ||
|
715bf9cbab | ||
|
8187fdf4a6 | ||
|
900a0980c1 | ||
|
da44660a72 | ||
|
76c2883f62 | ||
|
d2fccfe357 | ||
|
23b7e6db18 | ||
|
1727977828 | ||
|
7fed369e88 | ||
|
81bbb81a42 | ||
|
3fa444a98d | ||
|
5475934c0d | ||
|
636257f879 | ||
|
c6bdfdd592 | ||
|
5a089c311a | ||
|
6c3639aef2 | ||
|
37ac0a3665 | ||
|
40b910e4e2 | ||
|
e058377214 | ||
|
57185d17fd | ||
|
f2e2bc7fa1 | ||
|
950035db9c | ||
|
f36c11d9d7 | ||
|
64a4b75ed9 | ||
|
adc7e5242c | ||
|
612a813c7c | ||
|
199ba86984 | ||
|
a4ae9a39af | ||
|
ddf73b653c | ||
|
83773846d6 | ||
|
8246f54831 | ||
|
92d6b62d56 | ||
|
bff171897a | ||
|
189d7c6562 | ||
|
a54a558a44 | ||
|
6443257e60 | ||
|
343f01cb8f | ||
|
87d0b6e3fb | ||
|
eb317480d8 | ||
|
663b6ca50f | ||
|
908dea4a23 | ||
|
309ccb8734 | ||
|
d687b44f70 | ||
|
b94d67e99a | ||
|
1f8a5dfa06 | ||
|
d420b2864e | ||
|
12e46504f3 | ||
|
d3bd73c281 | ||
|
86e29eaac8 | ||
|
e934d79170 | ||
|
398981e887 | ||
|
96c9a67554 | ||
|
44ffb04ee1 | ||
|
c78f9a3b7d | ||
|
f088ded236 | ||
|
beaedc7ca1 | ||
|
f9392ed908 | ||
|
eb30181e51 | ||
|
9edeb84adc | ||
|
f7a8aabdee | ||
|
214f5f32a3 | ||
|
53b471a3df | ||
|
2b730628d5 | ||
|
48006ab350 | ||
|
b3642094b2 | ||
|
a574168ca8 | ||
|
263b4b5653 | ||
|
19818ae632 | ||
|
477d73c71d | ||
|
7272ac4a60 | ||
|
7659277c5c | ||
|
761eee7ae7 | ||
|
600cee26d9 | ||
|
61466808f5 | ||
|
de25c5f003 | ||
|
8880568045 | ||
|
3c7d460036 | ||
|
ee3f2446f9 | ||
|
0b24eca8d7 | ||
|
3116ac8323 | ||
|
19bb16270d | ||
|
35c41f8065 | ||
|
9d36e7742e | ||
|
75f3624f31 | ||
|
2e78c007ee | ||
|
f5a10ed5d0 | ||
|
de75849ae3 | ||
|
30d6dcdd69 | ||
|
c48345a5c0 | ||
|
a1cdc5e40c | ||
|
661bfd4e52 | ||
|
6ac48bb0e1 | ||
|
a18b4b1505 | ||
|
b2c832e19f | ||
|
1462a8beb0 | ||
|
f877e65919 | ||
|
78898ed187 | ||
|
ef03d78c4d | ||
|
48b251273a | ||
|
c91b5e1164 | ||
|
f8fd474b55 | ||
|
bc5f43ab05 | ||
|
1da2118e13 | ||
|
67e8f5d1a7 | ||
|
2a76013ed5 | ||
|
681bbd616b | ||
|
46390a161e | ||
|
28d0ec7a2a | ||
|
8a842c57d3 | ||
|
fb333f1505 | ||
|
ab257dc7ce | ||
|
e3d8751338 | ||
|
a1532bbfea | ||
|
128963d2e9 | ||
|
1cb9fc8b43 | ||
|
b9147b7872 | ||
|
5496271000 | ||
|
16b5df4ba4 | ||
|
fee6114d74 | ||
|
b14655dd43 | ||
|
3de2890050 | ||
|
90ae3e42f6 | ||
|
158a1886fe | ||
|
d2285f0d61 | ||
|
2e44ac25a1 | ||
|
9d425039a2 | ||
|
832f04a486 | ||
|
657d5ef024 | ||
|
e92c2503d1 | ||
|
b74662cf3d | ||
|
ed3b0e81b9 | ||
|
75755c8cfc | ||
|
4ce769399f | ||
|
d0dfdcfcde | ||
|
4e949a798d | ||
|
4fb379afb4 | ||
|
eb7484c671 | ||
|
79470ffff7 | ||
|
44af6c42a2 | ||
|
d7380dc549 | ||
|
b2f6e1cf1a | ||
|
7c9437f0a9 | ||
|
162bb0a85f | ||
|
e44ccd5787 | ||
|
c4612b7484 | ||
|
731c5a2092 | ||
|
7efbd55b69 | ||
|
5dbec5b383 | ||
|
f28ad69c38 | ||
|
49a71819a1 | ||
|
ed7d11525a | ||
|
5b1dcccddc | ||
|
992a08f5ce | ||
|
49ef408699 | ||
|
0487f2fb7a | ||
|
e43c8acd30 | ||
|
97604a93dd | ||
|
d266e9e123 | ||
|
7ac8bf91df | ||
|
772d36015c | ||
|
f381211291 | ||
|
aca4cb233d | ||
|
01ef3b774f | ||
|
9041dead7f | ||
|
4ea308f75a | ||
|
e5f06eb551 | ||
|
c68030e9fa | ||
|
fd95839701 | ||
|
6305023219 | ||
|
c7dda72a84 | ||
|
7caedcb50d | ||
|
1856e09a0c | ||
|
e47568e147 | ||
|
c702ce3802 | ||
|
a37f403410 | ||
|
9248a954bd | ||
|
89a7ad6f81 | ||
|
f432f4f698 | ||
|
5ef2d5cd9f | ||
|
204612ca85 | ||
|
df8c092212 | ||
|
55d2e598db | ||
|
3c67c7b32c | ||
|
5264ffc0e5 | ||
|
27b217a4ed | ||
|
d756548ac3 | ||
|
0171e4d899 | ||
|
a2054fb7dd | ||
|
f07c9c6dcf | ||
|
c677c946ea | ||
|
87063851be | ||
|
516c1a7910 | ||
|
2293f77841 | ||
|
212771244a | ||
|
5fc33aeef5 | ||
|
fff0d1c988 | ||
|
987b5a2290 | ||
|
910d210e52 | ||
|
b719a0ee35 | ||
|
25329d2752 | ||
|
df4d80ff26 | ||
|
13ab06ecb1 | ||
|
72e2d1a2bf | ||
|
c90210c063 | ||
|
21a8726a47 | ||
|
ca7f267103 | ||
|
7b15e54b7d | ||
|
ccd007355c | ||
|
36aba02093 | ||
|
a5dd330218 | ||
|
fc0eb87620 | ||
|
0b9fca2263 | ||
|
0d9464bb92 | ||
|
ff435227e9 | ||
|
fcdc3f67af | ||
|
299936e554 | ||
|
2e192f0467 | ||
|
9062f19a97 | ||
|
f51e40a1de | ||
|
e411024696 | ||
|
01a27e22b4 | ||
|
7553c4aed9 | ||
|
593304bc43 | ||
|
a9ca30fe34 | ||
|
6030730870 | ||
|
b9436e4851 | ||
|
b0a7452d48 | ||
|
5e05e521d9 | ||
|
7a052c349a | ||
|
35aca37557 | ||
|
57fe56d72e | ||
|
218e73540a | ||
|
0965e2cc96 | ||
|
5cf4f0a82f | ||
|
9b0225db60 | ||
|
8c0959de42 | ||
|
ccd71c857f | ||
|
b89dbb0ee7 | ||
|
a5bdc1acd0 | ||
|
a279784d8d | ||
|
3a9f4f2984 | ||
|
51ae8313cf | ||
|
38f04f0073 | ||
|
f3da5d770d | ||
|
24fb13cf23 | ||
|
524e8c8410 | ||
|
52d1e44560 | ||
|
6055c5e165 | ||
|
e0ed187ea6 | ||
|
eafe048c7e | ||
|
c0e553dbb5 | ||
|
7e59987af7 | ||
|
1f012f7c46 | ||
|
d1a3d42ab8 | ||
|
05fd992c48 | ||
|
47f1d888eb | ||
|
ca9c227837 | ||
|
5df384bb71 | ||
|
e80b36347a | ||
|
9e37495493 | ||
|
77b93c5f21 | ||
|
0b198ee881 | ||
|
9e0c65881d | ||
|
c796d6a799 | ||
|
3892fb533a | ||
|
2ea7487ca7 | ||
|
d4f6cec3d0 | ||
|
b1705e283d | ||
|
eee751e22a | ||
|
2b0fefb95f | ||
|
1a627ba207 | ||
|
ea75bcf47e | ||
|
6c6dcab857 | ||
|
0654aed6c8 | ||
|
3447ca0767 | ||
|
1e858efafd | ||
|
ce88a72ea1 | ||
|
7725b8e7de | ||
|
62ddbe320d | ||
|
a694601264 | ||
|
e06f88043f | ||
|
8fc3fd146f | ||
|
ce5066bddb | ||
|
93f18e2449 | ||
|
783e62f3ca | ||
|
c38dc61021 | ||
|
45782bbb39 | ||
|
4c9cd5657e | ||
|
dc627d13b8 | ||
|
ddc3489991 | ||
|
5b24c20331 | ||
|
8bb01143d8 | ||
|
a9635da96a | ||
|
e790cb75fd | ||
|
348afeebbf | ||
|
6888553773 | ||
|
0f489672b9 | ||
|
b7d8cbfaf5 | ||
|
df8d253f78 | ||
|
89b42e3696 | ||
|
22e5a4a283 | ||
|
61810172d1 | ||
|
658c8b4be7 | ||
|
d4dab54c7b | ||
|
5566b9ba6c | ||
|
e56ab2dcd5 | ||
|
d6c45979ba | ||
|
a06e9bf32e | ||
|
7e8f7ba674 | ||
|
09eb7f7f78 | ||
|
f7a910ec66 | ||
|
6d6a73eea7 | ||
|
e4a7641927 | ||
|
b24b46d48c | ||
|
a65d7dce5b | ||
|
718a0a5d34 | ||
|
ea9e3ab3f5 | ||
|
770e988ff8 | ||
|
0fa0641974 | ||
|
c13e23cdae | ||
|
fab4ebb768 | ||
|
89429339fa | ||
|
6ed129bd7a | ||
|
c4fde6b53e | ||
|
a7d93e88b4 | ||
|
9891494142 | ||
|
f8544dfbbe | ||
|
b00651d428 | ||
|
da8dccbaca | ||
|
37272ae827 | ||
|
7f2bee46b7 | ||
|
c8a4dcf72b | ||
|
012ff91cfb | ||
|
e690ddd50a | ||
|
45b7c1948c | ||
|
e2fb7ca3d2 | ||
|
b3bda76582 | ||
|
ab6d322eca | ||
|
1a8a0df107 | ||
|
0a37709b0a | ||
|
98cd1417df | ||
|
460069ceaa | ||
|
316aa44f23 | ||
|
7133540c23 | ||
|
590231741d | ||
|
a9349b8f3d |
@@ -1,10 +1,9 @@
|
||||
version: 2
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
only: python-2.4
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/rocky/python-uncompyle6
|
||||
parallelism: 1
|
||||
shell: /bin/bash --login
|
||||
# CircleCI 2.0 does not support environment variables that refer to each other the same way as 1.0 did.
|
||||
@@ -16,7 +15,7 @@ jobs:
|
||||
# To see the list of pre-built images that CircleCI provides for most common languages see
|
||||
# https://circleci.com/docs/2.0/circleci-images/
|
||||
docker:
|
||||
- image: circleci/python:3.6.9
|
||||
- image: circleci/python:2.7
|
||||
steps:
|
||||
# Machine Setup
|
||||
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
|
||||
@@ -26,10 +25,6 @@ jobs:
|
||||
# In many cases you can simplify this from what is generated here.
|
||||
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
|
||||
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
- run:
|
||||
working_directory: ~/rocky/python-uncompyle6
|
||||
command: pip install --user virtualenv && pip install --user nose && pip install --user pep8
|
||||
# Dependencies
|
||||
# This would typically go in either a build or a build-and-test job when using workflows
|
||||
# Restore the dependency cache
|
||||
@@ -41,11 +36,11 @@ jobs:
|
||||
|
||||
- run:
|
||||
command: | # Use pip to install dependengcies
|
||||
pip install --user --upgrade setuptools
|
||||
# Until the next release
|
||||
pip install git+https://github.com/rocky/python-xdis#egg=xdis
|
||||
pip install --user -e .
|
||||
pip install --user -r requirements-dev.txt
|
||||
sudo easy_install click==7.1.2
|
||||
# Until next release use github xdis
|
||||
sudo pip install git+https://github.com/rocky/python-xdis@python-2.34to-2.7#egg=xdis
|
||||
sudo pip install -e .
|
||||
sudo pip install -r requirements-dev.txt
|
||||
|
||||
# Save dependency cache
|
||||
- save_cache:
|
||||
@@ -63,8 +58,8 @@ jobs:
|
||||
# Test
|
||||
# This would typically be a build job when using workflows, possibly combined with build
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
- run: sudo python ./setup.py develop && make check-3.6
|
||||
- run: cd ./test/stdlib && bash ./runtests.sh 'test_[p-z]*.py'
|
||||
- run: sudo python ./setup.py develop && make check-2.7
|
||||
- run: cd test/stdlib && bash ./runtests.sh 'test_[p-z]*.py'
|
||||
# Teardown
|
||||
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
|
||||
# Save test results
|
||||
|
31
.github/workflows/osx.yml
vendored
31
.github/workflows/osx.yml
vendored
@@ -1,31 +0,0 @@
|
||||
name: uncompyle6 (osx)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macOS]
|
||||
python-version: [3.7, 3.8]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
# Until the next xdis release
|
||||
pip install git+https://github.com/rocky/python-xdis#egg=xdis
|
||||
pip install -e .
|
||||
pip install -r requirements-dev.txt
|
||||
- name: Test uncompyle6
|
||||
run: |
|
||||
make check
|
30
.github/workflows/ubuntu.yml
vendored
30
.github/workflows/ubuntu.yml
vendored
@@ -1,30 +0,0 @@
|
||||
name: uncompyle6 (ubuntu)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7, 3.8]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
# Until the next xdis release
|
||||
pip install git+https://github.com/rocky/python-xdis#egg=xdis
|
||||
pip install -e .
|
||||
pip install -r requirements-dev.txt
|
||||
- name: Test uncompyle6
|
||||
run: |
|
||||
make check
|
31
.github/workflows/windows.yml
vendored
31
.github/workflows/windows.yml
vendored
@@ -1,31 +0,0 @@
|
||||
name: uncompyle6 (windows)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows]
|
||||
python-version: [3.7, 3.8]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
# Until the next xdis release
|
||||
pip install git+https://github.com/rocky/python-xdis#egg=xdis
|
||||
pip install -e .
|
||||
pip install -r requirements-dev.txt
|
||||
- name: Test uncompyle6
|
||||
run: |
|
||||
make check
|
11
.travis.yml
11
.travis.yml
@@ -1,16 +1,7 @@
|
||||
language: python
|
||||
|
||||
python:
|
||||
# - '3.5'
|
||||
# - '2.7'
|
||||
# - '3.4'
|
||||
- '3.6'
|
||||
- '3.8'
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- python: '3.7'
|
||||
dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
|
||||
- 2.7 # this is a cheat here because travis doesn't do 2.4-2.6
|
||||
|
||||
install:
|
||||
# Remove the next line when xdis 6.0.0 is released
|
||||
|
5
Makefile
5
Makefile
@@ -43,8 +43,9 @@ check-3.0 check-3.1 check-3.2 check-3.6:
|
||||
check-3.7: pytest
|
||||
$(MAKE) -C test check
|
||||
|
||||
check-3.8:
|
||||
$(MAKE) -C test check
|
||||
#:Tests for Python 2.4-2.5 (don't have pytest)
|
||||
check-2.4 check-2.5:
|
||||
$(MAKE) -C test $@
|
||||
|
||||
#:PyPy 2.6.1 PyPy 5.0.1, or PyPy 5.8.0-beta0
|
||||
# Skip for now
|
||||
|
24
NEWS.md
24
NEWS.md
@@ -1,4 +1,26 @@
|
||||
3.8.0: 2020-10-29
|
||||
3.9.0: 2022-12-22
|
||||
=================
|
||||
|
||||
* deparse generator expressions for Python 3.0 .. 3.2
|
||||
* Python 3.0 list comprehension.
|
||||
* Fix Issues #310, #344, #377, #391, #409, #414
|
||||
* Limited support for 3.8+ f-string "=" specifier
|
||||
* Correct 2.5-7 relative import formatting
|
||||
* Miscellaneous bug fixing
|
||||
* remove \n in lambda
|
||||
* Python 2.6 gramar cleanup
|
||||
* Correct some Python 2.6 chain compare decompilation
|
||||
* Ensure no parenthesis subscript slices
|
||||
* Correct 2.x formatting "slice2" nonterminal
|
||||
* Correct 3.7 imports
|
||||
* Improve "async for" parsing
|
||||
* Handle BUILD_MAP opcode
|
||||
* match Python AT better
|
||||
* Correct 3.7 positional args
|
||||
* PyPy 3.7 and PyPy 3.8 support
|
||||
* Miscellaneous linting, isorting, blacking
|
||||
|
||||
3.8.0: 2021-10-29
|
||||
=================
|
||||
|
||||
* Better handling of invalid bytecode magic
|
||||
|
17
README.rst
17
README.rst
@@ -103,16 +103,16 @@ Installation
|
||||
|
||||
You can install from PyPI using the name ``uncompyle6``::
|
||||
|
||||
pip install uncompyle6
|
||||
$ pip install uncompyle6
|
||||
|
||||
|
||||
To install from source code, this project uses setup.py, so it follows the standard Python routine::
|
||||
|
||||
$ pip install -e . # set up to run from source tree
|
||||
$ pip install -e . # set up to run from source tree
|
||||
|
||||
or::
|
||||
|
||||
$ python setup.py install # may need sudo
|
||||
$ python setup.py install # may need sudo
|
||||
|
||||
A GNU Makefile is also provided so :code:`make install` (possibly as root or
|
||||
sudo) will do the steps above.
|
||||
@@ -122,7 +122,7 @@ Running Tests
|
||||
|
||||
::
|
||||
|
||||
make check
|
||||
$ make check
|
||||
|
||||
A GNU makefile has been added to smooth over setting running the right
|
||||
command, and running tests from fastest to slowest.
|
||||
@@ -303,15 +303,12 @@ See Also
|
||||
.. _uncompyle2: https://github.com/wibiti/uncompyle2
|
||||
.. _unpyc37: https://github.com/andrew-tavera/unpyc37
|
||||
.. _this: https://github.com/rocky/python-uncompyle6/wiki/Deparsing-technology-and-its-use-in-exact-location-reporting
|
||||
.. |buildstatus| image:: https://travis-ci.org/rocky/python-uncompyle6.svg
|
||||
:target: https://travis-ci.org/rocky/python-uncompyle6
|
||||
.. |packagestatus| image:: https://repology.org/badge/vertical-allrepos/python:uncompyle6.svg
|
||||
:target: https://repology.org/project/python:uncompyle6/versions
|
||||
.. |buildstatus| image:: https://travis-ci.org/rocky/python-uncompyle6.svg :target: https://travis-ci.org/rocky/python-uncompyle6
|
||||
.. |packagestatus| image:: https://repology.org/badge/vertical-allrepos/python:uncompyle6.svg :target: https://repology.org/project/python:uncompyle6/versions
|
||||
.. _PJOrion: http://www.koreanrandom.com/forum/topic/15280-pjorion-%D1%80%D0%B5%D0%B4%D0%B0%D0%BA%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-%D0%BA%D0%BE%D0%BC%D0%BF%D0%B8%D0%BB%D1%8F%D1%86%D0%B8%D1%8F-%D0%B4%D0%B5%D0%BA%D0%BE%D0%BC%D0%BF%D0%B8%D0%BB%D1%8F%D1%86%D0%B8%D1%8F-%D0%BE%D0%B1%D1%84
|
||||
.. _pydecipher: https://github.com/mitre/pydecipher
|
||||
.. _Deobfuscator: https://github.com/extremecoders-re/PjOrion-Deobfuscator
|
||||
.. _Py2EXE: https://en.wikipedia.org/wiki/Py2exe
|
||||
.. |Supported Python Versions| image:: https://img.shields.io/pypi/pyversions/uncompyle6.svg
|
||||
.. |Latest Version| image:: https://badge.fury.io/py/uncompyle6.svg
|
||||
:target: https://badge.fury.io/py/uncompyle6
|
||||
.. |Latest Version| image:: https://badge.fury.io/py/uncompyle6.svg :target: https://badge.fury.io/py/uncompyle6
|
||||
.. |Pypi Installs| image:: https://pepy.tech/badge/uncompyle6/month
|
||||
|
@@ -20,8 +20,9 @@ for version in $PYVERSIONS; do
|
||||
exit $?
|
||||
fi
|
||||
make clean && python setup.py develop
|
||||
if ! make check ; then
|
||||
if ! make check-short ; then
|
||||
exit $?
|
||||
fi
|
||||
echo === $version ===
|
||||
done
|
||||
make check
|
||||
|
27
admin-tools/check-3.3-3.5-versions.sh
Executable file
27
admin-tools/check-3.3-3.5-versions.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
function finish {
|
||||
cd $owd
|
||||
}
|
||||
owd=$(pwd)
|
||||
trap finish EXIT
|
||||
|
||||
cd $(dirname ${BASH_SOURCE[0]})
|
||||
if ! source ./pyenv-3.3-3.5-versions ; then
|
||||
exit $?
|
||||
fi
|
||||
if ! source ./setup-python-3.3.sh ; then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
cd ..
|
||||
for version in $PYVERSIONS; do
|
||||
echo --- $version ---
|
||||
if ! pyenv local $version ; then
|
||||
exit $?
|
||||
fi
|
||||
make clean && python setup.py develop
|
||||
if ! make check ; then
|
||||
exit $?
|
||||
fi
|
||||
echo === $version ===
|
||||
done
|
46
admin-tools/how-to-make-a-release.txt
Normal file
46
admin-tools/how-to-make-a-release.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
git pull
|
||||
|
||||
Change version in uncompyle6/version.py
|
||||
source uncompyle6/version.py
|
||||
echo $VERSION
|
||||
git commit -m"Get ready for release $VERSION" .
|
||||
|
||||
Update ChangeLog:
|
||||
make ChangeLog
|
||||
|
||||
Update NEWS from ChangeLog
|
||||
make check
|
||||
|
||||
git commit --amend .
|
||||
|
||||
git push
|
||||
|
||||
Make sure pyenv is running
|
||||
# Pyenv
|
||||
|
||||
source admin-tools/check-newer-versions.sh
|
||||
|
||||
|
||||
# Switch to python-2.4 and build that first...
|
||||
source admin-tools/setup-python-2.4
|
||||
|
||||
rm ChangeLog
|
||||
git merge master
|
||||
|
||||
Update NEWS from master branch
|
||||
|
||||
git commit -m"Get ready for release $VERSION" .
|
||||
|
||||
source admin-tools/check-older-versions.sh
|
||||
source admin-tools/check-newer-versions.sh
|
||||
|
||||
make-dist-older.sh
|
||||
|
||||
git tag release-python-2.4-$VERSION
|
||||
|
||||
./make-dist-newer.sh
|
||||
|
||||
git tag release-$VERSION
|
||||
|
||||
|
||||
twine upload dist/uncompyle6-${VERSION}*
|
@@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
|
||||
echo "This script should be *sourced* rather than run directly through bash"
|
||||
exit 1
|
||||
fi
|
||||
export PYVERSIONS='3.5.10 3.3.7 3.4.10'
|
||||
export PYVERSIONS=' 3.3.7 3.4.10 3.5.10 '
|
||||
|
@@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
|
||||
echo "This script should be *sourced* rather than run directly through bash"
|
||||
exit 1
|
||||
fi
|
||||
export PYVERSIONS='3.6.15 pypy3.6-7.3.1 3.7.16 pypy-3.7-3.9 pypy3.8-7.3.10 pyston-2.3.5 3.8.14'
|
||||
export PYVERSIONS='3.6.15 pypy3.6-7.3.1 3.7.16 pypy-3.7-7.3.9 pypy3.8-7.3.10 pyston-2.3.5 3.8.16'
|
||||
|
0
admin-tools/setup-master.sh
Executable file → Normal file
0
admin-tools/setup-master.sh
Executable file → Normal file
0
admin-tools/setup-python-2.4.sh
Executable file → Normal file
0
admin-tools/setup-python-2.4.sh
Executable file → Normal file
0
admin-tools/setup-python-3.3.sh
Executable file → Normal file
0
admin-tools/setup-python-3.3.sh
Executable file → Normal file
3
admin-tools/update-sources.sh
Executable file
3
admin-tools/update-sources.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
cd $(dirname ${BASH_SOURCE[0]})/..
|
||||
git pull
|
@@ -29,7 +29,7 @@ def list_comp():
|
||||
[y for y in range(3)]
|
||||
|
||||
def get_parsed_for_fn(fn):
|
||||
code = fn.__code__
|
||||
code = fn.func_code
|
||||
return deparse(code, version=PYTHON_VERSION_TRIPLE)
|
||||
|
||||
def check_expect(expect, parsed, fn_name):
|
||||
@@ -316,3 +316,4 @@ for i in range(2): ...
|
||||
.
|
||||
""".split("\n")
|
||||
parsed = get_parsed_for_fn(for_range_stmt)
|
||||
check_expect(expect, parsed, 'range_stmt')
|
||||
|
@@ -20,7 +20,7 @@ def bug_loop(disassemble, tb=None):
|
||||
disassemble(tb)
|
||||
|
||||
def test_if_in_for():
|
||||
code = bug.__code__
|
||||
code = bug.func_code
|
||||
scan = get_scanner(PYTHON_VERSION_TRIPLE)
|
||||
if (2, 7) <= PYTHON_VERSION_TRIPLE < (3, 1) and not IS_PYPY:
|
||||
scan.build_instructions(code)
|
||||
|
@@ -45,28 +45,31 @@ def test_grammar():
|
||||
expect_lhs.add("kvlist")
|
||||
expect_lhs.add("kv3")
|
||||
unused_rhs.add("dict")
|
||||
|
||||
if PYTHON_VERSION_TRIPLE < (3, 7) and PYTHON_VERSION_TRIPLE[:2] != (2, 7):
|
||||
else:
|
||||
if PYTHON_VERSION_TRIPLE < (3, 7) and PYTHON_VERSION_TRIPLE[:2] not in ((2, 7), (2, 6)):
|
||||
# NOTE: this may disappear
|
||||
expect_lhs.add("except_handler_else")
|
||||
|
||||
expect_lhs.add("load_genexpr")
|
||||
expect_lhs.add("kwarg")
|
||||
if PYTHON_VERSION_TRIPLE >= (3, 0):
|
||||
expect_lhs.add("load_genexpr")
|
||||
|
||||
unused_rhs = unused_rhs.union(
|
||||
set(
|
||||
"""
|
||||
except_pop_except generator_exp
|
||||
""".split()
|
||||
unused_rhs = unused_rhs.union(
|
||||
set(
|
||||
"""
|
||||
except_pop_except generator_exp
|
||||
""".split()
|
||||
)
|
||||
)
|
||||
)
|
||||
if PYTHON_VERSION_TRIPLE < (3, 7):
|
||||
expect_lhs.add("annotate_arg")
|
||||
expect_lhs.add("annotate_tuple")
|
||||
unused_rhs.add("mkfunc_annotate")
|
||||
if PYTHON_VERSION_TRIPLE < (3, 7):
|
||||
expect_lhs.add("annotate_arg")
|
||||
expect_lhs.add("annotate_tuple")
|
||||
unused_rhs.add("mkfunc_annotate")
|
||||
|
||||
unused_rhs.add("dict_comp")
|
||||
unused_rhs.add("classdefdeco1")
|
||||
unused_rhs.add("tryelsestmtl")
|
||||
|
||||
unused_rhs.add("dict_comp")
|
||||
unused_rhs.add("classdefdeco1")
|
||||
unused_rhs.add("tryelsestmtl")
|
||||
if PYTHON_VERSION_TRIPLE >= (3, 5):
|
||||
expect_right_recursive.add(
|
||||
(("l_stmts", ("lastl_stmt", "come_froms", "l_stmts")))
|
||||
|
@@ -5,9 +5,7 @@ from uncompyle6.semantics.consts import (
|
||||
# RETURN_NONE, PASS, RETURN_LOCALS
|
||||
)
|
||||
|
||||
from io import StringIO
|
||||
def iteritems(d):
|
||||
return d.items()
|
||||
from StringIO import StringIO
|
||||
|
||||
from uncompyle6.semantics.pysource import (SourceWalker, deparse_code2str)
|
||||
|
||||
@@ -24,7 +22,7 @@ def test_template_engine():
|
||||
# FIXME: and so on...
|
||||
|
||||
from uncompyle6.semantics.consts import (
|
||||
TABLE_DIRECT, TABLE_R,
|
||||
TABLE_R, TABLE_DIRECT,
|
||||
)
|
||||
|
||||
from uncompyle6.semantics.fragments import (
|
||||
@@ -38,7 +36,7 @@ def test_tables():
|
||||
(TABLE_DIRECT, 'TABLE_DIRECT', False),
|
||||
(TABLE_R, 'TABLE_R', False),
|
||||
(TABLE_DIRECT_FRAGMENT, 'TABLE_DIRECT_FRAGMENT', True)):
|
||||
for k, entry in iteritems(t):
|
||||
for k, entry in t.iteritems():
|
||||
if k in skip_for_now:
|
||||
continue
|
||||
fmt = entry[0]
|
||||
|
@@ -1,22 +1,20 @@
|
||||
import pytest
|
||||
from uncompyle6 import code_deparse
|
||||
from xdis.version_info import PYTHON_VERSION_TRIPLE
|
||||
|
||||
pytest.mark.skip(PYTHON_VERSION_TRIPLE < (2, 7), reason="need Python < 2.7")
|
||||
|
||||
|
||||
def test_single_mode():
|
||||
single_expressions = (
|
||||
"i = 1",
|
||||
"i and (j or k)",
|
||||
"i += 1",
|
||||
"i = j % 4",
|
||||
"i = {}",
|
||||
"i = []",
|
||||
"for i in range(10):\n i\n",
|
||||
"for i in range(10):\n for j in range(10):\n i + j\n",
|
||||
# 'try:\n i\nexcept Exception:\n j\nelse:\n k\n'
|
||||
)
|
||||
if PYTHON_VERSION_TRIPLE == (2, 7):
|
||||
def test_single_mode():
|
||||
single_expressions = (
|
||||
'i = 1',
|
||||
'i and (j or k)',
|
||||
'i += 1',
|
||||
'i = j % 4',
|
||||
'i = {}',
|
||||
'i = []',
|
||||
'for i in range(10):\n i\n',
|
||||
'for i in range(10):\n for j in range(10):\n i + j\n',
|
||||
'try:\n i\nexcept Exception:\n j\nelse:\n k\n'
|
||||
)
|
||||
|
||||
for expr in single_expressions:
|
||||
code = compile(expr + "\n", "<string>", "single")
|
||||
|
@@ -17,6 +17,12 @@ from xdis import Bytecode, get_opcode
|
||||
|
||||
opc = get_opcode(PYTHON_VERSION_TRIPLE, IS_PYPY)
|
||||
Bytecode = functools.partial(Bytecode, opc=opc)
|
||||
|
||||
if PYTHON_VERSION_TRIPLE < (2, 5):
|
||||
from cStringIO import StringIO
|
||||
else:
|
||||
from StringIO import StringIO
|
||||
|
||||
import six
|
||||
|
||||
def _dis_to_text(co):
|
||||
@@ -122,7 +128,7 @@ def validate_uncompyle(text, mode="exec"):
|
||||
original_text = text
|
||||
|
||||
deparsed = code_deparse(
|
||||
original_code, out=six.StringIO(), version=PYTHON_VERSION_TRIPLE, compile_mode=mode
|
||||
original_code, out=StringIO(), version=PYTHON_VERSION_TRIPLE, compile_mode=mode
|
||||
)
|
||||
uncompyled_text = deparsed.text
|
||||
uncompyled_code = compile(uncompyled_text, "<string>", "exec")
|
||||
|
@@ -1,9 +1,5 @@
|
||||
# Pick up stuff from setup.py
|
||||
hypothesis==2.0.0
|
||||
pytest
|
||||
-e .
|
||||
|
||||
Click~=7.0
|
||||
xdis>=6.0.4
|
||||
configobj~=5.0.6
|
||||
setuptools~=65.3.0
|
||||
|
21
setup.py
21
setup.py
@@ -1,25 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
"""Setup script for the 'uncompyle6' distribution."""
|
||||
|
||||
import setuptools
|
||||
import sys
|
||||
|
||||
"""Setup script for the 'uncompyle6' distribution."""
|
||||
|
||||
SYS_VERSION = sys.version_info[0:2]
|
||||
if not ((2, 4) <= SYS_VERSION < (3, 12)):
|
||||
mess = "Python Release 2.6 .. 3.11 are supported in this code branch."
|
||||
if (2, 4) <= SYS_VERSION <= (2, 7):
|
||||
if not ((2, 4) <= SYS_VERSION <= (2, 7)):
|
||||
mess = "Python Release 2.4 .. 2.7 are supported in this code branch."
|
||||
if ((3, 6) <= SYS_VERSION < (3, 9)):
|
||||
mess += ("\nFor your Python, version %s, use the master code/branch." %
|
||||
sys.version[0:3])
|
||||
elif (3, 3) <= SYS_VERSION <= (3, 6):
|
||||
mess += (
|
||||
"\nFor your Python, version %s, use the python-2.4 code/branch."
|
||||
"\nFor your Python, version %s, use the python-3.3-3.5 code/branch."
|
||||
% sys.version[0:3]
|
||||
)
|
||||
if (3, 3) <= SYS_VERSION < (3, 6):
|
||||
elif (3, 0) >= SYS_VERSION < (3, 3):
|
||||
mess += (
|
||||
"\nFor your Python, version %s, use the python-3.3-to-3.5 code/branch."
|
||||
"\nFor your Python, version %s, use the python-3.0-to-3.2 code/branch."
|
||||
% sys.version[0:3]
|
||||
)
|
||||
elif SYS_VERSION < (2, 4):
|
||||
mess += (
|
||||
"\nThis package is not supported for Python version %s." % sys.version[0:3]
|
||||
"\nThis package is not supported for Python before Python 2.4 version %s." % sys.version[0:3]
|
||||
)
|
||||
print(mess)
|
||||
raise Exception(mess)
|
||||
|
56
test-unit/test_grammar.py
Normal file
56
test-unit/test_grammar.py
Normal file
@@ -0,0 +1,56 @@
|
||||
import re
|
||||
import unittest
|
||||
from uncompyle6.parser import get_python_parser, python_parser
|
||||
from xdis.version_info import PYTHON_VERSION_TRIPLE, IS_PYPY
|
||||
|
||||
class TestGrammar(unittest.TestCase):
|
||||
def test_grammar(self):
|
||||
|
||||
def check_tokens(tokens, opcode_set):
|
||||
remain_tokens = set(tokens) - opcode_set
|
||||
remain_tokens = set([re.sub('_\d+$','', t) for t in remain_tokens])
|
||||
remain_tokens = set([re.sub('_CONT$','', t) for t in remain_tokens])
|
||||
remain_tokens = set(remain_tokens) - opcode_set
|
||||
self.assertEqual(remain_tokens, set([]),
|
||||
"Remaining tokens %s\n====\n%s" % (remain_tokens, p.dump_grammar()))
|
||||
|
||||
p = get_python_parser(PYTHON_VERSION_TRIPLE, is_pypy=IS_PYPY)
|
||||
(lhs, rhs, tokens,
|
||||
right_recursive, dup_rhs) = p.check_sets()
|
||||
expect_lhs = set(['pos_arg', 'get_iter', 'attribute'])
|
||||
unused_rhs = set(['list', 'call', 'mkfunc',
|
||||
'mklambda',
|
||||
'unpack',])
|
||||
|
||||
expect_right_recursive = frozenset([('designList',
|
||||
('store', 'DUP_TOP', 'designList'))])
|
||||
expect_lhs.add('kwarg')
|
||||
|
||||
self.assertEqual(expect_lhs, set(lhs))
|
||||
self.assertEqual(unused_rhs, set(rhs))
|
||||
self.assertEqual(expect_right_recursive, right_recursive)
|
||||
|
||||
expect_dup_rhs = frozenset([('COME_FROM',), ('CONTINUE',), ('JUMP_ABSOLUTE',),
|
||||
('LOAD_CONST',),
|
||||
('JUMP_BACK',), ('JUMP_FORWARD',)])
|
||||
|
||||
reduced_dup_rhs = {}
|
||||
for k in dup_rhs:
|
||||
if k not in expect_dup_rhs:
|
||||
reduced_dup_rhs[k] = dup_rhs[k]
|
||||
pass
|
||||
pass
|
||||
for k in reduced_dup_rhs:
|
||||
print(k, reduced_dup_rhs[k])
|
||||
# assert not reduced_dup_rhs, reduced_dup_rhs
|
||||
|
||||
# FIXME: Something got borked here
|
||||
def no_test_dup_rule(self):
|
||||
import inspect
|
||||
python_parser(PYTHON_VERSION_TRIPLE, inspect.currentframe().f_code,
|
||||
is_pypy=IS_PYPY,
|
||||
parser_debug={
|
||||
'dups': True, 'transition': False, 'reduce': False,
|
||||
'rules': False, 'errorstack': None, 'context': True})
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
@@ -30,55 +30,46 @@ check:
|
||||
$(MAKE) check-$(PYTHON_VERSION)
|
||||
|
||||
#: Run working tests from Python 2.6 or 2.7
|
||||
check-2.6 check-2.7: check-bytecode-2 check-bytecode-3 check-bytecode-1 check-native-short
|
||||
check-2.4 check-2.5 check-2.6 check-2.7: check-bytecode-2 check-bytecode-3 check-bytecode-1 check-native-short
|
||||
|
||||
#: Run working tests from Python 3.0
|
||||
check-3.0: check-bytecode
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.0-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.0 --syntax-verify $(COMPILE)
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.0-run
|
||||
|
||||
#: Run working tests from Python 3.1
|
||||
check-3.1: check-bytecode
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.1-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.1 --syntax-verify $(COMPILE)
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.1-run
|
||||
|
||||
#: Run working tests from Python 3.2
|
||||
check-3.2: check-bytecode
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.2-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.2 --syntax-verify $(COMPILE)
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.2-run
|
||||
|
||||
#: Run working tests from Python 3.3
|
||||
check-3.3: check-bytecode
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.3-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.3 --syntax-verify $(COMPILE)
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.3-run
|
||||
|
||||
#: Run working tests from Python 3.4
|
||||
check-3.4: check-bytecode check-3.4-ok check-2.7-ok
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.4-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.4 --syntax-verify $(COMPILE)
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.4-run
|
||||
|
||||
#: Run working tests from Python 3.5
|
||||
check-3.5: check-bytecode
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.5-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.5 --syntax-verify $(COMPILE)
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.5-run
|
||||
|
||||
#: Run working tests from Python 3.6
|
||||
check-3.6: check-bytecode
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.6-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.6 --syntax-verify $(COMPILE)
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.6-run
|
||||
|
||||
#: Run working tests from Python 3.7
|
||||
check-3.7: check-bytecode
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.7-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.7 --syntax-verify $(COMPILE)
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.7-run
|
||||
|
||||
# #: Run working tests from Python 3.8
|
||||
# check-3.8: check-bytecode
|
||||
# $(PYTHON) test_pythonlib.py --bytecode-3.8-run --verify-run
|
||||
# $(PYTHON) test_pythonlib.py --bytecode-3.8 --syntax-verify $(COMPILE)
|
||||
check-pypy37: check-bytecode
|
||||
$(PYTHON) test_pythonlib.py --bytecode-pypy37 --verify-run
|
||||
|
||||
#: Run working tests from Python 3.8
|
||||
check-3.8: check-bytecode
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.8-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.8 --syntax-verify $(COMPILE)
|
||||
$(PYTHON) test_pythonlib.py --bytecode-pypy37
|
||||
|
||||
check-3.9: check-bytecode
|
||||
@echo "Note that we do not support decompiling Python 3.9 bytecode - no 3.9 tests run"
|
||||
@@ -274,54 +265,58 @@ grammar-coverage-3.7:
|
||||
|
||||
#: Check deparsing Python 3.0
|
||||
check-bytecode-3.0:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.0-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.0 --syntax-verify
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.0-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.0
|
||||
|
||||
#: Check deparsing Python 3.1
|
||||
check-bytecode-3.1:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.1-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.1 --syntax-verify
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.1-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.1
|
||||
|
||||
#: Check deparsing Python 3.2
|
||||
check-bytecode-3.2:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.2-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.2 --syntax-verify
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.2-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.2
|
||||
|
||||
#: Check deparsing Python 3.3
|
||||
check-bytecode-3.3:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.3-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.3 --syntax-verify
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.3-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.3
|
||||
|
||||
#: Check deparsing Python 3.4
|
||||
check-bytecode-3.4:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.4-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.4 --syntax-verify
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.4-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.4
|
||||
|
||||
#: Check deparsing Python 3.5
|
||||
check-bytecode-3.5:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.5-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.5 --syntax-verify
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.5-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.5
|
||||
|
||||
#: Check deparsing Python 3.6
|
||||
check-bytecode-3.6:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.6-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.6 --syntax-verify
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.6-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.6
|
||||
|
||||
#: Check deparsing Python 3.7
|
||||
check-bytecode-3.7:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.7-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.7 --syntax-verify
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.7-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.7
|
||||
|
||||
#: Check deparsing Python 3.8
|
||||
check-bytecode-3.8:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.8-run --verify-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.8 --syntax-verify
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.8-run
|
||||
$(PYTHON) test_pythonlib.py --bytecode-3.8
|
||||
|
||||
#: short tests for bytecodes only for this version of Python
|
||||
check-native-short:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-$(PYTHON_VERSION) --syntax-verify $(COMPILE)
|
||||
$(PYTHON) test_pythonlib.py --bytecode-$(PYTHON_VERSION)-run --verify-run $(COMPILE)
|
||||
|
||||
#: Run longer Python 2.6's lib files known to be okay
|
||||
check-2.4-ok:
|
||||
$(PYTHON) test_pythonlib.py --ok-2.4 --verify $(COMPILE)
|
||||
|
||||
#: Run longer Python 2.6's lib files known to be okay
|
||||
check-2.6-ok:
|
||||
$(PYTHON) test_pythonlib.py --ok-2.6 --syntax-verify $(COMPILE)
|
||||
|
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_2.2/10_del.pyc
Normal file
BIN
test/bytecode_2.2/10_del.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.4/01_ops.pyc
Normal file
BIN
test/bytecode_2.4/01_ops.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.4/01_triple_compare.pyc
Normal file
BIN
test/bytecode_2.4/01_triple_compare.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_2.4/02_unary_convert.pyc
Normal file
BIN
test/bytecode_2.4/02_unary_convert.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.4/02_yield_bug.pyc
Normal file
BIN
test/bytecode_2.4/02_yield_bug.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_2.4_run/01_lambda_call.pyc
Normal file
BIN
test/bytecode_2.4_run/01_lambda_call.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.4_run/02_slice.pyc
Normal file
BIN
test/bytecode_2.4_run/02_slice.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_2.4_run/04_try_else_confuse.pyc
Normal file
BIN
test/bytecode_2.4_run/04_try_else_confuse.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.4_run/10_for.pyc
Normal file
BIN
test/bytecode_2.4_run/10_for.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.4_run/10_mixed_boolean.pyc
Normal file
BIN
test/bytecode_2.4_run/10_mixed_boolean.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.4_run/15_mixed_expressions.pyc
Normal file
BIN
test/bytecode_2.4_run/15_mixed_expressions.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_2.5/06_setif_comprehension.pyc
Normal file
BIN
test/bytecode_2.5/06_setif_comprehension.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_2.6_run/02_slice.pyc
Normal file
BIN
test/bytecode_2.6_run/02_slice.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.6_run/10_for.pyc
Normal file
BIN
test/bytecode_2.6_run/10_for.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.6_run/10_mixed_boolean.pyc
Normal file
BIN
test/bytecode_2.6_run/10_mixed_boolean.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,17 +1,16 @@
|
||||
#!/usr/bin/env python
|
||||
# Mode: -*- python -*-
|
||||
#
|
||||
# Copyright (c) 2015 by Rocky Bernstein <rb@dustyfeet.com>
|
||||
# Copyright (c) 2015, 2017, 2022 by Rocky Bernstein <rb@dustyfeet.com>
|
||||
#
|
||||
from __future__ import print_function
|
||||
|
||||
|
||||
import dis, os.path
|
||||
from xdis import PYTHON_VERSION_TRIPL< PYTHON_VERSION_STR
|
||||
|
||||
try:
|
||||
if PYTHON_VERSION_TRIPLE < (2, 5):
|
||||
from cStringIO import StringIO
|
||||
else:
|
||||
from StringIO import StringIO
|
||||
except ImportError:
|
||||
from io import StringIO
|
||||
|
||||
program = os.path.basename(__file__)
|
||||
|
||||
@@ -23,7 +22,7 @@ Usage: %s [OPTIONS]... FILE
|
||||
usage_short = "Usage: %s [OPTIONS]... FILE" % program
|
||||
|
||||
import uncompyle6
|
||||
from uncompyle6 import PYTHON_VERSION_STR, check_python_version
|
||||
from uncompyle6 check_python_version
|
||||
from uncompyle6.disas import disco
|
||||
|
||||
def inst_fmt(inst):
|
||||
|
@@ -34,10 +34,9 @@ else
|
||||
fi
|
||||
|
||||
MAIN="test_pyenvlib.py"
|
||||
|
||||
USER=${USER:-rocky}
|
||||
EMAIL=${EMAIL:-rb@dustyfeet.com}
|
||||
WHAT="uncompyle6 ${MAIN}"
|
||||
WHAT="uncompyle6 2.4 ${MAIN}"
|
||||
MAX_TESTS=${MAX_TESTS:-800}
|
||||
export BATCH=1
|
||||
|
||||
@@ -45,7 +44,7 @@ typeset -i RUN_STARTTIME=$(date +%s)
|
||||
|
||||
# PYVERSIONS="3.5.6"
|
||||
MAILBODY=/tmp/${MAIN}-mailbody-$$.txt
|
||||
# for VERSION in 3.3.7 ; do
|
||||
# for VERSION in 2.4.6 2.5.9 ; do
|
||||
for VERSION in $PYVERSIONS ; do
|
||||
typeset -i rc=0
|
||||
LOGFILE=/tmp/${MAIN}-$VERSION-$$.log
|
||||
|
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from uncompyle6 import uncompyle
|
||||
from uncompyle6.main import decompile
|
||||
from xdis import sysinfo2float
|
||||
import sys, inspect
|
||||
|
17
test/simple_source/bug14/lambda.py
Normal file
17
test/simple_source/bug14/lambda.py
Normal file
@@ -0,0 +1,17 @@
|
||||
palette = map(lambda a:(a,
|
||||
a,
|
||||
a)
|
||||
, range(256))
|
||||
palette = map(lambda (r, g, b,):((chr(r) + chr(g)) + chr(b))
|
||||
, palette)
|
||||
palette = map(lambda r:r
|
||||
, palette)
|
||||
palette = lambda (r, g, b,):r
|
||||
|
||||
palette = lambda (r):r
|
||||
|
||||
palette = lambda r:r
|
||||
|
||||
palette = (lambda (r):r
|
||||
,
|
||||
palette)
|
7
test/simple_source/bug25/02_yield_bug.py
Normal file
7
test/simple_source/bug25/02_yield_bug.py
Normal file
@@ -0,0 +1,7 @@
|
||||
# From 2.4 test_array.py
|
||||
# In Python 2.4 and earlier "yield" is not valid and instead
|
||||
# we must use "yield None". Bug was not adding "None"
|
||||
|
||||
def yield_bug():
|
||||
yield None
|
||||
return
|
19
test/simple_source/bug25/04_try_else_confuse.py
Normal file
19
test/simple_source/bug25/04_try_else_confuse.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# From 2.4 test_sax.py
|
||||
# Bug was distinguishing try from try/else
|
||||
|
||||
def verify_empty_attrs():
|
||||
gvqk = 3
|
||||
try:
|
||||
gvk = 1/0
|
||||
except ZeroDivisionError:
|
||||
gvk = 1
|
||||
|
||||
try:
|
||||
gvqk = 0
|
||||
except KeyError:
|
||||
gvqk = 1
|
||||
|
||||
# If try/else was used above the return will be 4
|
||||
return gvk + gvqk
|
||||
|
||||
assert 1 == verify_empty_attrs()
|
@@ -5,6 +5,7 @@ SKIP_TESTS=(
|
||||
[test_ftplib.py]=1 # FIXME: Works on c90ff51
|
||||
[test_slice.py]=1 # FIXME: Works on c90ff51
|
||||
[test_sort.py]=1 # FIXME: Works on c90ff51
|
||||
[test_strftime.py]=1 # FIXME: Works on c90ff51
|
||||
[test_timeit.py]=1 # FIXME: Works on c90ff51
|
||||
[test_os.py]=1 # parse error FIXME: Works on c90ff51
|
||||
|
||||
|
@@ -234,7 +234,7 @@ for file in $files; do
|
||||
$fulldir/compile-file.py $file && \
|
||||
mv $file{,.orig} && \
|
||||
echo ========== $(date +%X) Decompiling $file ===========
|
||||
$DECOMPILER $OPTS $decompiled_file > $file
|
||||
$DECOMPILER $OPTS $decompiled_file > $file 2>/dev/null
|
||||
rc=$?
|
||||
if (( rc == 0 )) ; then
|
||||
echo ========== $(date +%X) Running $file ===========
|
||||
|
@@ -20,8 +20,6 @@ Step 2: Run the test:
|
||||
test_pyenvlib --mylib --verify # decompile verify 'mylib'
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os, time, re, shutil, sys
|
||||
from fnmatch import fnmatch
|
||||
|
||||
@@ -81,10 +79,6 @@ for vers in TEST_VERSIONS:
|
||||
else:
|
||||
if vers == "native":
|
||||
short_vers = os.path.basename(sys.path[-1])
|
||||
from xdis.version_info import PYTHON_VERSION_TRIPLE, version_tuple_to_str
|
||||
if PYTHON_VERSION_TRIPLE > (3, 0):
|
||||
version = version_tuple_to_str(end=2)
|
||||
PYC = f"*.cpython-{version}.pyc"
|
||||
test_options[vers] = (sys.path[-1], PYC, short_vers)
|
||||
else:
|
||||
short_vers = vers[:3]
|
||||
|
@@ -27,17 +27,19 @@ Step 2: Run the test:
|
||||
test_pythonlib.py --mylib --verify # decompile verify 'mylib'
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import getopt, os, py_compile, sys, shutil, tempfile, time
|
||||
|
||||
from fnmatch import fnmatch
|
||||
from uncompyle6.main import main
|
||||
from xdis.version_info import PYTHON_VERSION
|
||||
from xdis.version_info import PYTHON_VERSION, PYTHON_VERSION_TRIPLE
|
||||
|
||||
|
||||
def get_srcdir():
|
||||
filename = os.path.normcase(os.path.dirname(__file__))
|
||||
if PYTHON_VERSION_TRIPLE < (2, 5):
|
||||
def five(): return 5
|
||||
filename = five.func_code.co_filename
|
||||
else:
|
||||
filename = os.path.normcase(os.path.dirname(__file__))
|
||||
return os.path.realpath(filename)
|
||||
|
||||
|
||||
@@ -165,11 +167,10 @@ def do_tests(src_dir, obj_patterns, target_dir, opts):
|
||||
if opts["do_compile"]:
|
||||
compiled_version = opts["compiled_version"]
|
||||
if compiled_version and PYTHON_VERSION != compiled_version:
|
||||
print(
|
||||
"Not compiling: desired Python version is %s but we are running %s"
|
||||
% (compiled_version, PYTHON_VERSION),
|
||||
file=sys.stderr,
|
||||
)
|
||||
sys.stderr.write("Not compiling: "
|
||||
"desired Python version is %s "
|
||||
"but we are running %s" %
|
||||
(compiled_version, PYTHON_VERSION))
|
||||
else:
|
||||
for root, dirs, basenames in os.walk(src_dir):
|
||||
file_matches(files, root, basenames, PY)
|
||||
@@ -187,10 +188,8 @@ def do_tests(src_dir, obj_patterns, target_dir, opts):
|
||||
file_matches(files, dirname, basenames, obj_patterns)
|
||||
|
||||
if not files:
|
||||
print(
|
||||
"Didn't come up with any files to test! Try with --compile?",
|
||||
file=sys.stderr,
|
||||
)
|
||||
sys.stderr.write("Didn't come up with any files to test! "
|
||||
"Try with --compile?")
|
||||
exit(1)
|
||||
|
||||
os.chdir(cwd)
|
||||
@@ -205,8 +204,8 @@ def do_tests(src_dir, obj_patterns, target_dir, opts):
|
||||
pass
|
||||
|
||||
print(time.ctime())
|
||||
print("Source directory: ", src_dir)
|
||||
print("Output directory: ", target_dir)
|
||||
print "Source directory: ", src_dir
|
||||
print "Output directory: ", target_dir
|
||||
try:
|
||||
_, _, failed_files, failed_verify = main(
|
||||
src_dir, target_dir, files, [], do_verify=opts["do_verify"]
|
||||
@@ -293,13 +292,13 @@ if __name__ == "__main__":
|
||||
if os.path.isdir(src_dir):
|
||||
checked_dirs.append([src_dir, pattern, target_dir])
|
||||
else:
|
||||
print("Can't find directory %s. Skipping" % src_dir, file=sys.stderr)
|
||||
sys.stderr.write("Can't find directory %s. Skipping" % src_dir)
|
||||
continue
|
||||
last_compile_version = compiled_version
|
||||
pass
|
||||
|
||||
if not checked_dirs:
|
||||
print("No directories found to check", file=sys.stderr)
|
||||
sys.stderr.write("No directories found to check\n")
|
||||
sys.exit(1)
|
||||
|
||||
test_opts["compiled_version"] = last_compile_version
|
||||
|
1
uncompyle6/.gitignore
vendored
Normal file
1
uncompyle6/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/.python-version
|
@@ -3,7 +3,6 @@
|
||||
#
|
||||
# Copyright (c) 2015-2016, 2018, 2020, 2022 by Rocky Bernstein <rb@dustyfeet.com>
|
||||
#
|
||||
from __future__ import print_function
|
||||
import sys, os, getopt
|
||||
|
||||
from uncompyle6.code_fns import disassemble_file
|
||||
@@ -13,8 +12,8 @@ program, ext = os.path.splitext(os.path.basename(__file__))
|
||||
|
||||
__doc__ = """
|
||||
Usage:
|
||||
{0} [OPTIONS]... FILE
|
||||
{0} [--help | -h | -V | --version]
|
||||
%s [OPTIONS]... FILE
|
||||
%s [--help | -h | -V | --version]
|
||||
|
||||
Disassemble/Tokenize FILE with in the way that is done to
|
||||
assist uncompyle6 in parsing the instruction stream. For example
|
||||
@@ -30,9 +29,9 @@ Python library module "dis", or pydisasm from the cross-version
|
||||
Python bytecode package "xdis".
|
||||
|
||||
Examples:
|
||||
{0} foo.pyc
|
||||
{0} foo.py # same thing as above but find the file
|
||||
{0} foo.pyc bar.pyc # disassemble foo.pyc and bar.pyc
|
||||
%s foo.pyc
|
||||
%s foo.py # same thing as above but find the file
|
||||
%s foo.pyc bar.pyc # disassemble foo.pyc and bar.pyc
|
||||
|
||||
See also `pydisasm' from the `xdis' package.
|
||||
|
||||
@@ -40,7 +39,7 @@ Options:
|
||||
-V | --version show version and stop
|
||||
-h | --help show this message
|
||||
|
||||
""".format(program)
|
||||
""" % ((program,) * 5)
|
||||
|
||||
PATTERNS = ('*.pyc', '*.pyo')
|
||||
|
||||
@@ -49,15 +48,15 @@ def main():
|
||||
Type -h for for full help.""" % program
|
||||
|
||||
if len(sys.argv) == 1:
|
||||
print("No file(s) given", file=sys.stderr)
|
||||
print(Usage_short, file=sys.stderr)
|
||||
sys.stderr.write("No file(s) given\n")
|
||||
sys.stderr.write(Usage_short)
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
opts, files = getopt.getopt(sys.argv[1:], 'hVU',
|
||||
['help', 'version', 'uncompyle6'])
|
||||
except getopt.GetoptError as e:
|
||||
print('%s: %s' % (os.path.basename(sys.argv[0]), e), file=sys.stderr)
|
||||
except getopt.GetoptError(e):
|
||||
sys.stderr.write('%s: %s' % (os.path.basename(sys.argv[0]), e))
|
||||
sys.exit(-1)
|
||||
|
||||
for opt, val in opts:
|
||||
@@ -69,15 +68,14 @@ Type -h for for full help.""" % program
|
||||
sys.exit(0)
|
||||
else:
|
||||
print(opt)
|
||||
print(Usage_short, file=sys.stderr)
|
||||
sys.stderr.write(Usage_short)
|
||||
sys.exit(1)
|
||||
|
||||
for file in files:
|
||||
if os.path.exists(files[0]):
|
||||
disassemble_file(file, sys.stdout)
|
||||
else:
|
||||
print("Can't read %s - skipping" % files[0],
|
||||
file=sys.stderr)
|
||||
sys.stderr.write("Can't read %s - skipping\n" % files[0])
|
||||
pass
|
||||
pass
|
||||
return
|
||||
|
@@ -4,7 +4,6 @@
|
||||
# Copyright (c) 2015-2017, 2019-2020 by Rocky Bernstein
|
||||
# Copyright (c) 2000-2002 by hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||
#
|
||||
from __future__ import print_function
|
||||
import sys, os, getopt, time
|
||||
from xdis.version_info import version_tuple_to_str
|
||||
|
||||
@@ -72,15 +71,12 @@ def usage():
|
||||
|
||||
|
||||
def main_bin():
|
||||
if not (sys.version_info[0:2] in ((2, 6), (2, 7), (3, 0),
|
||||
if not (sys.version_info[0:2] in ((2, 4), (2, 5), (2, 6), (2, 7), (3, 0),
|
||||
(3, 1), (3, 2), (3, 3),
|
||||
(3, 4), (3, 5), (3, 6),
|
||||
(3, 7), (3, 8), (3, 9), (3, 10)
|
||||
)):
|
||||
print(
|
||||
f"Error: {program} can decompile only bytecode from Python 3.7"
|
||||
f""" to 3.8.\n\tYou have version: {version_tuple_to_str()}."""
|
||||
)
|
||||
print('Error: %s requires Python 2.4-3.10' % program)
|
||||
sys.exit(-1)
|
||||
|
||||
do_verify = recurse_dirs = False
|
||||
@@ -98,8 +94,9 @@ def main_bin():
|
||||
'fragments verify verify-run version '
|
||||
'syntax-verify '
|
||||
'showgrammar encoding='.split(' '))
|
||||
except getopt.GetoptError as e:
|
||||
print('%s: %s' % (os.path.basename(sys.argv[0]), e), file=sys.stderr)
|
||||
except getopt.GetoptError, e:
|
||||
sys.stderr.write('%s: %s\n' %
|
||||
(os.path.basename(sys.argv[0]), e))
|
||||
sys.exit(-1)
|
||||
|
||||
options = {}
|
||||
@@ -154,7 +151,7 @@ def main_bin():
|
||||
elif opt == '--encoding':
|
||||
options['source_encoding'] = val
|
||||
else:
|
||||
print(opt, file=sys.stderr)
|
||||
sys.stderr.write(opt)
|
||||
usage()
|
||||
|
||||
# expand directory if specified
|
||||
@@ -178,8 +175,8 @@ def main_bin():
|
||||
sb_len = len( os.path.join(src_base, '') )
|
||||
pyc_paths = [f[sb_len:] for f in pyc_paths]
|
||||
|
||||
if not pyc_paths and not source_paths:
|
||||
print("No input files given to decompile", file=sys.stderr)
|
||||
if not pyc_paths:
|
||||
sys.stderr.write("No files given\n")
|
||||
usage()
|
||||
|
||||
if outfile == '-':
|
||||
@@ -201,8 +198,8 @@ def main_bin():
|
||||
mess = status_msg(*result)
|
||||
print('# ' + mess)
|
||||
pass
|
||||
except ImportError as e:
|
||||
print(str(e))
|
||||
except ImportError:
|
||||
print(str(sys.exc_info()[1]))
|
||||
sys.exit(2)
|
||||
except (KeyboardInterrupt):
|
||||
pass
|
||||
|
@@ -46,9 +46,9 @@ def disco(version, co, out=None, is_pypy=False):
|
||||
|
||||
# store final output stream for case of error
|
||||
real_out = out or sys.stdout
|
||||
print("# Python %s" % version_tuple_to_str(version), file=real_out)
|
||||
real_out.write("# Python %s\n" % version_tuple_to_str(version))
|
||||
if co.co_filename:
|
||||
print("# Embedded file name: %s" % co.co_filename, file=real_out)
|
||||
real_out.write("# Embedded file name: %s\n" % co.co_filename)
|
||||
|
||||
scanner = get_scanner(version, is_pypy=is_pypy)
|
||||
|
||||
@@ -61,16 +61,14 @@ def disco_loop(disasm, queue, real_out):
|
||||
co = queue.popleft()
|
||||
if co.co_name != "<module>":
|
||||
if hasattr(co, "co_firstlineno"):
|
||||
print(
|
||||
"\n# %s line %d of %s"
|
||||
% (co.co_name, co.co_firstlineno, co.co_filename),
|
||||
file=real_out,
|
||||
real_out.write(
|
||||
"\n# %s line %d of %s\n"
|
||||
% (co.co_name, co.co_firstlineno, co.co_filename)
|
||||
)
|
||||
else:
|
||||
print(
|
||||
"\n# %s of %s"
|
||||
% (co.co_name, co.co_filename),
|
||||
file=real_out,
|
||||
real_out.write(
|
||||
"\n# %s %s\n"
|
||||
% (co.co_name, co.co_filename)
|
||||
)
|
||||
tokens, customize = disasm(co)
|
||||
for t in tokens:
|
||||
@@ -78,7 +76,7 @@ def disco_loop(disasm, queue, real_out):
|
||||
queue.append(t.pattr)
|
||||
elif iscode(t.attr):
|
||||
queue.append(t.attr)
|
||||
print(t, file=real_out)
|
||||
real_out.write(str(t) + "\n")
|
||||
pass
|
||||
pass
|
||||
|
||||
|
@@ -38,7 +38,7 @@ def line_number_mapping(pyc_filename, src_filename):
|
||||
) = load_module(pyc_filename)
|
||||
try:
|
||||
code2 = load_file(src_filename)
|
||||
except SyntaxError as e:
|
||||
except SyntaxError, e:
|
||||
return str(e)
|
||||
|
||||
queue = deque([code1, code2])
|
||||
|
@@ -12,9 +12,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from typing import Any, Tuple
|
||||
import datetime, py_compile, os, sys
|
||||
import datetime, os, py_compile, subprocess, sys
|
||||
|
||||
from xdis import iscode
|
||||
from xdis.version_info import IS_PYPY, PYTHON_VERSION_TRIPLE, version_tuple_to_str
|
||||
@@ -22,6 +20,7 @@ from uncompyle6.code_fns import check_object_path
|
||||
from uncompyle6.semantics import pysource
|
||||
from uncompyle6.semantics.pysource import PARSER_DEFAULT_DEBUG
|
||||
from uncompyle6.parser import ParserError
|
||||
from uncompyle6 import verify
|
||||
from uncompyle6.version import __version__
|
||||
|
||||
# from uncompyle6.linenumbers import line_number_mapping
|
||||
@@ -32,7 +31,7 @@ from uncompyle6.semantics.linemap import deparse_code_with_map
|
||||
|
||||
from xdis.load import load_module
|
||||
|
||||
def _get_outstream(outfile: str) -> Any:
|
||||
def _get_outstream(outfile):
|
||||
dir = os.path.dirname(outfile)
|
||||
failed_file = outfile + "_failed"
|
||||
if os.path.exists(failed_file):
|
||||
@@ -41,12 +40,11 @@ def _get_outstream(outfile: str) -> Any:
|
||||
os.makedirs(dir)
|
||||
except OSError:
|
||||
pass
|
||||
return open(outfile, mode="w", encoding="utf-8")
|
||||
|
||||
return open(outfile, 'wb')
|
||||
|
||||
def decompile(
|
||||
co,
|
||||
bytecode_version: Tuple[int] = PYTHON_VERSION_TRIPLE,
|
||||
bytecode_version = PYTHON_VERSION_TRIPLE,
|
||||
out=sys.stdout,
|
||||
showasm=None,
|
||||
showast={},
|
||||
@@ -60,7 +58,7 @@ def decompile(
|
||||
mapstream=None,
|
||||
do_fragments=False,
|
||||
compile_mode="exec",
|
||||
) -> Any:
|
||||
):
|
||||
"""
|
||||
ingests and deparses a given code block 'co'
|
||||
|
||||
@@ -79,10 +77,23 @@ def decompile(
|
||||
s += "\n"
|
||||
real_out.write(s)
|
||||
|
||||
assert iscode(co), f"""{co} does not smell like code"""
|
||||
assert iscode(co), ("%s does not smell like code" % co)
|
||||
|
||||
if is_pypy:
|
||||
co_pypy_str = "PyPy "
|
||||
else:
|
||||
co_pypy_str = ""
|
||||
|
||||
if IS_PYPY:
|
||||
run_pypy_str = "PyPy "
|
||||
else:
|
||||
run_pypy_str = ""
|
||||
|
||||
if magic_int:
|
||||
m = str(magic_int)
|
||||
else:
|
||||
m = ""
|
||||
|
||||
co_pypy_str = "PyPy " if is_pypy else ""
|
||||
run_pypy_str = "PyPy " if IS_PYPY else ""
|
||||
sys_version_lines = sys.version.split("\n")
|
||||
if source_encoding:
|
||||
write("# -*- coding: %s -*-" % source_encoding)
|
||||
@@ -93,20 +104,24 @@ def decompile(
|
||||
__version__,
|
||||
co_pypy_str,
|
||||
version_tuple_to_str(bytecode_version),
|
||||
" (%s)" % str(magic_int) if magic_int else "",
|
||||
run_pypy_str,
|
||||
" (%s)" % m, run_pypy_str,
|
||||
"\n# ".join(sys_version_lines),
|
||||
)
|
||||
)
|
||||
if co.co_filename:
|
||||
write("# Embedded file name: %s" % co.co_filename)
|
||||
if timestamp:
|
||||
write("# Compiled at: %s" % datetime.datetime.fromtimestamp(timestamp))
|
||||
write("# Compiled at: %s" %
|
||||
datetime.datetime.fromtimestamp(timestamp))
|
||||
if source_size:
|
||||
write("# Size of source mod 2**32: %d bytes" % source_size)
|
||||
real_out.write("# Size of source mod 2**32: %d bytes\n" %
|
||||
source_size)
|
||||
|
||||
# maybe a second -a will do before as well
|
||||
asm = "after" if showasm else None
|
||||
if showasm:
|
||||
asm = "after"
|
||||
else:
|
||||
asm = None
|
||||
|
||||
grammar = dict(PARSER_DEFAULT_DEBUG)
|
||||
if showgrammar:
|
||||
@@ -128,6 +143,7 @@ def decompile(
|
||||
showgrammar,
|
||||
code_objects=code_objects,
|
||||
is_pypy=is_pypy,
|
||||
compile_mode=compile_mode,
|
||||
)
|
||||
header_count = 3 + len(sys_version_lines)
|
||||
linemap = [
|
||||
@@ -150,12 +166,12 @@ def decompile(
|
||||
)
|
||||
pass
|
||||
return deparsed
|
||||
except pysource.SourceWalkerError as e:
|
||||
except pysource.SourceWalkerError, e:
|
||||
# deparsing failed
|
||||
raise pysource.SourceWalkerError(str(e))
|
||||
|
||||
|
||||
def compile_file(source_path: str) -> str:
|
||||
def compile_file(source_path):
|
||||
if source_path.endswith(".py"):
|
||||
basename = source_path[:-3]
|
||||
else:
|
||||
@@ -172,7 +188,7 @@ def compile_file(source_path: str) -> str:
|
||||
|
||||
|
||||
def decompile_file(
|
||||
filename: str,
|
||||
filename,
|
||||
outstream=None,
|
||||
showasm=None,
|
||||
showast={},
|
||||
@@ -180,7 +196,7 @@ def decompile_file(
|
||||
source_encoding=None,
|
||||
mapstream=None,
|
||||
do_fragments=False,
|
||||
) -> Any:
|
||||
):
|
||||
"""
|
||||
decompile Python byte-code file (.pyc). Return objects to
|
||||
all of the deparsed objects found in `filename`.
|
||||
@@ -237,10 +253,10 @@ def decompile_file(
|
||||
|
||||
# FIXME: combine into an options parameter
|
||||
def main(
|
||||
in_base: str,
|
||||
out_base: str,
|
||||
compiled_files: list,
|
||||
source_files: list,
|
||||
in_base,
|
||||
out_base,
|
||||
compiled_files,
|
||||
source_files,
|
||||
outfile=None,
|
||||
showasm=None,
|
||||
showast={},
|
||||
@@ -250,7 +266,7 @@ def main(
|
||||
raise_on_error=False,
|
||||
do_linemaps=False,
|
||||
do_fragments=False,
|
||||
) -> Tuple[int, int, int, int]:
|
||||
):
|
||||
"""
|
||||
in_base base directory for input files
|
||||
out_base base directory for output files (ignored when
|
||||
@@ -288,6 +304,17 @@ def main(
|
||||
outstream = sys.stdout
|
||||
if do_linemaps:
|
||||
linemap_stream = sys.stdout
|
||||
if do_verify:
|
||||
prefix = os.path.basename(filename) + "-"
|
||||
if prefix.endswith(".py"):
|
||||
prefix = prefix[: -len(".py")]
|
||||
|
||||
# Unbuffer output if possible
|
||||
if sys.stdout.isatty():
|
||||
buffering = -1
|
||||
else:
|
||||
buffering = 0
|
||||
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', buffering)
|
||||
else:
|
||||
if filename.endswith(".pyc"):
|
||||
current_outfile = os.path.join(out_base, filename[0:-1])
|
||||
@@ -331,9 +358,9 @@ def main(
|
||||
pass
|
||||
pass
|
||||
tot_files += 1
|
||||
except (ValueError, SyntaxError, ParserError, pysource.SourceWalkerError) as e:
|
||||
except (ValueError, SyntaxError, ParserError, pysource.SourceWalkerError):
|
||||
sys.stdout.write("\n")
|
||||
sys.stderr.write(f"\n# file {infile}\n# {e}\n")
|
||||
sys.stderr.write("# file %s\n" % (infile))
|
||||
failed_files += 1
|
||||
tot_files += 1
|
||||
except KeyboardInterrupt:
|
||||
@@ -341,10 +368,10 @@ def main(
|
||||
outstream.close()
|
||||
os.remove(outfile)
|
||||
sys.stdout.write("\n")
|
||||
sys.stderr.write(f"\nLast file: {infile} ")
|
||||
sys.stderr.write("\nLast file: %s " % (infile))
|
||||
raise
|
||||
except RuntimeError as e:
|
||||
sys.stdout.write(f"\n{str(e)}\n")
|
||||
except RuntimeError, e:
|
||||
sys.stdout.write("\n%s\n" % str(e))
|
||||
if str(e).startswith("Unsupported Python"):
|
||||
sys.stdout.write("\n")
|
||||
sys.stderr.write(
|
||||
@@ -369,14 +396,50 @@ def main(
|
||||
else: # uncompile successful
|
||||
if current_outfile:
|
||||
outstream.close()
|
||||
okay_files += 1
|
||||
if do_verify:
|
||||
try:
|
||||
msg = verify.compare_code_with_srcfile(
|
||||
infile, current_outfile, do_verify
|
||||
)
|
||||
if not current_outfile:
|
||||
if not msg:
|
||||
print("\n# okay decompiling %s" % infile)
|
||||
okay_files += 1
|
||||
else:
|
||||
verify_failed_files += 1
|
||||
print("\n# %s\n\t%s", infile, msg)
|
||||
pass
|
||||
else:
|
||||
okay_files += 1
|
||||
pass
|
||||
except verify.VerifyCmpError, e:
|
||||
print(e)
|
||||
verify_failed_files += 1
|
||||
os.rename(current_outfile, current_outfile + "_unverified")
|
||||
sys.stderr.write("### Error Verifying %s\n" % filename)
|
||||
sys.stderr.write(str(e) + "\n")
|
||||
if not outfile:
|
||||
sys.stderr.write("### Error Verifiying %s" %
|
||||
filename)
|
||||
sys.stderr.write(e)
|
||||
if raise_on_error:
|
||||
raise
|
||||
pass
|
||||
pass
|
||||
pass
|
||||
else:
|
||||
okay_files += 1
|
||||
pass
|
||||
elif do_verify:
|
||||
sys.stderr.write("\n### uncompile successful, "
|
||||
"but no file to compare against")
|
||||
pass
|
||||
else:
|
||||
okay_files += 1
|
||||
if not current_outfile:
|
||||
mess = "\n# okay decompiling"
|
||||
# mem_usage = __memUsage()
|
||||
print(mess, infile)
|
||||
print mess, infile
|
||||
if current_outfile:
|
||||
sys.stdout.write(
|
||||
"%s -- %s\r"
|
||||
@@ -434,5 +497,9 @@ def status_msg(do_verify, tot_files, okay_files, failed_files, verify_failed_fil
|
||||
return "\n# Successfully decompiled file"
|
||||
pass
|
||||
pass
|
||||
mess = f"decompiled {tot_files} files: {okay_files} okay, {failed_files} failed"
|
||||
mess = "decompiled %i files: %i okay, %i failed" % (
|
||||
tot_files,
|
||||
okay_files,
|
||||
failed_files,
|
||||
)
|
||||
return mess
|
||||
|
@@ -895,10 +895,9 @@ def python_parser(
|
||||
if __name__ == "__main__":
|
||||
|
||||
def parse_test(co):
|
||||
from xdis import PYTHON_VERSION_TRIPLE, IS_PYPY
|
||||
from xdis.version_info import PYTHON_VERSION_TRIPLE, IS_PYPY
|
||||
|
||||
ast = python_parser(PYTHON_VERSION_TRIPLE, co, showasm=True, is_pypy=IS_PYPY)
|
||||
ast = python_parser(PYTHON_VERSION_TRIPLE[:2], co, showasm=True, is_pypy=IS_PYPY)
|
||||
print(ast)
|
||||
return
|
||||
|
||||
parse_test(parse_test.__code__)
|
||||
parse_test(parse_test.func_code)
|
||||
|
@@ -64,7 +64,7 @@ class Python14Parser(Python15Parser):
|
||||
|
||||
if opname_base == "UNPACK_VARARG":
|
||||
if token.attr > 1:
|
||||
self.addRule(f"star_args ::= RESERVE_FAST {opname} args_store", nop_func)
|
||||
self.addRule("star_args ::= RESERVE_FAST %s args_store" % opname, nop_func)
|
||||
|
||||
|
||||
def reduce_is_invalid(self, rule, ast, tokens, first, last):
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user