[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
http://bugs.python.org/issue17963
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: Python 3.4
Added file: http://bugs.python.org/file38232/test_os_log

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



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

I have OSS 3.8.2 and I can reproduce the bug. Can someone with OSS = 4.0 
confirm that dsp.write() works as expected?

--
nosy: +ashkop

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



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

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



[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 regenerate them).  That 
would at least allow you to skip the port mercurial step.

On the other hand, it sounds like Ryan may be volunteering to update the 
patches to apply to the head of default for you.  (And yes, Ryan, the patches 
should be against the head of the default branch.)

Now, whether or not we will accept the patches is a different discussion, but 
I'd certainly like to see more Android support in our tree myself.

--
nosy: +r.david.murray

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



[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
http://bugs.python.org/issue23511
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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':
fix merge_collapse to actually maintain the invariant it purports to (closes 
#23515)
https://hg.python.org/cpython/rev/620cb13008b7

New changeset be5ddc8b6a88 by Benjamin Peterson in branch 'default':
merge 3.4 (#23515)
https://hg.python.org/cpython/rev/be5ddc8b6a88

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

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 should the caret point in each of these cases, why, 
and how would you explain it to the parser?

for x in the range(10):

for x in range(10) the:

for x in range(10) range(10):

for each x in range(10):

for x each in range(10):


Those are just some of the possibilities for just the for statement, let alone 
every other statement, or even every place an expression can be used.

If you can come up with a good, simple, general patch that covers every case, 
please do so!  I'm quite sure it would be accepted.  But until then, I'm afraid 
this isn't going to happen.

--
status: open - closed

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 timestamps in the future.


I recall the earlier discussions of rounding in the datetime module and Mark's 
explanation that rounding up is fine as long as ordering is preserved. i.e. for 
x  y round(x) = round(y).

There are cases when producing times in the future are problematic, for example 
UNIX make really dislikes when file timestamps are in the future, but if this 
was the main motivation - rounding towards -infinity would be more appropriate.

In any case, as long as we have the following in the datetime module 
documentation, I think this behavior is a bug:


On the POSIX compliant platforms, utcfromtimestamp(timestamp) is equivalent to 
the following expression:

datetime(1970, 1, 1) + timedelta(seconds=timestamp)


 timestamp = 1424817268.274
 datetime.utcfromtimestamp(timestamp) == datetime(1970, 1, 1) + 
 timedelta(seconds=timestamp)
False

--

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



[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 Python 3.
https://hg.python.org/cpython/rev/cb911e1fb3dc

--
nosy: +python-dev

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



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

--
nosy: +mark.dickinson

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: +3.2regression

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

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



[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, the most probable mistake is as I described.  
Please reconsider.

--
status: closed - open

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue23517
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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. */
_PyTime_ROUND_DOWN=0,
/* Round away from zero.
   For example, used for timeout to wait at least N seconds. */
_PyTime_ROUND_UP=1,
/* Round towards minus infinity (-inf).
   For example, used for the system clock with UNIX epoch (time_t). */
_PyTime_ROUND_FLOOR=2
} _PyTime_round_t;

I changed Modules/_datetimemodule.c to use _PyTime_ROUND_FLOOR, instead of 
_PyTime_ROUND_DOWN.

--

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[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 list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 timsort in a way that _did_ make it possible to 
provoke the stack overflow on current hardware).  And they got it wrong, not 
increasing it enough.  Without the _intended_ invariant, it's difficult to 
figure out how much is enough.

It's not worth measuring performance.  If there are a total of R runs in the 
input array, a total of R-1 merges will be performed (with or without the 
change).  As explained in listsort.txt, per-merge overheads don't matter at all 
unless they're outrageous, because there are at most ceiling(len(array)/32) 
runs.  So the total number of merges is a small fraction of the number of array 
elements (call that `N`), in an N*log(N) process.  Adding a few native C 
integer comparisons per merge (as the change essentially does) is trivial.

It may be possible to contrive inputs which run significantly slower (or 
faster!) with the change, because the order in which runs are merged may 
change.  But then you'd just be chasing patterns of HW and OS layers-of-caching 
behavior specific to the box the test is running on.

--

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_content_length(body if body is not None else '')

I'm happy to produce a patch if there's any chance it would be merged.

--
nosy: +jimr

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



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue23519
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

Any reason you can't define the forward definition like this? (It only seems to 
work with myStr[] and not *myStr, for some reason.)

--

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

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



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the user process.
This is not a bug anymore.It is working fine.

--

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



[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 floating point arithmetics, but when converting from 
nanoseconds to microseconds, you should round to nearest 1000 ns with 500 ns 
ties resolved to even number of microseconds.


 - os.utime()

This takes nanoseconds as an optional argument.  Passing floats in times should 
probably be deprecated. In any case, here you would be rounding floats to 
nanoseconds and what you do with 0.5 nanoseconds is less important because in 
most cases they are not even representable as floats.

 - time.clock_settime()

Is this a new method?  I don't see it in 3.5.0a1.

 - time.gmtime()

This should be fixed

 time.gmtime(1.9).tm_sec
1

is really bad and

 time.gmtime(-1.9)[:6]
(1969, 12, 31, 23, 59, 59)

is probably even worse. 


 - time.localtime()
 - time.ctime()

Same story as in time.gmtime.

--

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 self * a / b
  File /Users/a/Work/cpython/Lib/datetime.py, line 516, in __mul__
self._microseconds * other)
  File /Users/a/Work/cpython/Lib/datetime.py, line 411, in __new__
raise OverflowError(timedelta # of days is too large: %d % d)
OverflowError: timedelta # of days is too large: 63720670102


C implementation is unaffected:

 from datetime import timedelta
 timedelta(seconds=1)*0.6112295
datetime.timedelta(0, 0, 611229)

--
assignee: belopolsky
components: Library (Lib)
messages: 236602
nosy: belopolsky
priority: normal
severity: normal
stage: needs patch
status: open
title: OverflowError from timedelta * float in datetime.py
type: behavior
versions: Python 3.5

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



[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
datetime.timedelta(0, 0, 611229)
 timedelta(seconds=0.6112295)
datetime.timedelta(0, 0, 611230)

See msg194311  in #8860.

--
keywords: +patch
Added file: http://bugs.python.org/file38234/issue23521.patch

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



[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 it's not the good rounding method?

--

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



[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
 round(1.5)
2

--

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



[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 
avoid FP timestamps in any case.  On the other hand, double precision 
timestamps are adequate for microsecond resolution now and in the next few 
decades.

Timestamps like OP's (sec=1424817268, us=274000) should not change when 
converted to double and back.  IMO, the following behavior is a bug.

 dt = datetime(2015, 2, 24, 22, 34, 28, 274000)
 datetime.utcfromtimestamp(dt.timestamp())
datetime.datetime(2015, 2, 25, 3, 34, 28, 273999)

--

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

 Mark and I put in a lot of effort to get the rounding in the datetime module 
 right.  (See for example, #8860.)

I'm unable right now to say which rounding mode should be used in the decimal 
module. But it's important to use the same rounding mode for all similar 
operations. For example, time.time() and datetime.datetime.now() should have 
the same rounding method (bad example, time.time() returns a float, which 
doesn't round the result).

For example, in my local patch, I'm using ROUND_FLOOR for:

- datetime.date.fromtimestamp()
- datetime.datetime.fromtimestamp()
- datetime.datetime.now()
- datetime.datetime.utcnow()
- os.utime()
- time.clock_settime()
- time.gmtime()
- time.localtime()
- time.ctime()

Note: the Python implementation of datetime uses time.localtime() and 
time.gmtime() for fromtimestamp(), so these functions should also have the same 
rounding method.

--

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue23521
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 efficient, measures of central location, 
see median() and mode()

https://docs.python.org/3/library/statistics.html

While I appreciate the intention, this is quite misleading.  The implication is 
that the mean, median and mode are different ways to estimate one central 
location, however, in reality they are very different things (albeit which 
refer to a similar notion).

The sample mean is an unbiased estimator of the true mean but it need not be 
unbiased as an estimator of the true median or modes and vice versa for the 
median and mode.

To make this clearer I would rephrase to 

The mean is strongly affected by outliers and is not necessarily 
representative of the central tendency of the data. For cases with large 
outliers or very low sample size, see median() and mode()

Apologies if this is seen as frivolous, but statistics can be hard enough to 
remain very clear about even when the words are used precisely.

--
assignee: docs@python
components: Documentation
messages: 236612
nosy: Journeyman08, docs@python
priority: normal
severity: normal
status: open
title: Misleading note in Statistics module documentation
type: enhancement
versions: Python 3.4

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



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue20683
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 have by 
responding to issues raised by Coverity.  Maybe next time, this group will find 
a bug that does matter now.

--
nosy: +terry.reedy
versions: +Python 2.7, Python 3.4, Python 3.5

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



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

--

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



[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
http://bugs.python.org/issue7159
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
datetime.timedelta(0, 0, 611230)

It all boils down to the the fact that

 round(0.6112295*10**6)
611230

but

 round(0.6112295, 6) * 10**6
611229.0


In my view, timedelta(seconds=1) is 10**6 microseconds and timedelta(seconds=1) 
* 0.6112295 is 611229.5 microseconds which is correctly rounded to 611230 in  
timedelta(seconds=0.6112295), but timedelta(seconds=1)*0.6112295 returning 
611229 is incorrect.

If I understand Mark's argument correctly (see msg107097), he views timedeltas 
as fractional number of seconds rather than integer number of microseconds and 
in his view timedelta(seconds=0.6112295) is timedelta(seconds=0.6112295) is 
0.6112294981 seconds because

 Decimal(0.6112295)
Decimal('0.611229498116351207499974407255649566650390625')

Thus timedelta(seconds=0.6112295), 0.6112295 should be rounded down to 6 
decimal places and result in 611229 microseconds.

Neither of us thought resolving this was important enough to hold other fixes.  
In the same spirit, I suggest that we apply my current patch that fixes a crash 
and pass the rounding curiosity down to the future generations.

--
nosy: +mark.dickinson

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



[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 rep...@bugs.python.org
http://bugs.python.org/issue21293
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >