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

2015-04-12 Thread Daniil Bondarev

Daniil Bondarev added the comment:

Addrressed feedback: splitted long line in multiple in tests.

--
Added file: http://bugs.python.org/file38904/full_names.patch

___
Python tracker 

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



[issue10289] Document magic methods called by built-in functions

2015-04-12 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
stage: needs patch -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue23921] Standardize documentation whitespace, formatting

2015-04-12 Thread Berker Peksag

Berker Peksag added the comment:

Patch looks good to me. Thanks! :)

I left a couple of comments on Rietveld: http://bugs.python.org/review/23921/

We can probably ignore the following type of changes too:

-  if pid == 0: # In a child process
+  if pid == 0:  # In a child process

-  status = '200 OK' # HTTP Status
-  headers = [('Content-type', 'text/plain')] # HTTP Headers
+  status = '200 OK'  # HTTP Status
+  headers = [('Content-type', 'text/plain')]  # HTTP Headers

-   dom1 = parse('c:\\temp\\mydata.xml') # parse an XML file by name
+   dom1 = parse('c:\\temp\\mydata.xml')  # parse an XML file by name

Also, perhaps we can add your script to Tools/scripts and integrate it with the 
"make patchcheck" command.

--
nosy: +berker.peksag
versions: +Python 3.4, Python 3.5 -Python 3.6

___
Python tracker 

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



[issue22980] C extension naming doesn't take bitness into account

2015-04-12 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Ad hoc introduction of the bitness is at least wrong or not helpful
> for x32 and ARM ilp32.

Perhaps it's not helpful for those ABIs / architectures, but I don't see how 
it's worse than the status quo.

--

___
Python tracker 

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



[issue23452] Build errors using VS Express 2013 in win32 mode

2015-04-12 Thread Tim Golden

Tim Golden added the comment:

Well, in the interests of due diligence, I checked out & built each of the four 
flavours (32/64 Release/Debug) independently and without any errors. I then 
rebuilt each with the "wrong" Platform (ie for Win32 in the x64 directory and 
vice versa) without cleaning first and also without error.

So I'm going to close this on the ground that we can't reproduce it. If someone 
can come up with a recipe for reproducing the problem we can re-open (or start 
a new issue).

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue12955] urllib.request example should use "with ... as:"

2015-04-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6d5336a193cc by Berker Peksag in branch '3.4':
Issue #12955: Change the urlopen() examples to use context managers where 
appropriate.
https://hg.python.org/cpython/rev/6d5336a193cc

New changeset 08adaaf08697 by Berker Peksag in branch 'default':
Issue #12955: Change the urlopen() examples to use context managers where 
appropriate.
https://hg.python.org/cpython/rev/08adaaf08697

--
nosy: +python-dev

___
Python tracker 

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



[issue12955] urllib.request example should use "with ... as:"

2015-04-12 Thread Berker Peksag

Berker Peksag added the comment:

Great patch. Thanks Martin.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue23919] test_os fails several C-level assertions

2015-04-12 Thread Steve Dower

Steve Dower added the comment:

I mean we just suppress the output completely. Currently it sets the mode to 
stderr but we can set it to silent, though I don't recall what the name of the 
constant we need is.

--

___
Python tracker 

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



[issue22652] Add suggestion about keyword arguments to this error message: "builtins.TypeError: my_func() takes 1 positional argument but 2 were given"

2015-04-12 Thread Ram Rachum

Ram Rachum added the comment:

ztane: I don't think so. You're taking attention away from the "and 
keyword-only arguments", where in fact this is the piece of information that's 
likely to save the user the most time, so therefore it should get more 
attention.

--

___
Python tracker 

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



[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-12 Thread R. David Murray

R. David Murray added the comment:

Oh,of course.  This issue was bugging the back of my brain after I commented on 
it, but I hadn't circled back to figure it out.  Thanks, Martin, I'll close 
this as not a bug.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue9517] Make test.script_helper more comprehensive, and use it in the test suite

2015-04-12 Thread R. David Murray

R. David Murray added the comment:

It could be done either way, but I suspect that indovidual issues for test 
module changes, entered as dependencies on this issue, is probably the more 
effective in this case.

--

___
Python tracker 

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



[issue23920] Should Clinic have "nullable" or types=NoneType?

2015-04-12 Thread Larry Hastings

Larry Hastings added the comment:

Saying that "str" is redundant makes me think you don't understand what "types" 
does.  "types" accepts a text string listing all of the Python types the 
converter accepts.  You can accept the converter's default, or you can specify 
your own value.  If you specify your own value you must list all the types.  So 
"str" is not redundant there.

The problem with "which one is more obvious": we could get rid of "nullable" 
and just use "types".  But we can't get rid of "types".  If we keep both, now 
we theoretically have two ways to specify it.  Which should you use?  Do we say 
"you must use the nullable parameter, you're not allowed to specify NoneType in 
types", and if so, why?

p.s. I promised to rename "nullable" to "accepts_none".  Obviously if I just 
get rid of it I needn't bother.

p.p.s. Should types accept a "+" to mean "all the defaults, and..."?  For 
example, calling str(types="+ foo") was equivalent to str(types="str foo")?

--

___
Python tracker 

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



[issue23921] Standardize documentation whitespace, formatting

2015-04-12 Thread R. David Murray

R. David Murray added the comment:

I will have comments on this, but it may be a bit before I get to it.  In 
general I'm not sure of the value, though in the little bit I scanned so far 
there are at least a few changes that look worthwhile.

--

___
Python tracker 

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



[issue22652] Add suggestion about keyword arguments to this error message: "builtins.TypeError: my_func() takes 1 positional argument but 2 were given"

2015-04-12 Thread R. David Murray

R. David Murray added the comment:

These messages are generated generically, and just because the proble you hit 
was this one, doesn't someone else won't hit it for a different reason and have 
other requirements.  (Note that these messages are *way* better than they used 
to be, thanks to Benjanmi Peterson's work).

The suggestion of adding that the function takes keyword only argumentgs seems 
reasonable to me, though I'd have to look at Benjamin's code to make sure it 
makes sense (I thought it already mentioned what argments/types the function 
took).  As you say, it is low priority.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-12 Thread Travis A. Everett

Travis A. Everett added the comment:

Thanks, Martin--I should've thought to check to see if it'd just been pushed 
back in the list. I was just focusing on a workaround for another problem and 
did a double-take when the traceback value didn't match what was set.

This resolution is fine by me, but a note in the doc for with_traceback 
(https://docs.python.org/3/library/exceptions.html#BaseException.with_traceback)
 that it'll be immediately bumped back in the list when raised (as in the 
documentation's usage example) might help clarify for others.

--

___
Python tracker 

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



[issue14458] Non-admin installation fails

2015-04-12 Thread R. David Murray

R. David Murray added the comment:

Is this a duplicate of issue 22516?

--
components: +Windows
nosy: +r.david.murray, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue14458] Non-admin installation fails

2015-04-12 Thread Zachary Ware

Zachary Ware added the comment:

Pretty much.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Windows Installer won't - even when using "just for me"option

___
Python tracker 

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



[issue12327] in HTTPConnection the are len(body) and TypeError catch exception to detect if body is file like object, this hack do work with StringIO object

2015-04-12 Thread R. David Murray

R. David Murray added the comment:

Length computation is being dealt with in issue 23350.

--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Content-length is incorrect when request body is a list or tuple

___
Python tracker 

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



[issue23350] Content-length is incorrect when request body is a list or tuple

2015-04-12 Thread R. David Murray

R. David Murray added the comment:

See also issue 12327 for length issue using StingIO.

--

___
Python tracker 

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



[issue23922] turtle.py and turtledemo use the default tkinter icon

2015-04-12 Thread Al Sweigart

New submission from Al Sweigart:

The turtle.py and turtledemo scripts launch windows that have the default 
tkinter icon. Instead, they should make use of the IDLE icon (which are already 
in the idlelib/Icons folder)

--
components: IDLE
messages: 240564
nosy: Al.Sweigart
priority: normal
severity: normal
status: open
title: turtle.py and turtledemo use the default tkinter icon
versions: Python 3.5

___
Python tracker 

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



[issue23910] C implementation of namedtuple (WIP)

2015-04-12 Thread Joe Jevnik

Joe Jevnik added the comment:

# Original version / new python implementation
./python -m timeit -s "from collections import namedtuple;a = namedtuple('a', 
'a b c')(1, 2, 3)" "a.a"
1000 loops, best of 3: 0.07 usec per loop


# C implementation
./python -m timeit -s "from collections import namedtuple;a = namedtuple('a', 
'a b c')(1, 2, 3)" "a.a"
1000 loops, best of 3: 0.028 usec per loop


The fallback is the same implementation that is currently used so this should 
have no affect on pypi.

--
Added file: http://bugs.python.org/file38905/namedtuple-indexer-update.patch

___
Python tracker 

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



[issue23668] Support os.ftruncate on Windows

2015-04-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cb7ca578a0c3 by Steve Dower in branch 'default':
Issue #23668: Regenerates posixmodule.c.h for new ifdefs
https://hg.python.org/cpython/rev/cb7ca578a0c3

--

___
Python tracker 

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



[issue23922] turtle.py and turtledemo use the default tkinter icon

2015-04-12 Thread Ned Deily

Ned Deily added the comment:

Or perhaps a generic Python ioon.  Is there a tkinter icon?  I think the 
default is just the Tk-supplied icon.  Also, there are platform differences.  
AFAIK, on OS X the application icon cannot be changed while running; 
information about icon files is specified in the app bundle Info.plist.  For OS 
X framework builds, launching IDLE.app (for example, via double-click) results 
in an IDLE icon.  Opening turtledemo (or, for that matter, idle from the 
command line) causes the default Python icon to be used, from the Python.app 
bundle located within the framework.  Running tkinter apps with non-framework 
builds default to the Tk icon if no app bundle is used.  So, I think there is 
nothing to be done here for OS X but one needs to be aware of the platform 
differences when testing.

--
nosy: +ned.deily

___
Python tracker 

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



[issue23910] C implementation of namedtuple (WIP)

2015-04-12 Thread Joe Jevnik

Joe Jevnik added the comment:

sorry, I meant pypy

--

___
Python tracker 

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



[issue23923] Integer operations (// or %) on negative numbers product wrong results.

2015-04-12 Thread Antoon Houben

New submission from Antoon Houben:

-17 // 3 should produce -5 but is currently producing -6
-17 % 3 should produce 2 but is currently producing 1

--
messages: 240569
nosy: Antoon
priority: normal
severity: normal
status: open
title: Integer operations (// or %) on negative numbers product wrong results.
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue23918] symbols namespace pollution

2015-04-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bf5a899a5d7c by Benjamin Peterson in branch 'default':
make DirEntryType and ScandirIteratorType static (closes #23918)
https://hg.python.org/cpython/rev/bf5a899a5d7c

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

___
Python tracker 

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



[issue23464] Remove or deprecate JoinableQueue in asyncio docs

2015-04-12 Thread A. Jesse Jiryu Davis

Changes by A. Jesse Jiryu Davis :


--
keywords: +patch
Added file: http://bugs.python.org/file38906/issue23464.diff

___
Python tracker 

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



[issue23464] Remove or deprecate JoinableQueue in asyncio docs

2015-04-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2a18f6b85da2 by R David Murray in branch 'default':
#23464: remove JoinableQueue that was deprecated in 3.4.4.
https://hg.python.org/cpython/rev/2a18f6b85da2

--
nosy: +python-dev

___
Python tracker 

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



[issue23464] Remove or deprecate JoinableQueue in asyncio docs

2015-04-12 Thread R. David Murray

R. David Murray added the comment:

Deprecation was done in 3.4, removal is now done in 3.5.  Thanks, Jesse.

--
keywords:  -patch
nosy: +r.david.murray
stage:  -> resolved
status: open -> closed
versions: +Python 3.5

___
Python tracker 

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



[issue23922] turtle.py and turtledemo use the default tkinter icon

2015-04-12 Thread Al Sweigart

Al Sweigart added the comment:

On my system (Windows 7) it shows up with a blue feather icon, which I is the 
generic Tk icon.

The reason I suggest the IDLE icon is 1) we already have it and 2) it's the 
python logo on top of a generic sheet of paper icon so it fits well enough imo, 
and 3) I'm assuming that the use of the turtle demo and IDLE are pretty 
intertwined anyway.

I've attached a patch which I've tested on Windows, but I'm away from my other 
machines right now.

--
Added file: http://bugs.python.org/file38907/patch_issue_23922

___
Python tracker 

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



[issue23923] Integer operations (// or %) on negative numbers product wrong results.

2015-04-12 Thread Eric V. Smith

Eric V. Smith added the comment:

This is the expected behavior: 
https://docs.python.org/2/faq/programming.html#why-does-22-10-return-3

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue23924] Add OS X to Dev Guide Quickstart build step

2015-04-12 Thread Carol Willing

New submission from Carol Willing:

Since many devs use OS X, it would be helpful to add a mention of OS X in Step 
2 (Build). It would also be helpful to add that it is okay to ignore build 
errors/warnings as long as CPython reports building correctly.

--
components: Devguide
messages: 240575
nosy: ezio.melotti, willingc
priority: normal
severity: normal
status: open
title: Add OS X to Dev Guide Quickstart build step

___
Python tracker 

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



[issue7159] Urllib2 authentication memory.

2015-04-12 Thread Akshit Khurana

Changes by Akshit Khurana :


--
nosy: +axitkhurana

___
Python tracker 

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



[issue23761] test_socket fails on Mac OSX 10.9.5

2015-04-12 Thread Carol Willing

Carol Willing added the comment:

Tests for current CPython version now pass on Mac OSX  10.9.5. Closing issue.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-12 Thread R. David Murray

R. David Murray added the comment:

Yes, a doc note would be a good idea, I think.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
resolution: not a bug -> 
status: closed -> open
versions:  -Python 3.2, Python 3.3, Python 3.6

___
Python tracker 

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



[issue10933] Tracing disabled when a recursion error is triggered (even if properly handled)

2015-04-12 Thread James Powell

Changes by James Powell :


--
nosy: +james, r.david.murray

___
Python tracker 

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



[issue10933] Tracing disabled when a recursion error is triggered (even if properly handled)

2015-04-12 Thread Peter McCormick

Changes by Peter McCormick :


--
nosy: +pdmccormick

___
Python tracker 

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



[issue10933] Tracing disabled when a recursion error is triggered (even if properly handled)

2015-04-12 Thread James Powell

James Powell added the comment:

We investigated this issue with pdmccormick & r.david.murray.

The behaviour appears to be intentional. If the trace function raises an 
Exception, system tracing is disabled entirely.

See attached documentation patch to clarify this.

--
keywords: +patch
Added file: http://bugs.python.org/file38908/issue_10933.patch

___
Python tracker 

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



[issue10933] Tracing disabled when a recursion error is triggered (even if properly handled)

2015-04-12 Thread Peter McCormick

Peter McCormick added the comment:

Removed unrelated doc changes.

--
Added file: http://bugs.python.org/file38909/issue_10933-2.patch

___
Python tracker 

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



[issue17380] initproc return value is unclear

2015-04-12 Thread James Powell

Changes by James Powell :


--
nosy: +james

___
Python tracker 

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



[issue17380] initproc return value is unclear

2015-04-12 Thread James Powell

James Powell added the comment:

See attached patch to clarify this in the docs.

--
keywords: +patch
Added file: http://bugs.python.org/file38910/issue_17380.patch

___
Python tracker 

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



[issue17380] initproc return value is unclear

2015-04-12 Thread James Powell

Changes by James Powell :


--
nosy: +r.david.murray

___
Python tracker 

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



[issue23925] test_cmd_line failing on PYTHONSTARTUP

2015-04-12 Thread Jamiel Almeida

New submission from Jamiel Almeida:

Running the test test_cmd_line with my current PYTHONSTARTUP set to the 
attached file breaks the test.

$ ./python.exe -m test test_cmd_line

Changing line 280 on Lib/test/test_cmd_line.py to include either -I or -E makes 
the error be different but still breaks the test.

adding a line with `del env['PYTHONSTARTUP']` before the subprocess works 
around the issue.

This leads me to believe that -E and -I aren't fully ignoring the environment 
variable.

Running with:
$ PYTHONSTARTUP= ./python.exe -m test test_cmd_line

Also works around the issue.

Ran the following to build python and run tests

$ hg clone https://hg.python.org/cpython
$ cd cpython
$ ./configure --with-pydebug && make -j4
$ ./python -m test -j4

Currently on revision: 2a18f6b85da2 2015-04-12 | [rdmurray] #23464: remove 
JoinableQueue that was deprecated in 3.4.4.

--
components: Interpreter Core
files: pythonrc
messages: 240581
nosy: slashfoo
priority: normal
severity: normal
status: open
title: test_cmd_line failing on PYTHONSTARTUP
versions: Python 3.5
Added file: http://bugs.python.org/file38911/pythonrc

___
Python tracker 

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



[issue17380] initproc return value is unclear

2015-04-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c6dc1e0db7f0 by R David Murray in branch '3.4':
#17380: Document tp_init return value in extending docs.
https://hg.python.org/cpython/rev/c6dc1e0db7f0

New changeset d74ede4bbf81 by R David Murray in branch 'default':
Merge: #17380: Document tp_init return value in extending docs.
https://hg.python.org/cpython/rev/d74ede4bbf81

--
nosy: +python-dev

___
Python tracker 

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



[issue17380] initproc return value is unclear

2015-04-12 Thread R. David Murray

R. David Murray added the comment:

Thanks, James.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue10933] Tracing disabled when a recursion error is triggered (even if properly handled)

2015-04-12 Thread R. David Murray

R. David Murray added the comment:

We also discussed whether or not it would be worth indicating in the exception 
that tracing has been disabled.  I believe that implementing this would be 
aided by resolution of issue 23188.  Doing a chained exception for this would 
also make it clearer that the exception happened inside the trace function.

It is not clear that it is sensible to allow tracing to continue if the trace 
function raises an error, since that pretty much leaves the tracer or debugger 
or what have you in an undefined state.  It is also not clear that there is any 
reasonable way to try to avoid a recursion error in the trace function when we 
are near the recursion limit in the underlying code, since the stack depth of 
the trace function is pretty much arbitrary.

--

___
Python tracker 

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



[issue21271] reset_mock needs parameters to also reset return_value and side_effect

2015-04-12 Thread Kushal Das

Kushal Das added the comment:

Working on it. Will submit the patch tomorrow.

--

___
Python tracker 

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



[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2015-04-12 Thread Siegfried Gevatter

Siegfried Gevatter added the comment:

I'll have a try at this one.

--
nosy: +siegfried.gevatter

___
Python tracker 

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



[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2015-04-12 Thread Larry Hastings

New submission from Larry Hastings:

tl;dr: skipitem() in Python 3 still supports "w" and "w#", which were 
abandoned.  They should be removed.

--

If: 
* you have an extension that parses its arguments with
  PyArg_ParseTupleAndKeywords (or its cousins),
* you have optional positional parameters, and
* you run out of positional arguments

CPython will call skipitem() to skip over the remaining positional parameters 
so it can process keyword arguments.  It does this by knowing all the format 
units, and iterating over them and throwing away the various varargs pointers 
until it hits the keyword arguments part of the format string.

PyArg_ParseTuple() etc. in Python 2 supported "w" and "w#" for parsing "objects 
with the read-write buffer interface".  These were removed in Python 3.

skipitem() in Python 3 still supports both skipping "w" and "w#".  But in fact 
the only legal format unit starting with a 'w' in Python 3 is 'w*'.  So a 
function with a 'w*' as an optional parameter that got skipped would be 
misinterpreted; skipitem would see the 'w', not recognize the following '*' and 
leave it there, then the next function that read a character from the format 
string (either skipitem() or convertsimple()) would see the '*' and throw an 
"impossible " exception.

--
assignee: larry
messages: 240587
nosy: larry
priority: low
severity: normal
stage: test needed
status: open
title: skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't
type: crash
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2015-04-12 Thread Larry Hastings

New submission from Larry Hastings:

tl;dr: skipitem() in Python/getsargs.c doesn't know about the 'w*' format unit, 
which could lead to a crash.  It should know about it.

--

If: 
* you have an extension that parses its arguments with
  PyArg_ParseTupleAndKeywords (or its cousins),
* you have optional positional parameters, and
* you run out of positional arguments

CPython will call skipitem() to skip over the remaining positional parameters 
so it can process keyword arguments.  It does this by knowing all the format 
units, and iterating over them and throwing away the various varargs pointers 
until it hits the keyword arguments part of the format string.

Since nobody ever explained about the "w*" format unit to it, that means when 
it sees 'w*' it will misinterpret it.

In both 2.7 and 3.x, it'll interpret it as 'w', throw away one "char *" item 
from varargs, then the next thing that tries to parse a format unit (skipitem 
or convertsimple) will see the '*' and throw an 'impossible' 
exception.

(It's another bug that skipitem() supports 'w' and 'w#' in Python 3, but I 
filed that separately as #23926 .)

--
assignee: larry
components: Interpreter Core
messages: 240588
nosy: larry
priority: low
severity: normal
stage: test needed
status: open
title: getargs.c skipitem() doesn't skip 'w*'
type: crash
versions: Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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