[issue17963] Deprecate the frame hack for implicitly getting module details

2015-02-25 Thread Eli Bendersky
Eli Bendersky added the comment: I don't have time, unfortunately. So other folks can pick this up. I don't remember if I made any progress on this - will post whatever I have if I find something. -- ___ Python tracker rep...@bugs.python.org

[issue23520] test_os failed (python-3.4.3)

2015-02-25 Thread Alexey
New submission from Alexey: Just one test failed for python-3.4.3 ... test_invalid_offset (test.test_os.TestSendfile) ... FAIL ... -- files: test_os_log messages: 236574 nosy: avoevodkin priority: normal severity: normal status: open title: test_os failed (python-3.4.3)

[issue22094] oss_audio_device.write(data) produces short writes

2015-02-25 Thread Alex Shkop
Alex Shkop added the comment: It seems to me that OSS device doesn't accept more than SNDCTL_DSP_GETOSPACE. Looks like this depends on OSS version because OSS docs state that since 4.x one shouldn't use SNDCTL_DSP_GETOSPACE at all

[issue23511] Broken code example in email module documentation

2015-02-25 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: I wasn't sure if that was going to be out of scope or not. Here's an attached patch that fixes the remaining usages of `open` inside `Doc/includes` to always use a context manager. -- Added file:

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-25 Thread R. David Murray
R. David Murray added the comment: There is a github mirror of the hg repository (https://github.com/python/cpython). Patches produced from it don't automatically get review links in the tracker, but at least they would then be against the most current source (and someone else could

[issue23511] Broken code example in email module documentation

2015-02-25 Thread R. David Murray
R. David Murray added the comment: Looks like the example wasn't updated during the python3 transition. As long as we are changing it, we might as well make it use the file as a context manager. -- ___ Python tracker rep...@bugs.python.org

[issue23520] test_os failed (python-3.4.3)

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Extension Modules nosy: +giampaolo.rodola, rosslagerwall type: - behavior versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23520

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread R. David Murray
R. David Murray added the comment: Most likely this was a rounding fix (ie: not a bug), but hopefully Alexander will know for sure. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23517

[issue20187] The Great Argument Clinic Conversion Derby Meta-Issue

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20187 ___ ___

[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20179 ___ ___

[issue20175] Derby #6: Convert 50 sites to Argument Clinic across 8 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20175 ___ ___

[issue20461] Argument Clinic included return converters hard code use of ``_return_value``

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20461 ___ ___

[issue20178] Derby #9: Convert 52 sites to Argument Clinic across 11 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20178 ___ ___

[issue20168] Derby: Convert the _tkinter module to use Argument Clinic

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20168 ___ ___

[issue20177] Derby #8: Convert 28 sites to Argument Clinic across 2 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20177 ___ ___

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20182 ___ ___

[issue20396] Argument Clinic: Touch source file if any output file changed

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20396 ___ ___

[issue23515] Bad logic in timsort's merge_collapse

2015-02-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 325aec842e3e by Benjamin Peterson in branch '2.7': fix merge_collapse to actually maintain the invariant it purports to (closes #23515) https://hg.python.org/cpython/rev/325aec842e3e New changeset 620cb13008b7 by Benjamin Peterson in branch '3.4':

[issue20304] Argument Clinic: char convertor should use default values of type bytes

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20304 ___ ___

[issue20410] Argument Clinic: add 'self' return converter

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20410 ___ ___

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20173 ___ ___

[issue20171] Derby #2: Convert 115 sites to Argument Clinic in Modules/_cursesmodule.c

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20171 ___ ___

[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20172 ___ ___

[issue20264] Update patchcheck to looks for files with clinic comments

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20264 ___ ___

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23517 ___ ___

[issue23518] Misplaced diagnostic caret for some SyntaxErrors

2015-02-25 Thread Zachary Ware
Zachary Ware added the comment: The problem is, the interpreter can't know what you meant to do, so it can only point out what it can't compile. We did recently add a special case for print without parentheses, but adding special cases for everything is just not feasible. Besides, where

[issue20159] Derby #7: Convert 51 sites to Argument Clinic across 3 files - Derby: Convert the ElementTree module to use Argument Clinic

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20159 ___ ___

[issue23500] Argument Clinic: multiple macro definition

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23500 ___ ___

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Victor's motivation for the change was (msg154811): I chose this rounding method because it is the method used by int(float) and int(time.time()) is a common in programs (more than round(time.time()). Rounding towards zero avoids also producing

[issue23511] Broken code example in email module documentation

2015-02-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 89c6a6c2dd1f by Berker Peksag in branch '3.4': Issue #23511: Port email-simple.py to Python 3. https://hg.python.org/cpython/rev/89c6a6c2dd1f New changeset cb911e1fb3dc by Berker Peksag in branch 'default': Issue #23511: Port email-simple.py to

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Let me dig up the history, but this does not look like correct rounding to me: datetime.utcfromtimestamp(1424817268.274) datetime.datetime(2015, 2, 24, 22, 34, 28, 273999) decimal.Decimal(1424817268.274) Decimal('1424817268.273294281005859375')

[issue20260] Argument Clinic: add unsigned integers converters

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20260 ___ ___

[issue20346] Argument Clinic: missing entry in table mapping legacy convertors to real AC converters

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20346 ___ ___

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like it was an intentional change. See #14180 (changeset 75590:1e9cc1a03365). I am not sure what the motivation was. Note that this change made utcfromtimestamp(t) different from datetime(1970,1,1) + timedelta(seconds=t). -- keywords:

[issue20341] Argument Clinic: add nullable ints

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20341 ___ ___

[issue20174] Derby #5: Convert 50 sites to Argument Clinic across 3 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20174 ___ ___

[issue23501] Argument Clinic: generate code into separate files by default

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23501 ___ ___

[issue20148] Derby: Convert the _sre module to use Argument Clinic

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20148 ___ ___

[issue23283] Backport Tools/clinic to 3.4

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23283 ___ ___

[issue23515] Bad logic in timsort's merge_collapse

2015-02-25 Thread Tim Peters
Tim Peters added the comment: @Benjamin, bless you for changing their n-1 0 to n 1, and for adding parentheses to make the intended grouping obvious instead of a puzzle, and for swapping the addends on the RHS of the new test. Thank you - perfect :-) --

[issue23518] Misplaced diagnostic caret for some SyntaxErrors

2015-02-25 Thread Zack Weinberg
Zack Weinberg added the comment: In terms of the formal grammar of the language, you are correct. However, the position of the caret should be chosen based *not* on the formal grammar, but on a heuristic estimation of what the most probable mistake actually is. In both of the cases I

[issue20256] Argument Clinic: compare signed and unsigned ints

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20256 ___ ___

[issue20303] Argument Clinic: optional groups

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20303 ___ ___

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-25 Thread Cyd Haselton
Cyd Haselton added the comment: Thanks for that suggestion R. David...that would be ideal given the 2.x requirements of Mercurial would mean i'd need to re-port Python before tackling a port of Mercurial. I'll wait until Ryan chimes in before I start serious work with git, just in case.

[issue20586] Argument Clinic: functions with valid sig but no docstring have no __text_signature__

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20586 ___ ___

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20180 ___ ___

[issue20183] Derby #14: Convert 41 sites to Argument Clinic across 5 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20183 ___ ___

[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20184 ___ ___

[issue23492] Argument Clinic: improve generated parser for 1-argument functions

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23492 ___ ___

[issue20181] Derby #12: Convert 50 sites to Argument Clinic across 4 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20181 ___ ___

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I noticed that the rounding mode of datetime is currently wrong. What do you mean by currently? What versions of python have it wrong? -- ___ Python tracker rep...@bugs.python.org

[issue20459] No Argument Clinic documentation on how to specify a return converter

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20459 ___ ___

[issue20432] Argument Clinic: when cloning functions with path_t, path_t retains the old name

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20432 ___ ___

[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic nosy: +steve.dower, tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20323 ___

[issue20291] Argument Clinic should understand *args and **kwargs parameters

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20291 ___ ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___ ___

[issue21314] Document '/' in signatures

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21314 ___ ___

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread STINNER Victor
STINNER Victor added the comment: I started a large change set to support nanoseconds in the C pytime API: see the issue #22117. While working on this change, I noticed that the rounding mode of datetime is currently wrong. Extract of a private patch: typedef enum { /* Round towards zero.

[issue23511] Broken code example in email module documentation

2015-02-25 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Baptiste. -- resolution: - fixed stage: commit review - resolved status: open - closed type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23511

[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2015-02-25 Thread Zachary Ware
Zachary Ware added the comment: That may be for the best. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20323 ___ ___ Python-bugs-list mailing

[issue23521] OverflowError from timedelta * float in datetime.py

2015-02-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- nosy: +bdkearns, benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23521 ___

[issue23515] Bad logic in timsort's merge_collapse

2015-02-25 Thread Tim Peters
Tim Peters added the comment: Since it's impossible to trigger the error on any current machine anyway (no machine has enough memory), increasing the size of the stack would be absurd. If you read the paper, they note that this is what the Java folks first did (they changed this part of

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- keywords: +3.3regression -3.2regression ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23517 ___

[issue14721] httplib doesn't specify content-length header for POST requests without data

2015-02-25 Thread James Rutherford
James Rutherford added the comment: The fix for this still doesn't set Content-Length to zero when body is None, but I don't see any reason why this should be the case. For example, the following snippet would work for any 'empty' body: if 'content-length' not in header_names:

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-25 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: That's what I was saying; I'll update the patches myself. I highly doubt Cyd wants to re-port Python again. :0 I'll ask on python-dev on which would be preferred: configure.ac edits or macro tests. -- ___ Python

[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2015-02-25 Thread Larry Hastings
Larry Hastings added the comment: Perhaps, now that Guido allows us to redirect into a separate file, we should simply abandon the two-pass approach. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20323

[issue23515] Bad logic in timsort's merge_collapse

2015-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your explanation Tim. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23515 ___ ___

[issue23515] Bad logic in timsort's merge_collapse

2015-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How additional test affects performance? May be just increase MAX_MERGE_PENDING? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23515

[issue23519] using asyncio.iscoroutinefunction() on a functools.partial object

2015-02-25 Thread Guido van Rossum
Guido van Rossum added the comment: I recall discussing this before (maybe on the tulip list). I am firmly against. It is a slippery slope -- why inspect a partial but not a lambda? Plus there is no use case. -- ___ Python tracker

[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2015-02-25 Thread Steve Dower
Steve Dower added the comment: Not sure how helpful this is, but the following code compiles fine for me (VC 12.0 and 14.0): #include stdio.h char myStr[]; struct { char* a; } myStruct = { myStr }; int main() { printf(%s, myStruct.a); return 0; } static char myStr[] = 123456789;

[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2015-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What if add const in PyDoc_VAR? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20323 ___ ___

[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2015-02-25 Thread Steve Dower
Steve Dower added the comment: You need to leave static out of the forward definition and then add it in the initialization. The variable is not accessible from other object files - I checked. const char[] and static const char[] should work the same, though I haven't tried it. --

[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix

2015-02-25 Thread Aaron Meurer
Changes by Aaron Meurer asmeu...@gmail.com: -- nosy: +Aaron.Meurer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18199 ___ ___ Python-bugs-list

[issue13077] Unclear behavior of daemon threads on main thread exit

2015-02-25 Thread Vandana Rao
Vandana Rao added the comment: Since the program depends on receiving a raw ^C == 0x03 on stdin, it will never be running under Idle because the Idle process tk gui normally keeps control of keyboard input and the Idle process code intercepts ^C and turns it into KeyboardInterrupt raised in

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: For example, in my local patch, I'm using ROUND_FLOOR for: - datetime.date.fromtimestamp() - datetime.datetime.fromtimestamp() These should use ROUND_HALF_EVEN - datetime.datetime.now() - datetime.datetime.utcnow() These should not involve

[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2015-02-25 Thread Zachary Ware
Zachary Ware added the comment: (My last comment was aimed at Larry's comment about abandoning two-pass...) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20323 ___

[issue23521] OverflowError from timedelta * float in datetime.py

2015-02-25 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: import sys sys.modules['_datetime'] = None from datetime import timedelta timedelta(seconds=1)*0.6112295 Traceback (most recent call last): File stdin, line 1, in module File /Users/a/Work/cpython/Lib/datetime.py, line 519, in __mul__ return

[issue23521] OverflowError from timedelta * float in datetime.py

2015-02-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch fixes the issue, but produces a slightly different result: timedelta(seconds=1)*0.6112295 datetime.timedelta(0, 0, 611230) Note that C implementation is probably buggy: from datetime import * timedelta(seconds=1)*0.6112295

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread STINNER Victor
STINNER Victor added the comment: What do you mean by currently? What versions of python have it wrong? I search for ROUND in Modules/_datetimemodule.c: in the Python development branch (default), I found _PyTime_ROUND_DOWN (Round towards zero). Since a bug was reported, I understand that

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't understand nearest. Sorry for using loose terms. I was hoping the in the context of going back, it would be clear. I believe the correct mode is ROUND_HALF_EVEN. This is the mode used by the builtin round() function: round(0.5) 0

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Victor, Would you consider going back to round to nearest? Mark and I put in a lot of effort to get the rounding in the datetime module right. (See for example, #8860.) Sub-microsecond timesources are still rare and users who work with such should

[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2015-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You forgot static in the declaration Steve. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20323 ___ ___

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread STINNER Victor
STINNER Victor added the comment: Would you consider going back to round to nearest? I don't understand nearest. I prefer to use names of decimal rounding modes: https://docs.python.org/dev/library/decimal.html#rounding-modes In my local patch, I'm using ROUND_FLOOR in _decimal: Round towards

[issue23521] OverflowError from timedelta * float in datetime.py

2015-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. But the bug in C implementation should be fixed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23521 ___

[issue23521] OverflowError from timedelta * float in datetime.py

2015-02-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: You can use self._to_microseconds(). Right. Did that and added a simple test. -- Added file: http://bugs.python.org/file38235/issue23521-2.patch ___ Python tracker rep...@bugs.python.org

[issue23522] Misleading note in Statistics module documentation

2015-02-25 Thread Jake
New submission from Jake: In the statistics module documentation, there is a note that states that The mean is strongly affected by outliers and is not a robust estimator for central location: the mean is not necessarily a typical example of the data points. For more robust, although less

[issue23521] OverflowError from timedelta * float in datetime.py

2015-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can use self._to_microseconds(). -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23521 ___

[issue23522] Misleading note in Statistics module documentation

2015-02-25 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: -- nosy: +steven.daprano ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23522 ___ ___ Python-bugs-list

[issue20703] RuntimeError caused by lazy imports in pdb

2015-02-25 Thread Mark Lawrence
Mark Lawrence added the comment: I can reproduce this on Windows 8.1 with 3.4.3 but cannot do so with 3.5.0a1. -- nosy: +BreamoreBoy versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20703

[issue20683] Add example to tutorial namespace doc, section 9.2

2015-02-25 Thread Mark Lawrence
Mark Lawrence added the comment: What is wrong with the example given here https://docs.python.org/3/tutorial/classes.html#scopes-and-namespaces-example ? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org

[issue23515] Bad logic in timsort's merge_collapse

2015-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: I sent a note to the lead author Stijn de Gouw and mentioned that the repository has moved from svn to hg.python.org. This change may be moot, but I think it worth our effort to keep our code as clean as possible and to encourage automated code checks, as we

[issue23515] Bad logic in timsort's merge_collapse

2015-02-25 Thread Tim Peters
Tim Peters added the comment: Thanks, Terry! Absolutely agreed: a logical error is an error, and will bite us eventually, regardless of whether it does so today. I'm very glad the researchers went to all the trouble to analyze this one :-) --

[issue7159] Urllib2 authentication memory.

2015-02-25 Thread Mark Lawrence
Mark Lawrence added the comment: @Senthil what is your opinion of this? -- nosy: +BreamoreBoy type: behavior - resource usage versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue21201] Uninformative error message in multiprocessing.Manager()

2015-02-25 Thread Mark Lawrence
Mark Lawrence added the comment: Can someone review the patch with a view to commit please. It's a change to one line as explained in msg215934. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21201

[issue20780] Shadowed (duplicate name but different body) test in test_statistics

2015-02-25 Thread Mark Lawrence
Mark Lawrence added the comment: @Steven would you like to formally review the patch please. At a very quick glance it looks okay to me. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20780

[issue20780] Shadowed (duplicate name but different body) test in test_statistics

2015-02-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: The duplicate tests have been renamed already. -- nosy: +benjamin.peterson resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20780

[issue20936] test_strftime: enormous allocation, fails under Clang sanitizer

2015-02-25 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- type: - resource usage ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20936 ___ ___

[issue23521] OverflowError from timedelta * float in datetime.py

2015-02-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: the bug in C implementation should be fixed. In the past (see #8860) we were not able to reach a consensus on which behavior is correct and which has a bug: timedelta(seconds=1)*0.6112295 datetime.timedelta(0, 0, 611229) timedelta(seconds=0.6112295)

[issue21293] Remove capsule hack from object.c?

2015-02-25 Thread Mark Lawrence
Mark Lawrence added the comment: I've taken a bit of a liberty and picked the names of the last three guys who've worked on this file as I assume they're best qualified to comment. -- nosy: +BreamoreBoy, haypo, ncoghlan, pitrou ___ Python tracker

  1   2   >