Message309673
On 08/01/2018 16:07, Michael Felt wrote:
> Michael Felt <michael@felt.demon.nl> added the comment:
>
> Considering that _uuid is now working for AIX issue32399 - I need to get some things straight (aka some help please).
>
> Does uuid.py (./Lib/uuid.py) call _uuid.py?
>
> If not, I am curious how _uuid.c is used - because ./Lib/test/test_uuid.py does not seem to be successful in finding it:
>
>> /data/prj/python/git/python3-3.7/Lib/test/test_uuid.py(10)<module>()
> -> py_uuid = support.import_fresh_module('uuid', blocked=['_uuid'])
> (Pdb) n
>> /data/prj/python/git/python3-3.7/Lib/test/test_uuid.py(11)<module>()
> -> c_uuid = support.import_fresh_module('uuid', fresh=['_uuid'])
> (Pdb) n
>> /data/prj/python/git/python3-3.7/Lib/test/test_uuid.py(14)<module>()
> -> def importable(name):
> (Pdb) py_uuid
> <module 'uuid' from '/data/prj/python/git/python3-3.7/Lib/uuid.py'>
> (Pdb) c_uuid
> (Pdb)
>
> So, for now it seems the test is only testing 'uuid.py'. I would like to see the added value of having gotten the _uuid Module to build.
>
> However, if this is 'working as designed' I not worry about it and just go back into the util.py - getnode() etc.
Got this figured out. tested on too many machines - the last version
built was on AIX5 - which does not have uuid() functions in libc.a.
Running on AIX6 - I get:
(Pdb) py_uuid
<module 'uuid' from '/data/prj/python/git/gcc-python3-3.7/Lib/uuid.py'>
(Pdb) c_uuid
<module 'uuid' from '/data/prj/python/git/gcc-python3-3.7/Lib/uuid.py'>
(Pdb) import _uuid
(Pdb) _uuid
<module '_uuid' from
'/data/prj/python/git/gcc-python3-3.7/build/lib.aix-6.1-3.7/_uuid.so'>
(Pdb)
However, have a new question - why are py_uuid and c_uuid 'equivalent'.
(_uuid is shown just to show that it can be imported).
A comment - perhaps a new bpo/issue topic. When trying to run the tests
from a freshly built version - it still seems to default to looking at
the installed version first. And that can make debugging very very hard
(which modules are actually getting loaded?!). In this case, there also
seem to be a python2 and python3 incompatibility - notice the python2.7
pdb reference!
michael@x071:[/data/prj/python/git/python3-master]python -m pdb
./Lib/test/test_uuid.py
Traceback (most recent call last):
File "/opt/lib/python2.7/pdb.py", line 1314, in main
pdb._runscript(mainpyfile)
File "/opt/lib/python2.7/pdb.py", line 1233, in _runscript
self.run(statement)
File "/opt/lib/python2.7/bdb.py", line 400, in run
exec cmd in globals, locals
File "<string>", line 1, in <module>
File "./Lib/test/test_uuid.py", line 520
print(hex, end=' ')
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue28009>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2018-01-08 16:22:22 | Michael.Felt | set | recipients:
+ vstinner, serhiy.storchaka, David.Edelsohn |
2018-01-08 16:22:22 | Michael.Felt | link | issue28009 messages |
2018-01-08 16:22:22 | Michael.Felt | create | |
|