[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Mikhail Gulyaev added the comment: > Why can’t you do the file rewinding yourself, when you retry the request? Actually I'm not retry to send a request. This behavior I met for httplib library while I'm send a single request, httplib send it to exist connection and then recreates connection on

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Martin Panter
Martin Panter added the comment: Sorry but I have a few concerns about your patch: Why does this have to be in the HTTPConnection.send() method? Why can’t you do the file rewinding yourself, when you retry the request? This could break compatibility if someone wrote code that expects data to

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Changes by Mikhail Gulyaev : Added file: http://bugs.python.org/file41286/Выделение_058.png ___ Python tracker ___

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Changes by Mikhail Gulyaev : Added file: http://bugs.python.org/file41288/Выделение_061.png ___ Python tracker ___

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Changes by Mikhail Gulyaev : Added file: http://bugs.python.org/file41287/Выделение_059.png ___ Python tracker ___

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: This is something that comes up repeatedly on the bug tracker. There's no bug here in the complex type or the repr. What there *is* is a limitation resulting from the fact that Python doesn't have *imaginary* literals, only *complex* literals. So in: -1-0j

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: > As I understand the output of repr() is supposed to be something that can > evaluated to recreate the same object. Right, but that's an ideal that's not always achieved in practice. If I had my druthers, I'd 'fix' the repr of the complex object to return

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: Previous discussions: #17336, #22548 -- ___ Python tracker ___ ___

[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-12-11 Thread Mojca Miklavec
Mojca Miklavec added the comment: Is anyone willing to help me a bit to come up with a pull request? I took some ideas from here: https://fossies.org/diffs/xscreensaver/5.30_vs_5.32/utils/thread_util.c-diff.html Citation from that patch: Clang 3.0 has a partial implementation of GNU

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread R. David Murray
R. David Murray added the comment: This patch is definitely invalid. There is no requirement that data be seekable. Are you saying that there insufficient support in http(lib) for an application to handle this server timeout? Can you provide a program that demonstrates the problem (even

[issue25841] In FancyURLopener error in example with http address.

2015-12-11 Thread R. David Murray
Changes by R. David Murray : -- stage: -> needs patch versions: +Python 2.7 -Python 3.3, Python 3.4 ___ Python tracker ___

[issue25842] Installer does not set permissions correctly?

2015-12-11 Thread Laura Creighton
New submission from Laura Creighton: This in from python-list. 2 complaints. conflict with a notepad++ plugin and incorrect permissions. Date:Fri, 11 Dec 2015 16:30:32 + To: "python-l...@python.org" From:Jay Hamm Subject: python

[issue25840] Allow `False` to be passed to `filter`

2015-12-11 Thread leewz
New submission from leewz: Meaning: filter(False, lst) == (x for x in lst if not x) == itertools.filterfalse(None, lst) I understand that it is a very minor enhancement, and with not much benefit. I just happened to think about it, and wondered why it didn't already exist. I

[issue25840] Allow `False` to be passed to `filter`

2015-12-11 Thread R. David Murray
R. David Murray added the comment: I don't think it is worth adding as a special case. Itertools has it because of what itertools is (a mini-language for manipulating iterables), but the legacy filter function has no reason to grow additional special cases beyond None. (It's not even clear

[issue25841] In FancyURLopener error in example with http address.

2015-12-11 Thread Denis Savenko
New submission from Denis Savenko: In documentation from this page https://docs.python.org/3.5/library/urllib.request.html#examples in examples uses default address to python site with http. ( http://python.org/ ). But now python.org use https. When i try use example in ipython i get I/0

[issue24505] shutil.which wrong result on Windows

2015-12-11 Thread Toby Tobkin
Toby Tobkin added the comment: I'm working on a patch and an accompanying unit test for this now. Should have it out today. -- nosy: +tobytobkin ___ Python tracker

[issue6478] time.tzset does not reset _strptime's locale time cache

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: Thanks Serhiy. Can we close this now? -- ___ Python tracker ___ ___

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: The equality of code objects is determined by the code_richcompare() logic in Objects/codeobject.c. Two code objects are equal if all of their attributes compare equal. That includes co_name, co_argcount, co_kwonlyargcount, co_nlocals, co_flags,

[issue5501] Update multiprocessing docs re: freeze_support

2015-12-11 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +davin ___ Python tracker ___ ___

[issue25757] Subclasses of property lose docstring

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc1aa0e88626 by Berker Peksag in branch '3.5': Issue #25755: Move PropertyWritableDoc into the test case https://hg.python.org/cpython/rev/cc1aa0e88626 New changeset 8f52c9d72d9f by Berker Peksag in branch 'default': Issue #25755: Move

[issue25755] Test test_property failed if run twice

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Nan. I've updated your patch to apply Serhiy's advice. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5 ___ Python tracker

[issue25822] Add docstrings to fields of urllib.parse results

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Swati. I left a few comments on Rietveld: http://bugs.python.org/review/25822/ A test wouldn't hurt, but you can wait for further review comments to avoid updating tests each time you get a comment. -- nosy: +berker.peksag

[issue25730] invisible sidebar content with code snippets

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: This can be reproduced at https://docs.python.org/3/faq/windows.html You can find the CSS file at Doc/tools/pydoctheme/static/pydoctheme.css. You can override .highlight there, but the actual problem is that Sphinx creates the outer highlight-python3 div with

[issue25757] Subclasses of property lose docstring

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: fix_repetitions.diff was unrelated to this issue so subprop_doc_r2.diff still needs to be reviewed. -- ___ Python tracker

[issue25757] Subclasses of property lose docstring

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: Thanks for fix_repetitions.diff, Torsten. The test_property failure was discussed in issue 25755. -- nosy: +berker.peksag ___ Python tracker

[issue25823] Speed-up oparg decoding on little-endian machines

2015-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I verified that Clang and GCC both give the expected disassembly with Serhiy's patch. We ought to restrict the #if to just the compilers that are known to optimize away the memcpy. Clang (for 'BUILD_LIST_UNPACK') ---

[issue25755] Test test_property failed if run twice

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc1aa0e88626 by Berker Peksag in branch '3.5': Issue #25755: Move PropertyWritableDoc into the test case https://hg.python.org/cpython/rev/cc1aa0e88626 New changeset 8f52c9d72d9f by Berker Peksag in branch 'default': Issue #25755: Move

[issue25757] Subclasses of property lose docstring

2015-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can this be closed now or is there work left to be done? -- nosy: +rhettinger ___ Python tracker ___

[issue25768] compileall functions do not document or test return values

2015-12-11 Thread Brett Cannon
Brett Cannon added the comment: Do the tests take much longer with all of the added stuff in setUp()/tearDown()? It's just that all of it has to run for all tests. You could make a mixin or put all of it in a method that you selectively call and which registers the proper cleanup method. As

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Martin Panter
Martin Panter added the comment: As far as I understand, httplib should not be automatically reconnecting and re-sending requests. I still suspect your script may be causing the retry, but you are welcome to prove me wrong. Can you clarify “send PUT request to closed socket”: is the local OS

[issue25845] _ctypes\cfield.c identical subexpressions in Z_set

2015-12-11 Thread Martin Panter
Martin Panter added the comment: History is good for understanding how things became the way they are. :) Thanks Alexander and Random! -- nosy: +martin.panter resolution: -> fixed stage: -> resolved status: open -> closed type: -> enhancement versions: +Python 3.5, Python 3.6

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here's another variant (courtesy of Nick Coghlan): python3.5 -c "seq1 = [1.0 for x in range(5)]; seq2 = [True for x in range(5)]; print(seq1); print(seq2)" -- ___ Python tracker

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-11 Thread Kevin Shweh
Kevin Shweh added the comment: A type-based check runs into problems with 0.0 vs -0.0. For example, on Python 2.7.11: >>> x, y = lambda: 0.0, lambda: -0.0 >>> y() 0.0 I wasn't able to reproduce the -0.0 problem with Python 3.4 on Ideone; y.__code__.co_consts seems to have an unused 0.0 in it

[issue25841] In FancyURLopener error in example with http address.

2015-12-11 Thread Martin Panter
Martin Panter added the comment: Assuming you meant http://www.python.org/ (added the www), I cannot produce any error with any example that requests directly to the site. The “http:” server already redirects to “https:”, so there is no problem. Obviously the examples that depend on made-up

[issue25844] Pylauncher, launcher.c: Assigning NULL to a pointer instead of testing against NULL

2015-12-11 Thread Alexander Riccio
New submission from Alexander Riccio: I found this while writing up a separate bug (CPython doesn't use static analysis!). In PC/launcher.c, get_env has a bug: /* Large environment variable. Accept some leakage */ wchar_t *buf2 = (wchar_t*)malloc(sizeof(wchar_t) * (result+1));

[issue25844] Pylauncher, launcher.c: Assigning NULL to a pointer instead of testing against NULL

2015-12-11 Thread Alexander Riccio
Changes by Alexander Riccio : -- type: -> crash ___ Python tracker ___ ___

[issue25846] Use of Py_ARRAY_LENGTH on pointer in posixmodule.c, win32_wchdir

2015-12-11 Thread Alexander Riccio
New submission from Alexander Riccio: I found this while writing up a separate bug (CPython doesn't use static analysis!). In modules/posixmodule.c, win32_wchdir uses Py_ARRAY_LENGTH on a wchar_t*: wchar_t _new_path[MAX_PATH], *new_path = _new_path; int result; wchar_t env[4] =

[issue25845] _ctypes\cfield.c identical subexpressions in Z_set

2015-12-11 Thread random832
random832 added the comment: Looks like a result of searching and replacing PyInt with PyLong - the diff can be found here, if anyone cares. https://hg.python.org/cpython-fullhistory/rev/f324631462a2. Oddly, there was _another, older_ revision that fixed this correctly:

[issue25822] Add docstrings to fields of urllib.parse results

2015-12-11 Thread Martin Panter
Martin Panter added the comment: [padding] I left some comments. I wonder if the doc strings are too specific when they mention “request”, “file”, “download”, “page”, etc. Maybe these could just be examples of what the fields are used for (e.g. “The hierarchical path, such as the path to a

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread R. David Murray
R. David Murray added the comment: The issue is definitely in httplib2, then. You should open an issue on their bug tracker. -- resolution: -> third party stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Mikhail Gulyaev added the comment: Thanks for attention -- ___ Python tracker ___ ___ Python-bugs-list

[issue19771] runpy should check ImportError.name before wrapping it

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 850cc65ceda4 by Martin Panter in branch '3.5': Issue #19771: Omit irrelevant message if package could not be initialized https://hg.python.org/cpython/rev/850cc65ceda4 New changeset 323c10701e5d by Martin Panter in branch 'default': Issue #19771:

[issue25809] "Invalid" tests on locales

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f24a6dc934b by Martin Panter in branch '3.5': Issue #25809: Skip testing platform-dependent French thousands separator https://hg.python.org/cpython/rev/4f24a6dc934b New changeset 7c5c03143923 by Martin Panter in branch 'default': Issue #25809:

[issue25845] _ctypes\cfield.c identical subexpressions in Z_set

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 26859a7e385c by Martin Panter in branch '3.5': Issue #25845: Drop redundant checks leftover from int to long conversion https://hg.python.org/cpython/rev/26859a7e385c New changeset 9be59ad8af80 by Martin Panter in branch 'default': Issue #25845:

[issue19771] runpy should check ImportError.name before wrapping it

2015-12-11 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Mikhail Gulyaev added the comment: You right I found who resend requests! My request is goes through httplb2(which use httplib and resends request on failure), but the issue is that if request body contains file and then that file is read out and on retry there is nothing to read since we

[issue19771] runpy should check ImportError.name before wrapping it

2015-12-11 Thread Berker Peksag
Changes by Berker Peksag : -- stage: patch review -> commit review ___ Python tracker ___

[issue25845] _ctypes\cfield.c identical subexpressions in Z_set

2015-12-11 Thread Alexander Riccio
New submission from Alexander Riccio: I found this while writing up a separate bug (CPython doesn't use static analysis!). In _ctypes/cfield.c, Z_set has a bug of some sort: if (PyLong_Check(value) || PyLong_Check(value)) { See:

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: One possible solution for all these variants is to let code objects track both the co.firstlineno and co.firstrowno. -- ___ Python tracker

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Martin Panter
Martin Panter added the comment: Okay that makes a lot more sense! I agree that this should either be fixed in httplib2 or in your own script. The problem parallels Issue 5038, where urlopen() is used (rather than httplib2), and the request is retried after getting an authorization failure

[issue25822] Add docstrings to fields of urllib.parse results

2015-12-11 Thread Swati Jaiswal
Changes by Swati Jaiswal : Added file: http://bugs.python.org/file41290/iss_25822_2.patch ___ Python tracker ___

[issue25829] Mixing multiprocessing pool and subprocess may create zombie process, and cause program to hang.

2015-12-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: I wouldn't _assume_ that there was a good design reason for that in multiprocessing... it already mixed threads and fork() without realizing that you cannot safely do that. -- nosy: +gregory.p.smith -gps ___

[issue25847] CPython not using Visual Studio code analysis!

2015-12-11 Thread Alexander Riccio
New submission from Alexander Riccio: Visual Studio comes with static analysis, enabled by /analyze (command line) or "Code analysis" in the project configuration dialog. Currently, none of the CPython projects in PCbuild have Code Analysis turned on, in any configuration. I was going to

[issue25809] "Invalid" tests on locales

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 903a2664d32d by Martin Panter in branch '2.7': Issue #25809: Skip testing platform-dependent French thousands separator https://hg.python.org/cpython/rev/903a2664d32d -- ___ Python tracker

[issue25840] Allow `False` to be passed to `filter`

2015-12-11 Thread Emanuel Barry
Emanuel Barry added the comment: Do you mean like 'filter(None, lst)' does? -- nosy: +ebarry ___ Python tracker ___

[issue25711] Rewrite zipimport from scratch

2015-12-11 Thread STINNER Victor
STINNER Victor added the comment: Can you both publish your WIP work? -- nosy: +haypo ___ Python tracker ___

[issue25809] "Invalid" tests on locales

2015-12-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Same here. Thanks Martin. -- ___ Python tracker ___ ___

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread Mark Lundeberg
New submission from Mark Lundeberg: Although -0.0 and +0.0 compare as equal using the == operator, they are distinct floating point numbers and in some cases behave differently. (See more information on the wikipedia article "Signed zero".) The distinction between +0.0 and -0.0 is most

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread STINNER Victor
STINNER Victor added the comment: You should use complex(a, b) to have a reliable behaviour. Python parse doesn't see "-1-0j" as a complex literal, but as (-1)-(0j): int-complex. Example with the AST output: >>> ast.dump(ast.parse('-1-0j'))

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread Mark Lundeberg
Mark Lundeberg added the comment: Good point, it is doing (int-complex), observe also the following pecularities: >>> -0 - 0j 0j >>> -0. - 0j (-0+0j) >>> -0j -0j >>> 0-0j 0j >>> -(0j) (-0-0j) >>> 0.+(-0j) 0j Does this mean the bug is in repr() ? As I understand the output of repr() is

[issue25840] Allow `False` to be passed to `filter`

2015-12-11 Thread leewz
leewz added the comment: ebarry, note that `filter(None, lst)` is equivalent to `filter(bool, lst)`, which is the opposite of `filterfalse(None, lst)`. (Though `filter(True, lst) == filter(bool, lst)` would be a parallel.) -- ___ Python tracker

[issue25843] unexpected output using pythons ternary operator in combination with lambda

2015-12-11 Thread Tijs Van Oevelen
Tijs Van Oevelen added the comment: Apologies for not posting a summary of the bug. I really had no idea how to describe the problem, as it is over my head. I could only refer to my question on Stack Overflow that triggered the discovery of the bug. --

[issue25842] Installer does not set permissions correctly?

2015-12-11 Thread Zachary Ware
Zachary Ware added the comment: Right, I should have been more specific here. Sorry about that. -- ___ Python tracker ___

[issue25843] unexpected output using pythons ternary operator in combination with lambda

2015-12-11 Thread Tijs Van Oevelen
Tijs Van Oevelen added the comment: It's definitely also in 3.4 by the way. -- versions: +Python 3.4 ___ Python tracker ___

[issue25842] Installer does not set permissions correctly?

2015-12-11 Thread Zachary Ware
Zachary Ware added the comment: Responded on python-list. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue25842] Installer does not set permissions correctly?

2015-12-11 Thread Steve Dower
Steve Dower added the comment: And for future reference, anyone who has Python in Program Files has *explicitly* chosen to put it there. We always default to a location where the current user can install packages as normal. -- ___ Python tracker

[issue25843] unexpected-output-using-pythons-ternary-operator-in-combination-with-lambda

2015-12-11 Thread Tijs Van Oevelen
Changes by Tijs Van Oevelen : -- nosy: -Tijs Van Oevelen ___ Python tracker ___

[issue25843] unexpected-output-using-pythons-ternary-operator-in-combination-with-lambda

2015-12-11 Thread Tijs Van Oevelen
New submission from Tijs Van Oevelen: The bug is described on Stack Overflow in length: http://stackoverflow.com/questions/34100732/unexpected-output-using-pythons-ternary-operator-in-combination-with-lambda -- messages: 256229 nosy: Tijs Van Oevelen priority: normal severity: normal

[issue25843] unexpected-output-using-pythons-ternary-operator-in-combination-with-lambda

2015-12-11 Thread R. David Murray
R. David Murray added the comment: For reference, the minimal reproducer is: >>> f1, f2 = lambda: 1, lambda: 1.0 >>> f2() 1 The cause (according to the answer in the link) is that the two lambda's incorrectly compare as equal and end up sharing the same code object...one of the inequality

[issue25843] unexpected output using pythons ternary operator in combination with lambda

2015-12-11 Thread Ethan Furman
Changes by Ethan Furman : -- title: unexpected-output-using-pythons-ternary-operator-in-combination-with-lambda -> unexpected output using pythons ternary operator in combination with lambda ___ Python tracker

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-11 Thread R. David Murray
R. David Murray added the comment: Thanks for posting the bug. I added the aside because this is the third or fourth of these reference-only things I've seen in the past couple weeks and I finally figured out what bothered me about them. We should put something about this in the devguide on

[issue25144] 3.5 Win install fails with "TARGETDIR"

2015-12-11 Thread Ivan Radic
Ivan Radic added the comment: I got this with 3.5.1 installer on Windows 7. I solved it by running installer with elevated privileges. Installer for 2.7.11 was not affected. -- nosy: +ivan.radic ___ Python tracker

[issue25842] Installer does not set permissions correctly?

2015-12-11 Thread R. David Murray
R. David Murray added the comment: For the record Zach's conclusion is that the conflict is a NppFTP issue, since api-ms-win-crt-runtime is part of the CRT and so any problem would not be unique to Python (or solvable by python). The permissions issue is more obvious: that's how it is

[issue25144] 3.5 Win install fails with "TARGETDIR"

2015-12-11 Thread Steve Dower
Steve Dower added the comment: Good to hear there's a workaround. I seem to recall an issue in the past with some security policies that disallow passing parameters to installers. This may be the cause here. When I get a chance to sit at a computer I'll see if I can track that down.

[issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX

2015-12-11 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___

[issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX

2015-12-11 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- components: +Library (Lib) ___ Python tracker ___ ___

[issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX

2015-12-11 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue25845] _ctypes\cfield.c identical subexpressions in Z_set

2015-12-11 Thread random832
random832 added the comment: Sorry, my mistake, I was looking at z_set instead of Z_set. The earlier fix had left Z_set out for some reason. Anyway, just some historical interest anyway. -- ___ Python tracker