Message276359
| Author |
gregory.p.smith |
| Recipients |
brett.cannon, gregory.p.smith, jaraco, ned.deily, twouters |
| Date |
2016年09月13日.22:29:49 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1473805789.8.0.147321260317.issue28131@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This shouldn't be happening and makes no sense. It looks like the assert statement was removed at import code compilation time given the pdb trace with it from a zip file vs with it outside of a zip file:
>>> pdb.run('mod.test(False)')
> <string>(1)<module>()
(Pdb) n
False
--Return--
> <string>(1)<module>()->None
(Pdb) n
>>> pdb.run('mod.test(False)')
> <string>(1)<module>()->None
(Pdb) s
--Call--
> oss/cpython/build/mod.zip/mod.py(1)test()
-> def test(val):
(Pdb) s
> oss/cpython/build/mod.zip/mod.py(3)test()
-> print(val)
(Pdb) s
False
--Return--
> oss/cpython/build/mod.zip/mod.py(3)test()->None
-> print(val)
(Pdb) s
--Return--
> <string>(1)<module>()->None
(Pdb) s
> oss/cpython/default/Lib/bdb.py(435)run()
-> self.quitting = True
(Pdb) s
>>>
vs no zip file:
>>> pdb.run('mod.test(False)')
> <string>(1)<module>()
(Pdb) s
--Call--
> oss/cpython/build/mod.py(1)test()
-> def test(val):
(Pdb) s
> oss/cpython/build/mod.py(2)test()
-> assert(val)
(Pdb) s
AssertionError
> oss/cpython/build/mod.py(2)test()
-> assert(val)
(Pdb) s
--Return--
> oss/cpython/build/mod.py(2)test()->None
-> assert(val)
(Pdb) s
AssertionError
> <string>(1)<module>()
(Pdb) s
--Return--
> <string>(1)<module>()->None
(Pdb) s
AssertionError
> oss/cpython/default/Lib/bdb.py(431)run()
-> exec(cmd, globals, locals)
(Pdb) s
> oss/cpython/default/Lib/bdb.py(432)run()
-> except BdbQuit:
(Pdb) s
> oss/cpython/default/Lib/bdb.py(435)run()
-> self.quitting = True
(Pdb) s
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "oss/cpython/default/Lib/pdb.py", line 1568, in run
Pdb().run(statement, globals, locals)
File "oss/cpython/default/Lib/bdb.py", line 431, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "oss/cpython/build/mod.py", line 2, in test
assert(val)
AssertionError |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年09月13日 22:29:49 | gregory.p.smith | set | recipients:
+ gregory.p.smith, twouters, brett.cannon, jaraco, ned.deily |
| 2016年09月13日 22:29:49 | gregory.p.smith | set | messageid: <1473805789.8.0.147321260317.issue28131@psf.upfronthosting.co.za> |
| 2016年09月13日 22:29:49 | gregory.p.smith | link | issue28131 messages |
| 2016年09月13日 22:29:49 | gregory.p.smith | create |
|