[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-25 Thread Alecsandru Patrascu
Changes by Alecsandru Patrascu alecsandru.patra...@intel.com: Added file: http://bugs.python.org/file40255/python3.5-pgo-v03.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24915 ___

[issue24929] _strptime.TimeRE should not enforce range in regex

2015-08-25 Thread Brett Cannon
Brett Cannon added the comment: Do realize that the strptime code is shared with time.strptime() and so this change would have to make sense in both contexts. This change can also only happen in Python 3.6 because it is backwards-incompatible due to people potentially already catching the

[issue24932] Migrate _testembed to a C unit testing library

2015-08-25 Thread Brett Cannon
Brett Cannon added the comment: Someone is going to think of [googletest] (https://github.com/google/googletest) and then realize that it is a C++ test suite and thus won't work unless you explicitly compile Python for C++. -- nosy: +brett.cannon

[issue24937] Multiple problems in getters setters in capsulethunk.h

2015-08-25 Thread Larry Hastings
Larry Hastings added the comment: Given that capsulethunk is only needed for 2.6 (and previous), and those versions are no longer maintained by the Python core community, yes I'd be happy for you to take over maintainership and host it externally. I'm sure we could change the documentation

[issue24935] LDSHARED is not set according when CC is set.

2015-08-25 Thread yunlian
New submission from yunlian: On linux, when CC is set, we expect that the LDSHARED is set accordingly. Currently, only on OS X, the LDSHARED is set properly. Below is the proposed patch --- a/Lib/distutils/sysconfig.py2015-08-24 11:58:37.265683872 -0700 +++ b/Lib/distutils/sysconfig.py

[issue24913] newblock() Uninitialized Variable

2015-08-25 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24913 ___ ___

[issue24913] newblock() Uninitialized Variable

2015-08-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm find the exception analysis to be unreadable. Have you found any place in the deque code where the uninitialized memory actually gets accessed? -- priority: normal - low ___ Python tracker

[issue3548] subprocess.pipe function

2015-08-25 Thread R. David Murray
R. David Murray added the comment: Thanks for being willing to work on it. If what is wanted is a way to pipeline shell commands, Python already has that functionality in the pipes module. So the interesting thing here would be pipelining *non* shell commands, to avoid the shell exploits

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-25 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: # unittest (Pending)DeprecationWarning are already enabled if no -W flags are given. # doctest We enable the DW in REPL only if originate from `__main__`, this seem to be painful to do in doctest, as each doctest execute in a module that have the

[issue24933] socket.recv(size, MSG_TRUNC) returns more than size bytes

2015-08-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: Evidently, the recv code doesn't know anything about MSG_TRUNC, which causes it to do incorrect things when the output length is greater than the buffer length. -- nosy: +benjamin.peterson ___ Python tracker

[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-25 Thread Alecsandru Patrascu
Changes by Alecsandru Patrascu alecsandru.patra...@intel.com: Added file: http://bugs.python.org/file40254/python2.7-pgo-v03.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24915 ___

[issue24935] LDSHARED is not set according when CC is set.

2015-08-25 Thread Mike Frysinger
Changes by Mike Frysinger vap...@users.sourceforge.net: -- nosy: +vapier ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24935 ___ ___

[issue24935] LDSHARED is not set according when CC is set.

2015-08-25 Thread Mike Frysinger
Mike Frysinger added the comment: looks like the patch was reversed, but otherwise should be clear what we're going for -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24935 ___

[issue24913] newblock() Uninitialized Variable

2015-08-25 Thread Stefan Krah
Stefan Krah added the comment: I guess that in the test case the stop parameter is set to 4 in deque_index(), but it should be clamped to 3. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24913

[issue24934] django_v2 benchmark not working in Python 3.6

2015-08-25 Thread Brett Cannon
Brett Cannon added the comment: The proposed patch directly modifies the copy of Django in the benchmark suite which isn't acceptable; we purposefully don't modify the project code we pull in for benchmark consistency and ease of maintenance. It would be better to make sure a newer version of

[issue24937] Multiple problems in getters setters in capsulethunk.h

2015-08-25 Thread Petr Viktorin
Petr Viktorin added the comment: Note: I'm including a tested (+fixed, now) copy of capsulethunk.h in my set of Python3 C extension porting helpers, http://py3c.readthedocs.org Unfortunately the tests can't be added to CPython, because they need to run on Python 2.6 to be useful. That makes

[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-25 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: I modified the patches to be compatible with both environments. The new versions modify the configure.ac file also, therefore you will need to run autoconf by hand. Also, in case of MaOS you will need to have llvm-profdata installed and in your path. I

[issue24913] newblock() Uninitialized Variable

2015-08-25 Thread John Leitch
John Leitch added the comment: The exception analysis is output from the WinDbg !analyze command run on a crash where access to the uninitialized memory ultimately corrupted the instruction pointer, leading to a data execution prevention crash. That's why the disassembly is junk--the IP is

[issue24937] Multiple problems in getters setters in capsulethunk.h

2015-08-25 Thread Petr Viktorin
New submission from Petr Viktorin: In https://docs.python.org/3/howto/cporting.html#cobject-replaced-with-capsule (added in issue13053): 1) __PyCapsule_GetField is defined as:: #define __PyCapsule_GetField(capsule, field, default_value) ... but called as::

[issue24936] Idle: handle 'raise' properly when running with subprocess (2.7)

2015-08-25 Thread Terry J. Reedy
New submission from Terry J. Reedy: With one process (installed 2.7.10, -n option): raise Traceback (most recent call last): File pyshell#0, line 2, in module TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType With subprocess (default option): raise

[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-25 Thread Brett Cannon
Brett Cannon added the comment: Any specific reason the v3 patch, Alecsandru, is listed as against 3.5 in the filename? Or is that just a typo? P.S.: I did another review asking about explicit Clang support and also supporting Greg's request to use `-m test` instead of the explicit file

[issue24769] Interpreter doesn't start when dynamic loading is disabled

2015-08-25 Thread Larry Hastings
Larry Hastings added the comment: That's correct, it's just in 3.5.0 at the moment. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24769 ___ ___

[issue24940] RotatingFileHandler uses tell in non-binary mode to determine size of the file in bytes

2015-08-25 Thread Ilya Kulakov
New submission from Ilya Kulakov: According to the most recent documentation: Return the current stream position as an opaque number. The number does not usually represent a number of bytes in the underlying binary storage. Therefore stream should be opened as 'ab' by using value of the

[issue2786] Names in traceback should have class names, if they're methods

2015-08-25 Thread Ben Longbons
Ben Longbons added the comment: I made a minimal gist of my motivating code: https://gist.github.com/o11c/ce0c2ff74b87ea71ad46 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2786 ___

[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-08-25 Thread Martin Panter
Martin Panter added the comment: Florent’s manual reproducer is fixed by issue18383_34_2.diff, as is test___all__. And I think the new logic for changing the priority of the filter entries might be sound now. But it does seem like we are adding unnecessary complexity to the implementation

[issue2786] Names in traceback should have class names, if they're methods

2015-08-25 Thread Ben Longbons
Ben Longbons added the comment: Code objects currently have no mutable fields. So what are you planning to do about things like: Foo = namedtuple('Foo', 'x y') def frob(self): return self.x + self.y # probably actually done via a @member(Foo) decorator # so adding more code here is not a

[issue24912] The type of cached objects is mutable

2015-08-25 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24912 ___ ___ Python-bugs-list mailing list

[issue24912] The type of cached objects is mutable

2015-08-25 Thread Larry Hastings
Larry Hastings added the comment: As Python 3.5 Release Manager, my official statement is: Eek! -- priority: high - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24912 ___

[issue22680] Blacklist FunctionTestCase from test discovery

2015-08-25 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- dependencies: +Add means to mark unittest.TestCases as do not load. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22680 ___

[issue14534] Add means to mark unittest.TestCases as do not load.

2015-08-25 Thread Martin Panter
Martin Panter added the comment: Issue 22680, about blacklisting FunctionTestCase, was closed as a duplicate of this. However the patch there has a useful test case for FunctionTestCase that could be merged with any future work here. -- stage: patch review - needs patch versions:

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-25 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: ok, thanks. I'll remove the is tty ans push docs changes on a new patch. I'll see if I can figure out how to enable DW by default in unittest and doctest. Thanks ! -- ___ Python tracker

[issue24769] Interpreter doesn't start when dynamic loading is disabled

2015-08-25 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks Larry! Sorry I didn't get to this as soon as I got back from the US. Will you add it to 3.5.1 and 3.6.0, or would you prefer I take care of that? -- ___ Python tracker rep...@bugs.python.org

[issue24808] PyTypeObject fields have incorrectly documented types

2015-08-25 Thread Martin Panter
Martin Panter added the comment: Okay I think that worked smoothly (let me know if I missed something). Thanks for the patch Joseph. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker

[issue24902] http.server: on startup, show host/port as URL

2015-08-25 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +martin.panter ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24902 ___ ___

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-25 Thread Nick Coghlan
Nick Coghlan added the comment: As Robert suggests, I think it's OK to issue the deprecation warnings for code run via python script.py or cat script.py | python. Reverting to the current behaviour if folks actually want that would just be a matter of passing the file in directly, rather

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2015-08-25 Thread Aymeric Augustin
Aymeric Augustin added the comment: Since a better solution seems to be around the corner, I'm withdrawing my proposal. I'm attaching the current state of my patch. It isn't functional. Mostly it proves that my API proposal is very inconvenient to implement in C. That's why I kept it around

[issue24938] Measure if _warnings.c is still worth having

2015-08-25 Thread Brett Cannon
Brett Cannon added the comment: I should also mention the other motivating factor was providing C access to the warnings system, but once again importlib blazed that trail already by providing a C API which simply uses the Python code. -- ___

[issue24934] django_v2 benchmark not working in Python 3.6

2015-08-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: According to the docs, getargspec() should be replaced with getfullargspec(), which returns a compatible named tuple. This would probably also minimize the performance impact of the patch (I'm not sure getargspec() is in the critical path, but let's be

[issue24305] The new import system makes it inconvenient to correctly issue a deprecation warning for a module

2015-08-25 Thread Brett Cannon
Brett Cannon added the comment: So there are two approaches I see to solving this whole thing. One is for there to be a slight divergence between the C code and the Python code. For _warnings.warn(), nothing changes. For warnings.warn(), though, it does the expected frame skipping. This would

[issue24938] Measure if _warnings.c is still worth having

2015-08-25 Thread Brett Cannon
New submission from Brett Cannon: _warnings.c was initially created to help with startup performance. It turned out to be a tricky bit of code to get right to continue to support the Python version of the module. But now that we live in a world where we have startup benchmarks instead of

[issue24829] Use interactive input even if stdout is redirected

2015-08-25 Thread Martin Panter
Martin Panter added the comment: In Linux, the original stdin, stdout, stderr file descriptors refer to the same console by default, and you use normal file reads and writes on them. In Linux when Python uses Gnu Readline, the displayed input characters are indeed written to the original

[issue24790] Idle: improve stack viewer

2015-08-25 Thread Can İbanoğlu
Can İbanoğlu added the comment: First of all, sorry for the late reply. I did try the solution you have proposed which removes the need to click to expand the items under globals/locals but as I understand it, you have something more in mind for the whole stackviewer UI. Should I still submit

[issue24933] socket.recv(size, MSG_TRUNC) returns more than size bytes

2015-08-25 Thread Andrey Wagin
New submission from Andrey Wagin: In [1]: import socket In [2]: sks = socket.socketpair(socket.AF_UNIX, socket.SOCK_DGRAM) In [3]: sks[1].send(asdfasdfsadfasdfsdfsadfsdfasdfsdfasdfsadfa) Out[3]: 42 In [4]: sks[0].recv(1, socket.MSG_PEEK | socket.MSG_TRUNC) Out[4]:

[issue22936] traceback module has no way to show locals

2015-08-25 Thread Robert Collins
Robert Collins added the comment: This itself is fixed. -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22936 ___

[issue23597] Allow easy display of local variables in log messages?

2015-08-25 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23597 ___ ___ Python-bugs-list

[issue23552] Have timeit warn about runs that are not independent of each other

2015-08-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e9cf58c891d by Robert Collins in branch 'default': Issue #23552: Timeit now warns when there is substantial (4x) variance https://hg.python.org/cpython/rev/2e9cf58c891d -- nosy: +python-dev ___ Python

[issue23552] Have timeit warn about runs that are not independent of each other

2015-08-25 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- resolution: - fixed stage: patch review - resolved status: open - closed versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23552

[issue23183] timeit CLI best of 3: undocumented output format

2015-08-25 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23183 ___

[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2015-08-25 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21112 ___

[issue24920] shutil.get_terminal_size throws AttributeError

2015-08-25 Thread Isaac Levy
Isaac Levy added the comment: I guess users need to check standard streams for None. There's not many uses of stream attributes in core libs. Maybe catch should be Exception -- since it's documented to return a fallback on error. -- ___ Python

[issue24934] django_v2 benchmark not working in Python 3.6

2015-08-25 Thread Florin Papa
New submission from Florin Papa: Hi All, My name is Florin Papa and I work in the Server Languages Optimizations Team at Intel Corporation. I would like to submit a patch that solves compatibility issues of the django_v2 benchmark in the Grand Unified Python Benchmark. The django_v2

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2015-08-25 Thread Gabi Davar
Changes by Gabi Davar grizzly@gmail.com: -- nosy: +Gabi.Davar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10466 ___ ___ Python-bugs-list

[issue3548] subprocess.pipe function

2015-08-25 Thread Matheus Vieira Portela
Matheus Vieira Portela added the comment: I just found this open issue and I can work on it. What is left to do before closing it? -- nosy: +matheus.v.portela ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3548

[issue24933] socket.recv(size, MSG_TRUNC) returns more than size bytes

2015-08-25 Thread Andrey Wagin
Andrey Wagin added the comment: sendto(4, asdfasdfsadfasdfsdfsadfsdfasdfsd..., 42, 0, NULL, 0) = 42 recvfrom(3, a\0n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\0\0\0\0\2\0\0\0..., 1, MSG_TRUNC, NULL, NULL) = 42 I think the exit code is interpreted incorrectly. In this case it isn't equal to

[issue24788] HTTPException is derived from Exception instead of IOError

2015-08-25 Thread Pastafarianist
Pastafarianist added the comment: I agree that the five exception types you mentioned (UnknownProtocol, UnknownTransferEncoding, IncompleteRead, BadStatusLine, LineTooLong) should be derived from IOError. EOFError is probably not a good choice here. It's not something I would expect to see in

[issue24788] HTTPException is derived from Exception instead of IOError

2015-08-25 Thread Martin Panter
Martin Panter added the comment: Regarding CannotSendRequest: HTTPConnection will connect again with a new socket if a previous response will close the old connection. See a few lines below where you linked: “If point (2) is true, then we . . . will open a new [socket] when a new request is

[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2015-08-25 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: +easy stage: - needs patch versions: +Python 3.5, Python 3.6 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24928

[issue24850] syslog.syslog() does not return error when unable to send the log

2015-08-25 Thread R. David Murray
R. David Murray added the comment: Ah, in that case there aren't any errors for us to return, so this is moot. -- resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-25 Thread R. David Murray
R. David Murray added the comment: I'm not sure that is acceptable. Just changing it to a file could break an application's structure that is depending on being able to use stdin to run scripts. As one example, vim scripts can embed python code...now, what VIM does behind the scenes with

[issue24808] PyTypeObject fields have incorrectly documented types

2015-08-25 Thread R. David Murray
R. David Murray added the comment: Congratulation on your first commit, Martin :) Dropping the python2 reference was the right call: the python3 docs are supposed to be a fresh start and there are very few places where they mention python2. -- nosy: +r.david.murray

[issue24769] Interpreter doesn't start when dynamic loading is disabled

2015-08-25 Thread Jeffrey Armstrong
Jeffrey Armstrong added the comment: I pulled the 3.5 branch a few minutes ago, and the patch isn't present. Has it not been pushed to hg.python.org? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24769

[issue24911] Context manager of socket.socket is not documented

2015-08-25 Thread Martin Panter
Martin Panter added the comment: IMO the change notice for create_connection() should be moved to apply to the “socket” class, perhaps the “Socket Objects” section. Issue 9794 looks like context manager support was added specifically for create_connection(), however any socket object, no

[issue24790] Idle: improve stack viewer

2015-08-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please post a 'checkpoint' patch with all changes so far, even though it has the 'other globals' problem. Then look at the UI parts of Debugger.py. It has a Stackviewer class that subclasses ScrolledLIst instead of TreeWidget and a Namespaceviewer class

[issue2786] Names in traceback should have class names, if they're methods

2015-08-25 Thread Nick Coghlan
Nick Coghlan added the comment: Moving this back to patch review while we consider the alternative approach of moving qualname storage into code objects, rather than continuing to transport qualnames separately. -- stage: commit review - patch review

[issue2786] Names in traceback should have class names, if they're methods

2015-08-25 Thread Nick Coghlan
Nick Coghlan added the comment: Moving target version to 3.6 (since we're discussing adding a new public C API). This is an interesting problem, as seeing an expanding API like this (PyEval_EvalCode - PyEval_EvalCodeEx - PyEval_EvalCodeEx2) suggests to me that we actually have a missing