Stefan Behnel added the comment:
Regarding the patch below, isn't most of this redundant? ISTM that simply
calling PyErr_SetString(...) should do all of this, including the exception
chaining.
diff -r 23ab1197df0b Objects/genobject.c
--- a/Objects/genobject.c Wed Nov 19 13:21:40 2014
Chris Angelico added the comment:
Stefan, I'm not sure - I don't know the details of the C API here. But I tried
commenting out everything but that one line, and while it does result in
RuntimeError, it doesn't do the exception chaining. Currently, I believe the
exception isn't being caught
New submission from mattes:
I get the following error:
File
/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py,
line 731, in sendmail
senderrs[each] = (code, resp)
TypeError: unhashable instance
senderrs[str(each)] = (code, resp) fixes it.
Stefan Behnel added the comment:
Ah, right - chaining only happens automatically when the exception has already
been caught and moved to sys.exc_info.
There's a _PyErr_ChainExceptions(), though, which does it for you. You should
be able to say
PyErr_Fetch(x,y,z)
PyErr_SetString()
Chris Angelico added the comment:
Yeah, I saw that. Since that function begins with an underscore, I thought it
best to replicate its behaviour rather than to call it. Either way ought to
work though.
--
___
Python tracker rep...@bugs.python.org
Stefan Behnel added the comment:
Public underscore C functions are there for exactly the purpose of not
duplicating functionality across *internal* core runtime code, without making
them an official part of the C-API for *external* code. (I understand that it's
a POC patch, though, so whoever
Stefan Behnel added the comment:
FYI, here's the set of tests that I've written for my implementation in Cython:
https://github.com/cython/cython/blob/b4383a540a790a5553f19438b3fc22b11858d665/tests/run/generators_pep479.pyx
--
___
Python tracker
New submission from Piotr Ożarowski:
when py_compile module is asked to create .pyc file for file with invalid name,
it doesn't fail or ignore such request - it creates/overwrites .pyc file for
sane file name (i.e. ignores everything after dot)
$ touch foo.bar.py
$ python3.4 -m py_compile
Xavier de Gaye added the comment:
Out of curiosity I have tried to figure out how to build another test case
using the model provided by runtimerror_singleton.py. This cannot be done, and
for the following reasons:
The infinite recursion of PyErr_NormalizeException() is supposed to occur as
Serhiy Storchaka added the comment:
Here is a patch which makes pickletools.optimize() to work with the MEMOIZE
opcode.
As side effect it also renumbers memoized values, this allows to use short
BINPUT and BINGET instead of LONG_BINPUT and LONG_BINGET.
--
keywords: +patch
stage:
Changes by Brett Cannon br...@python.org:
--
components: +Library (Lib)
stage: - test needed
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22966
___
Changes by Brett Cannon br...@python.org:
--
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22966
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset e4b986350feb by Antoine Pitrou in branch '3.4':
Close issue #22895: fix test failure introduced by the fix for issue #22462.
https://hg.python.org/cpython/rev/e4b986350feb
New changeset 4990157343c6 by Antoine Pitrou in branch 'default':
Close
Antoine Pitrou added the comment:
This should be fixed now.
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22895
___
Roundup Robot added the comment:
New changeset e4b986350feb by Antoine Pitrou in branch '3.4':
Close issue #22895: fix test failure introduced by the fix for issue #22462.
https://hg.python.org/cpython/rev/e4b986350feb
New changeset 4990157343c6 by Antoine Pitrou in branch 'default':
Close
700eb415 added the comment:
From the OpenBSD random(4) man page:
The arc4random(3) function in userland libraries should be used instead, as it
works without the need to access these devices every time.
Theo just had a good talk on this issue here about why /dev/random needs
replacing here:
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22966
___
___
Python-bugs-list mailing
Piotr Ożarowski added the comment:
Python 3.2 generates foo.bar.cpython-32.pyc so it's a regression
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22966
___
New submission from Kyle Lahnakoski:
I installed python 2.7.8 on Windows version 6.2 (build 9200) and get-pip.py
does not run. I traced the problem to c:\python27\lib\tempfile.py Here is my
session:
c:\Users\kyle\Downloadspython
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500
Zachary Ware added the comment:
Try the following in Command Prompt:
cd /D C:\Users\kyle\Downloads python -c import io;print io.__file__
The result should be C:\Python27\lib\io.pyc. If it's not, rename the file
that you do get back.
--
nosy: +zach.ware
resolution: - not a bug
Kyle Lahnakoski added the comment:
Doh! Dirty directory!
Thank you for your time! My apologies.
--
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22967
___
Zachary Ware added the comment:
No problem, glad it was an easy one :)
--
stage: - resolved
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22967
___
New submission from Greg Turner:
Kinda trivial but...
Something like the enclosed, untested patch would seem to make new_class work a
bit more like type_new.
To be explicit, the difference is whether or not to respect virtual subclasses.
So, for example, as implemented, we can implement
Zachary Ware added the comment:
I'd prefer to just reimplement itemgetter and attrgetter to make them picklable
rather than adding pickling methods to them; see attached patch.
I also posted a few comments, but I just went ahead and addressed them myself
in this patch. I'm not qualified to
Changes by Zachary Ware zachary.w...@gmail.com:
Removed file: http://bugs.python.org/file37319/issue22955.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22955
___
Changes by Zachary Ware zachary.w...@gmail.com:
Added file: http://bugs.python.org/file37320/issue22955.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22955
___
Serhiy Storchaka added the comment:
operator.methodcaller is similar to functools.partial which is pickleable and
can be used as a sample.
In C implementation some code can be shared between __repr__ and __reduce__
methods.
As for tests, different protocols should be tested. Also should be
paul j3 added the comment:
Related issues are:
http://bugs.python.org/issue13824 - argparse.FileType opens a file and never
closes it
http://bugs.python.org/issue14156 - argparse.FileType for '-' doesn't work for
a mode of 'rb'
As discussed earlier FileType was meant as a convenience for
Steve Dower added the comment:
AFAICT, cabinet.lib has been around since at least VS 2008, so 3.4 will be
fine. But since it builds currently there's no point changing it. I'll just let
my changes handle it for 3.5 and leave the older versions alone.
--
Steve Dower added the comment:
That patch looks good to me (better than my fix would have been :) )
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22676
___
paul j3 added the comment:
This an issue for parse_args as well. parse_args just calls parse_known_args,
and raises an error if extras is not empty.
Early on in parsing, it tries to classify argument strings as either optionals
(--flags) or positionals (arguments). And there's an explicit
Steve Dower added the comment:
After a debug build with VS2015, my biggest concern is this:
..\PC\bdist_wininst\install.rc(19): fatal error RC1015: cannot open
include file 'afxres.h'. [P:\ath\to\cpython\PCbuild\bdist_wininst.vcxproj]
I thought I had a workaround for this, but I'll have
paul j3 added the comment:
Duplicate of
http://bugs.python.org/issue22433
--
resolution: - duplicate
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22909
___
Alex Gaynor added the comment:
Attached is a patch for 2.7
--
keywords: +patch
Added file: http://bugs.python.org/file37321/issue22960.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22960
Changes by Berker Peksag berker.pek...@gmail.com:
--
stage: - resolved
status: open - closed
superseder: - Argparse considers unknown optional arguments with spaces as a
known positional argument
___
Python tracker rep...@bugs.python.org
Travis Thieman added the comment:
Thank you all for the helpful comments. A revised attempt is attached as
-2.patch, with improved behavior around using cwd if the child is never called
and orig_executable if it is. I opted not to fix the issue with the redundancy
in the error message as I
Benjamin Peterson added the comment:
I suppose I should ask you to write a test. Of course, HTTPS doesn't seem to be
tested at all right now (see the attractive FIXME: mostly untested comment in
SafeTransport.) Maybe, it's easier now, though, using the code in
Lib/test/ssl_servers.py?
Roundup Robot added the comment:
New changeset 62bd574e95d5 by Benjamin Peterson in branch '2.7':
add context parameter to xmlrpclib.ServerProxy (#22960)
https://hg.python.org/cpython/rev/62bd574e95d5
--
nosy: +python-dev
___
Python tracker
Alex Gaynor added the comment:
Attached patch fixes it for Python3.
--
Added file: http://bugs.python.org/file37323/issue22960-3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22960
___
Roundup Robot added the comment:
New changeset 4b00430388ad by Benjamin Peterson in branch '3.4':
add context parameter to xmlrpclib.ServerProxy (#22960)
https://hg.python.org/cpython/rev/4b00430388ad
New changeset 2a126ce6f83e by Benjamin Peterson in branch 'default':
merge 3.4 (#22960)
Benjamin Peterson added the comment:
Why do you think it still verifies the hostname? It will certainly check if the
certificate has a valid trust chain, but it won't do matching on the hostname.
--
nosy: +benjamin.peterson
___
Python tracker
Changes by Benjamin Peterson benja...@python.org:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22960
___
42 matches
Mail list logo