★ wanayoo — archive 1999 https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/pull/182Nouvelle recherche | Portail wanayoo
Skip to content
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

Builtin some modules in python3, but not in python2 #182

Open
wants to merge 1 commit into
base: master
from

Conversation

@adrianbroher
Copy link
Contributor

@adrianbroher adrianbroher commented Mar 20, 2017

Both upstream Linux and MacOSX python2 builds don't include any of the time,
datetime or _collections extension as libpython builtin, but include time
, _functools and itertools as python3 libpython builtin.

On Fedora Linux 25 with python 2.7.13:

$ python2 -c 'import sys ; print sys.version, "\n", sys.builtin_module_names'
2.7.13 (default, Jan 12 2017, 17:59:37)
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]
('__builtin__', '__main__', '_ast', '_codecs', '_sre', '_symtable', '_warnings', '_weakref', 'errno', 'exceptions', 'gc', 'imp', 'marshal', 'posix', 'pwd', 'signal', 'sys', 'thread', 'zipimport')

On Fedora Linux 25 with python 3.5.2

$  python3 -c 'import sys ; print (sys.version, "\n", sys.builtin_module_names)'
3.5.2 (default, Sep 14 2016, 11:28:32)
[GCC 6.2.1 20160901 (Red Hat 6.2.1-1)]
('_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype', 'zipimport')

On MacOSX 10.11.6 with python 2.7.10:

python -c 'import sys ; print sys.version, "\n", sys.builtin_module_names'
2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
('__builtin__', '__main__', '_ast', '_codecs', '_sre', '_symtable', '_warnings', '_weakref', 'errno', 'exceptions', 'gc', 'imp', 'marshal', 'posix', 'pwd', 'signal', 'sys', 'thread', 'xxsubtype', 'zipimport')
@adrianbroher adrianbroher force-pushed the adrianbroher:fix-builtin branch 3 times, most recently from 4cee098 to afb4dee Mar 20, 2017
@adrianbroher
Copy link
Contributor Author

@adrianbroher adrianbroher commented Mar 24, 2017

Is there a way to look up the actual build and test logs? Can't say that the CDash output is particular interesting or helpful.

@adrianbroher adrianbroher force-pushed the adrianbroher:fix-builtin branch from afb4dee to f7b2362 Mar 24, 2017
@jcfr
Copy link
Contributor

@jcfr jcfr commented Aug 1, 2017

@adrianbroher Build log can be retrieved from travis or appveyor. In the case of this PR, that would be by clicking on any of the python version reported here:

@jcfr
Copy link
Contributor

@jcfr jcfr commented Aug 1, 2017

Also thanks for the PR 👍 and apologize for the delay.

With the current patch, it looks like we could get BUILTIN keyword specified twice.

Both upstream Linux and MacOSX python2 builds don't include any of the `time`,
`datetime` or `_collections` extension as libpython builtin, but include `time`
, `_functools` and `itertools` as python3 libpython builtin.

On Fedora Linux 25 with python 2.7.13:

```
$ python2 -c 'import sys ; print sys.version, "\n", sys.builtin_module_names'
2.7.13 (default, Jan 12 2017, 17:59:37)
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]
('__builtin__', '__main__', '_ast', '_codecs', '_sre', '_symtable', '_warnings', '_weakref', 'errno', 'exceptions', 'gc', 'imp', 'marshal', 'posix', 'pwd', 'signal', 'sys', 'thread', 'zipimport')
```

On Fedora Linux 25 with python

```
$  python3 -c 'import sys ; print (sys.version, "\n", sys.builtin_module_names)'
3.5.2 (default, Sep 14 2016, 11:28:32)
[GCC 6.2.1 20160901 (Red Hat 6.2.1-1)]
('_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype', 'zipimport')
```

On MacOSX 10.11.6 with python 2.7.10:

```
python -c 'import sys ; print sys.version, "\n", sys.builtin_module_names'
2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
('__builtin__', '__main__', '_ast', '_codecs', '_sre', '_symtable', '_warnings', '_weakref', 'errno', 'exceptions', 'gc', 'imp', 'marshal', 'posix', 'pwd', 'signal', 'sys', 'thread', 'xxsubtype', 'zipimport')
```
@adrianbroher adrianbroher force-pushed the adrianbroher:fix-builtin branch from 7da2b17 to 557eb64 May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.