[issue29125] Shell injection via TIX_LIBRARY when using tkinter.tix

2017-01-15 Thread Larry Hastings

Larry Hastings added the comment:

If it "has a small attack surface" and affects "a very small number of 
applications", I don't think it's a release blocker.  Demoting to "high" 
priority, which will permit me to release 3.5.3.

--
priority: release blocker -> high

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13886] readline-related test_builtin failure

2017-01-15 Thread Martin Panter

Martin Panter added the comment:

V3 of my patch skips the Readline tests in cases involving non-ASCII bytes when 
the locale seen by Readline would be ASCII. Readline may translate the 
non-ASCII bytes to escape sequences, and treat them as special Meta (Alt) key 
combinations. This behaviour depends on Readline configuration (“set 
convert-meta off” in /etc/inputrc in my case).

It also includes a potential workaround for Android, depending on the 
resolution of Issue 28997.

--
Added file: http://bugs.python.org/file46296/input-readline.v3.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29235] Allow profile/cProfile to be used as context managers

2017-01-15 Thread Thane Brimhall

Thane Brimhall added the comment:

I've signed the agreement. I will do the necessary research to figure out how 
to do unit tests and documentation updates.

I should also mention that while maintaining API-compatibility with `profile` 
was a stated goal, it turns out that the pure-python profiler actually does not 
have the enable() and disable() methods that the context manager needs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29279] --with-pydebug optimizes too much

2017-01-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> You can override CFLAGS when default option is not fit for you.

I concur with INADA and agree that the existing defaults should be left alone 
because they've worked well for many years and they provide all tolerably fast 
result for running the entire test suite (which is important for many 
developers).

--
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29235] Allow profile/cProfile to be used as context managers

2017-01-15 Thread Xiang Zhang

Xiang Zhang added the comment:

> I suspect unit tests and documentation updates?

Yes. Code alone is not enough. It's better to have tests and documentation. 
Also, it's appreciated to sign the CLA: 
https://www.python.org/psf/contrib/contrib-form/. :-)

--
nosy: +xiang.zhang
stage: needs patch -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29235] Allow profile/cProfile to be used as context managers

2017-01-15 Thread Thane Brimhall

Thane Brimhall added the comment:

So this is my first time contributing to Python, but here's a (trivial) patch 
for this issue. Let me know what else is required to make this happen. I 
suspect unit tests and documentation updates?

--
keywords: +patch
Added file: http://bugs.python.org/file46295/profileContextManager.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26110] Speedup method calls 1.2x

2017-01-15 Thread INADA Naoki

Changes by INADA Naoki :


Added file: http://bugs.python.org/file46294/call-method-doc5.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29125] Shell injection via TIX_LIBRARY when using tkinter.tix

2017-01-15 Thread Larry Hastings

Larry Hastings added the comment:

I'll make you a deal.  If you check this in in the next 3 hours, I'll 
cherry-pick it for 3.5.3.  Otherwise I don't want to hold up the release.  To 
be honest I'm not sure why it's marked as "release blocker" if it's "low 
severity".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28997] test_readline.test_nonascii fails on Android

2017-01-15 Thread Martin Panter

Martin Panter added the comment:

So the problem seems to be that Python assumes Readline’s encoding is UTF-8, 
but Readline actually uses ASCII (depending on locale variables). The code at 
the start of the test is supposed to catch when add_history() calls 
PyUnicode_EncodeLocale() and fails.

I don’t understand the details of UTF-8 vs locale on Android, but maybe we 
could adjust the encode() and decode() implementations in Modules/readline.c, 
to account for the Readline library’s idea of the locale encoding. Or maybe we 
could adjust the temporary setlocale() calls in Modules/readline.c.

If you are happy to declare the Readline library is broken on Android, I now 
think I would prefer to skip the test based on support.is_android, rather than 
the previous patches. Otherwise, we risk masking genuine test failures on other 
platforms. Something like:

@unittest.skipIf(is_android,
"Gnu Readline disagrees about the locale encoding on Android")
def test_nonascii(self):
try:
readline.add_history("\xEB\xEF")
...

When you run “LANG= bash”, it is only Bash and Readline that gets the C locale; 
the terminal is unchanged. I presume the terminal inputs é as two UTF-8 bytes, 
but Readline with the C locale is not aware of UTF-8, and assumes the two bytes 
are two separate characters.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

OK, I will make a PR to typing adding a folder (as it is done for 
mypy_extensions) with a basic set of runtime type inspection functions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum

Guido van Rossum added the comment:

Up to you, but the latter might make it clearer that the two are to be kept
in sync.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

OK, I agree.

How then it should be done logistically? Should I just make a separate repo on 
GitHub for this? Or will it be inside typing (like mypy_extesions is inside 
mypy) but published on PyPI separately?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum

Guido van Rossum added the comment:

I think it should be separate from mypy_extensions, since it's not even
related to mypy.

Regarding typing.re and typing.io, typing.inspect would be a typed version
of the inspect module, so that's not quite the same. (Though I consider
typing.re/io mistakes now -- people seem to mostly ignore it and use the
toplevel names.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I have a similar idea. We already have mypy_extensions for runtime counterparts 
of experimental features. However, the runtime inspections are not related to 
mypy, so that I am not sure. I am just a bit worried there will be to many 
things to keep in mind/in sync. What do you think?

By the way maybe later we could add ``typing.inspect`` similar to ``typing.re`` 
and ``typing.io``?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum

Guido van Rossum added the comment:

Posting to python-dev would probably cause more friction than a PR for the
PEPs repo. But maybe the best way to do this is to use a third party module
with a proposed API? E.g. typing_inspect. We could then iterate quickly on
the design and implementation there, and we could commit to keeping it in
sync with changes to typing.py, so flying sheep's package could depend on
it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> Maybe a proposal should be discussed as an addendum to PEP 484? Or would
Mark Shannon reject that?

On one hand, I would like to involve a wider audience to this discussion. On 
the other hand, an addition to the PEP could slow things down. Maybe a 
discussion on python-dev followed by implementation plus extensive docs would 
work?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum

Guido van Rossum added the comment:

Maybe a proposal should be discussed as an addendum to PEP 484? Or would
Mark Shannon reject that?

On Sun, Jan 15, 2017 at 2:48 PM, Ivan Levkivskyi 
wrote:

>
> Ivan Levkivskyi added the comment:
>
> > Maybe we need to take a step back and look at the needs for code that
> wants to implement runtime type checking more in general?
>
> I would say that the most convenient way for me would be a set of
> "inspect-style" simple helpers like ``is_union``, ``is_generic``,
> ``get_parameters`` (similar to inspect.ismethod, inspect.getargspec etc).
>
> > ISTM we have ways to access the parameters of a parameterized type
> (typically t.__parameters__) but we don't have a reasonable way yet to
> determine what kind of thing t is.
>
> There is one way that I see right now: using _gorg. For example,
> ``_gorg(Tuple[int, str]) is Tuple``, ``_gorg(Callable[..., str]) is
> Callable``, etc. This will also work for ``Union`` if we relax the assert
> that requires type to be instance of GenericMeta (now there is a common
> internal API used by almost everything in typing).
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> Maybe we need to take a step back and look at the needs for code that wants 
> to implement runtime type checking more in general?

I would say that the most convenient way for me would be a set of 
"inspect-style" simple helpers like ``is_union``, ``is_generic``, 
``get_parameters`` (similar to inspect.ismethod, inspect.getargspec etc).

> ISTM we have ways to access the parameters of a parameterized type (typically 
> t.__parameters__) but we don't have a reasonable way yet to determine what 
> kind of thing t is.

There is one way that I see right now: using _gorg. For example, 
``_gorg(Tuple[int, str]) is Tuple``, ``_gorg(Callable[..., str]) is Callable``, 
etc. This will also work for ``Union`` if we relax the assert that requires 
type to be instance of GenericMeta (now there is a common internal API used by 
almost everything in typing).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum

Guido van Rossum added the comment:

Hm, let me back-pedal a bit. The situation with Callable is murky, as e.g. 
isinstance(typing.Tuple[int, int], typing.Callable) returns True.

Maybe we need to take a step back and look at the needs for code that wants to 
implement runtime type checking more in general? ISTM we have ways to access 
the parameters of a parameterized type (typically t.__parameters__) but we 
don't have a reasonable way yet to determine what kind of thing t is.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

This will be a bit unusual since ``isinstance`` is typically called for 
instances (i.e. not types) as in ``isinstance(func, Callable)``. But on the 
other hand this is probably what one would expect when one sees 
``isinstance(tp, Union)``. Thus I am fine with doing it this way.

If there are no objections/other ideas, then I will make a PR upstream in next 
few days.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum

Guido van Rossum added the comment:

Hm, maybe isinstance(t, Union) should actually be allowed? (Though 
isinstance(x, Union[int, str]) should not be!)  After all we can write 
isinstance(t, Callable) as well, even though isinstance(x, Callable[[int], 
int]) is disallowed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

In principle, such a function could be added if it is not called 
``isinstance``. For example, we could add a helper ``is_union(tp)`` (or maybe 
also ``is_generic(tp)`` etc). Such function(s) will be simple one-liners 
wrapping private API in a right way (e.g. using _gorg instead of __origin__ 
where needed etc).

Guido, what do you think?

--
nosy: +gvanrossum, levkivskyi
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29277] os.getcwd failing on LOFS share

2017-01-15 Thread STINNER Victor

STINNER Victor added the comment:

When getcwd() fails with ENOENT, os.getcwd() raises OSError(ENOENT). It's 
expected and not a bug in Python.

Please report the issue to LOFS.

--
nosy: +haypo
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29277] os.getcwd failing on LOFS share

2017-01-15 Thread miniflow

miniflow added the comment:

After performing an strace - it shows that the underlying call to getcwd is 
indeed returning ENOENT which is not correct.  Does this become a libc bug?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29280] gdbm & ndbm support missing in Windows

2017-01-15 Thread Arthur Vanwalleghen

New submission from Arthur Vanwalleghen:

When I tried to work with GDBM and Ndbm files I saw that their supporting 
modules were not found.  This can be verified with Pydoc:

Pydoc\Python36-32\lib \dbm(package)\Package Contents\gnu|ndbm

ErrorDuringImport: problem in dbm.gnu - ModuleNotFoundError: No module named 
'_gdbm' 

ErrorDuringImport: problem in dbm.ndbm - ModuleNotFoundError: No module named 
'_dbm'

I first noticed this in 3.5 and waited to see if it was fixed in 3.6. I am 
running Win8.1.

I want to work with files created on Linux/Perl using GDBM or NDBM.  I cannot 
find any perl support for Python's dbm.dumb. I am looking for an out-of-the-box 
support for simple key/data files.

--
components: Windows
messages: 285517
nosy: ArtVan, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: gdbm & ndbm support missing in Windows
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2017-01-15 Thread INADA Naoki

INADA Naoki added the comment:

Serhiy Storchaka, would you review again?

Merging unicodeobject.c.v5.patch into default branch was almost straightforward.
But there was one place I should rewrite.  Here is the part of diff -u v5.patch 
v6.patch

-- is old docstring w/o AC
+- is current docstring w/o AC
-+ is AC in v5 patch
++ is AC in v6 patch

 -PyDoc_STRVAR(translate__doc__,
 - "S.translate(table) -> str\n\
 -\n\
--Return a copy of the string S, where all characters have been mapped\n\
--through the given translation table, which must be a mapping of\n\
--Unicode ordinals to Unicode ordinals, strings, or None.\n\
--Unmapped characters are left untouched. Characters mapped to None\n\
--are deleted.");
+-Return a copy of the string S in which each character has been mapped\n\
+-through the given translation table. The table must implement\n\
+-lookup/indexing via __getitem__, for instance a dictionary or list,\n\
+-mapping Unicode ordinals to Unicode ordinals, strings, or None. If\n\
+-this operation raises LookupError, the character is left untouched.\n\
+-Characters mapped to None are deleted.");
 -
 -static PyObject*
 +/*[clinic input]
@@ -1194,14 +1271,14 @@
 +
 +Replace each character in the string using the given translation table.
 +
-+Characters not in the translation table are left untouched.
-+
-+Characters mapped to None are deleted.
++The table must implement lookup/indexing via __getitem__, for instance a
++dictionary or list.  If this operation raises LookupError, the character is
++left untouched.  Characters mapped to None are deleted.
 +[clinic start generated code]*/

--
versions: +Python 3.7 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29029] Faster positional arguments parsing in PyArg_ParseTupleAndKeywords

2017-01-15 Thread INADA Naoki

INADA Naoki added the comment:

LGTM

--
nosy: +inada.naoki

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2017-01-15 Thread Tal Einat

Tal Einat added the comment:

Unfortunately, I won't be able to review this due to lack of time.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29274] Change “tests cases” → “test cases”

2017-01-15 Thread Kushal Das

Kushal Das added the comment:

The patch looks good to me.

--
nosy: +kushal.das

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29279] --with-pydebug optimizes too much

2017-01-15 Thread INADA Naoki

INADA Naoki added the comment:

I feel this is a problem of balance between speed and debugger usability.
I prefer default to -Og because:

* It's recommended by gcc for this purpose.
* --pydebug option is not only for gdb.  I use debug build to run various 
programs with many assertion.

You can override CFLAGS when default option is not fit for you.

--
nosy: +inada.naoki

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26110] Speedup method calls 1.2x

2017-01-15 Thread INADA Naoki

INADA Naoki added the comment:

Yury, could you review this?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22302] Windows os.path.isabs UNC path bug

2017-01-15 Thread Eryk Sun

Eryk Sun added the comment:

isabs also fails for device paths such as r"\\.\C:", which is an absolute path 
for opening the C: volume. UNC and device paths (i.e. \\server, \\?, and \\.) 
should always be considered absolute. Only logical drives (i.e. C:, D:, etc) 
support drive-relative paths.

Also, join() needs to be smarter in this case:

>>> os.path.join(r'\\.\C:', 'spam')
'.\\C:spam'

It doesn't insert a backslash because the 'drive' ends in a colon. It needs to 
always insert a backslash for UNC paths, which cannot be reliably identified by 
checking whether the last character of the drive is a colon.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29132] shlex.shlex with punctuation_chars and posix doesn't handle punctuation next to quotes

2017-01-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7e40c940df14 by Vinay Sajip in branch '3.6':
Fixed #29132: Updated shlex to work better with punctuation chars in POSIX mode.
https://hg.python.org/cpython/rev/7e40c940df14

New changeset c163a76163f7 by Vinay Sajip in branch 'default':
Closes #29132: Merged fix from 3.6.
https://hg.python.org/cpython/rev/c163a76163f7

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21258] Add __iter__ support for mock_open

2017-01-15 Thread Georg Sauthoff

Georg Sauthoff added the comment:

For working around this issue on Python 3.5 it is sufficient to overwrite just 
the `return_value.__iter__` method of the object returned by `mock_open()` with 
an iterator that calls the mocked `readline()` method until it returns the 
empty string.

cf. e.g. 
https://github.com/gsauthof/utility/blob/6489c7215dac341be4e40e5348e64d69461766dd/user-installed.py#L176-L179

This also works in combination with `csv.reader()`, i.e. when calling it with 
the mocked file object.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29278] Python 3.6 build fails with parallel make

2017-01-15 Thread SilentGhost

SilentGhost added the comment:

Can't reproduce this on 3.7, can you supply additional information, such as 
what exact revision you're trying to build and what gcc version you're using?

--
nosy: +SilentGhost

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21258] Add __iter__ support for mock_open

2017-01-15 Thread Georg Sauthoff

Changes by Georg Sauthoff :


--
nosy: +gms

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29279] --with-pydebug optimizes too much

2017-01-15 Thread Arcadiy Ivanov

Arcadiy Ivanov added the comment:

gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
Fedora 25

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29279] --with-pydebug optimizes too much

2017-01-15 Thread Arcadiy Ivanov

New submission from Arcadiy Ivanov:

Around line 1480 of configure.ac:
if test "$Py_DEBUG" = 'true' ; then
# Optimization messes up debuggers, so turn it off for
# debug builds.
if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
OPT="-g -Og -Wall $STRICT_PROTO"
else
OPT="-g -O0 -Wall $STRICT_PROTO"
fi
else
OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
fi

The "-Og", unfortunately, optimizes too much resulting in local variables and 
arguments being optimized out:

(gdb) info locals
kwlist = {0x702c3318 "database", 0x702c3321 "timeout", 0x702c3329 
"detect_types", 0x702c3336 "isolation_level", 0x702c3346 
"check_same_thread", 0x702c3392 "factory", 0x702c3358 
"cached_statements", 
  0x702c336a "uri", 0x0}
database = 0x704f7da0 ":memory:"
detect_types = 0
isolation_level = 0x1
factory = 0x704c7dc0 
check_same_thread = 1
cached_statements = 4888694
uri = 0
timeout = 5
(gdb) info args
self = 
args = 0x7fffeff6be28
kwargs = 0x0

When "self" is optimized out it's too much optimization for debug mode.

--
components: Build
messages: 285505
nosy: arcivanov
priority: normal
severity: normal
status: open
title: --with-pydebug optimizes too much
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29278] Python 3.6 build fails with parallel make

2017-01-15 Thread INADA Naoki

INADA Naoki added the comment:

Isn't it a OOM killer?
How much memory your machine has?
How about make -j4? (you can use number of cores instead of 4).

--
nosy: +inada.naoki

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com