[issue6818] remove/delete method for zipfile/tarfile objects

2015-02-25 Thread Dave Sawyer
Dave Sawyer added the comment: I'd be interested in taking up the zip portion at Pycon 2015 this year. I recently had need to delete file(s) from a zipfile. To do it today with the existing API requires you to unpack the zip and repack it. The unpack is slow and you need enough free disk space

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-25 Thread STINNER Victor
STINNER Victor added the comment: Take a look at https://docs.python.org/devguide/gitdevs.html "Mercurial for git developers" -- ___ Python tracker ___ __

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

2015-02-25 Thread Mathieu Pasquet
New submission from Mathieu Pasquet: Using iscoroutinefunction() on an object returned by functools.partial() should return True if the function wrapped was a coroutine function. (a recursive loop like the one in asyncio/events.py get_function_source() may be what needs to be done) --

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-02-25 Thread Cyd Haselton
Cyd Haselton added the comment: Thanks for the suggestion Victor, however I've only ported git to this environment; the most I;ve used it is to run 'git clone' to pull source from a repo. The recommendation from the mobile-sig mailing list is...given my lack of familiarity with VCS..is to atte

[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

[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 [http://manuals.opensound.com/developer/SNDCTL_DSP_GETOSPACE.ht

[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) versions

[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

[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: http://bugs.python.org/file38233/issue23511_open_cm.d

[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 _

[issue23520] test_os failed (python-3.4.3)

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Extension Modules nosy: +giampaolo.rodola, rosslagerwall type: -> behavior versions: +Python 3.5 ___ Python tracker ___ ___

[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 regenerat

[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 listed,

[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')

[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 shou

[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:

[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':

[issue20303] Argument Clinic: optional groups

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue20256] Argument Clinic: compare signed and unsigned ints

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[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 : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue20260] Argument Clinic: add unsigned integers converters

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[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 : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic nosy: +steve.dower, tim.golden ___ Python tracker ___ ___ Python-bugs-li

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue20341] Argument Clinic: add "nullable ints"

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[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 : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue21314] Document '/' in signatures

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue23500] Argument Clinic: multiple macro definition

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[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 times

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

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

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue23283] Backport Tools/clinic to 3.4

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Argument Clinic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[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

[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 :-) -- __

[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 Pyth

[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 ___

[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 ___

[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 ___ ___

[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 char myStr[]; struct { char* a; } myStruct = { myStr }; int main() { printf("%s", myStruct.a); return 0; } static char myStr[] = "123456789"; Any re

[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 ___ _

[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 av

[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 ___ ___ Python-bugs-list maili

[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 ___ ___ Python-bugs-list mailing list Unsu

[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 ___

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[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: self._set_co

[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. -

[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 "", line 1, in File "/Users/a/Work/cpython/Lib/datetime.py", line 519, in __mul__ ret

[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 timso

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

2015-02-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +bdkearns, benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[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 ___ ___ Python-bugs-list mailing list Un

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

2015-02-25 Thread Aaron Meurer
Changes by Aaron Meurer : -- nosy: +Aaron.Meurer ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[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 th

[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 date

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-02-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: +3.3regression -3.2regression ___ Python tracker ___ ___ Python-bugs-list mailing list

[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 towa

[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 th

[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: > 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 flo

[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 tra

[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 ef

[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 ___ ___ Python-

[issue23522] Misleading note in Statistics module documentation

2015-02-25 Thread SilentGhost
Changes by SilentGhost : -- nosy: +steven.daprano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[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 __

[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 ___ ___ Python-bugs-l

[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 h

[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 ___

[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 :-) -- ___

[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 _

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

2015-02-25 Thread Mark Lawrence
Changes by Mark Lawrence : -- type: -> resource usage ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[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 ___

[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 __

  1   2   >