Re: Sharing: File Reader Generator with w/o Policy

2014-03-16 Thread Mark H Harris
On 3/16/14 12:41 AM, Chris Angelico wrote: Good stuff Chris, and thanks for the footnotes, I appreciate it. If getline() is doing nothing that the primitive doesn't, and getnumline is just enumerate, then they're not achieving anything beyond shielding you from the primitives. Yes.

Re: Sharing: File Reader Generator with w/o Policy

2014-03-16 Thread Chris Angelico
On Sun, Mar 16, 2014 at 5:19 PM, Mark H Harris harrismh...@gmail.com wrote: On 3/16/14 12:41 AM, Chris Angelico wrote: To be quite frank, yes I do think it's a nutty idea. Like most nutty things, there's a kernel of something good in it, but that's not enough to build a system on :)

Re: Clearing out handlers in logging?

2014-03-16 Thread Gunther Dietrich
Tim Chase python.l...@tim.thechases.com wrote: The current (2.7; maybe 3.x?) logging module doesn't have any sort of clear out all the current handlers method. Indeed, THERE IS a removeHandler() method. In the documentation of python 2.6, it is mentioned in '16.6.5. Logger Objects', directly

Re: Clearing out handlers in logging?

2014-03-16 Thread Chris Angelico
On Sun, Mar 16, 2014 at 7:39 PM, Gunther Dietrich gd.use...@spamfence.net wrote: but it feels a little dirty to reach into logging.root.handlers since there are other methods for adding/removing handlers. However, as best I can tell, to remove a handler, you already need to have it saved

Re: Clearing out handlers in logging?

2014-03-16 Thread Peter Otten
Gunther Dietrich wrote: Tim Chase python.l...@tim.thechases.com wrote: The current (2.7; maybe 3.x?) logging module doesn't have any sort of clear out all the current handlers method. Indeed, THERE IS a removeHandler() method. In the documentation of python 2.6, it is mentioned in '16.6.5.

Re: Clearing out handlers in logging?

2014-03-16 Thread Chris Angelico
On Sun, Mar 16, 2014 at 8:18 PM, Peter Otten __pete...@web.de wrote: Hm, what do the docs say about this one? import logging logging.basicConfig() log = logging.getLogger(foo) for i in range(5): ... log.addHandler(logging.FileHandler(tmp.log)) ... assert len(log.handlers) == 5 for

Re: test

2014-03-16 Thread Chris “Kwpolska” Warrick
On Sun, Mar 16, 2014 at 4:41 AM, Mark H Harris harrismh...@gmail.com wrote: I have been having a fit with gg, and its taken just a little time to get a real news-reader client for posting. What a fit. Google does really well with some things, but gg is not one of them, IMHO. Why not use the

Re: Sharing: File Reader Generator with w/o Policy

2014-03-16 Thread Steven D'Aprano
On Sat, 15 Mar 2014 23:47:30 -0500, Mark H Harris wrote: The other thing I'm tempted to do is to find names (even new names) that read like English closely (whatever I mean by that) so that there is no question about what is going on to a non expert. for line in getnumline(file):

Re: Clearing out handlers in logging?

2014-03-16 Thread Tim Chase
On 2014-03-16 09:39, Gunther Dietrich wrote: Tim Chase python.l...@tim.thechases.com wrote: The current (2.7; maybe 3.x?) logging module doesn't have any sort of clear out all the current handlers method. Indeed, THERE IS a removeHandler() method. Yes, I'm aware of it, having read the

Thread is somehow interfering with a while loop called after the thread is started

2014-03-16 Thread Dan McInerney
Coming back to this a long time later. I figured it out a little bit after I posted this. I wasn't aware that q.try_run() within the nfqueue module was a blocking call https://www.wzdftpd.net/redmine/projects/nfqueue-bindings/wiki/Examples. I'm not sure I was even aware of what it meant to be

Installing addition libraries in Portable Python 2.7 on Windows

2014-03-16 Thread laguna-mc
I am new in Python, I have Portable Python 2.7.5.1 installed on Windows 7. I want to install additional libraries: python-magic libmagic libfuzzy pyqtgraph I downloaded package, saved on hard drive, unzipped, find setup.py and tried install via Command Prompt: Python-Portable.exe setup.py

Re: Installing addition libraries in Portable Python 2.7 on Windows

2014-03-16 Thread Mark Lawrence
On 16/03/2014 13:50, laguna...@mail.com wrote: I am new in Python, I have Portable Python 2.7.5.1 installed on Windows 7. I want to install additional libraries: python-magic libmagic libfuzzy pyqtgraph I downloaded package, saved on hard drive, unzipped, find setup.py and tried install via

Re: Clearing out handlers in logging?

2014-03-16 Thread Gunther Dietrich
Tim Chase python.l...@tim.thechases.com wrote: The current (2.7; maybe 3.x?) logging module doesn't have any sort of clear out all the current handlers method. Indeed, THERE IS a removeHandler() method. Yes, I'm aware of it, having read the source docs. However, the signature is Sorry,

Re: Clearing out handlers in logging?

2014-03-16 Thread Tim Chase
On 2014-03-16 19:29, Gunther Dietrich wrote: Indeed, THERE IS a removeHandler() method. Yes, I'm aware of it, having read the source docs. However, the signature is Sorry, your original article lacks information about what you already know/tried and what not. So it is a bit

Re: Installing addition libraries in Portable Python 2.7 on Windows

2014-03-16 Thread laguna-mc
It'slike a chain, eachnew modulepulls afew othermodules.I can postpone get-pip.py onthe very last stage, now I want to install python-magic, libmagic, libfuzzy, pyqtgraph. How to do this? - Original Message - From: Mark Lawrence Sent: 03/16/14 05:06 PM To: python-list@python.org

Error when installing matplotlib-1.3. on Windows

2014-03-16 Thread laguna-mc
I'm trying to install matplotlib from locally stored source archive file (Portable Python 2.7 on Windows): pip install E:\matplotlib-1.3.1.win32-py2.7.exe Got error, below is log: E:\Portable Python 2.7.5.1\App\Scripts\pip run on 03/17/14 03:10:16 Exception: Traceback (most recent call last):

Re: Error when installing matplotlib-1.3. on Windows

2014-03-16 Thread MRAB
On 2014-03-17 01:20, laguna...@mail.com wrote: I'm trying to install matplotlib from locally stored source archive file (Portable Python 2.7 on Windows): pip install E:\matplotlib-1.3.1.win32-py2.7.exe Got error, below is log: E:\Portable Python 2.7.5.1\App\Scripts\pip run on 03/17/14

File build\bdist.win32\egg\redis\client.py, line 705, in get

2014-03-16 Thread jobmattcon
in win32 with redis-py and redis for window Traceback (most recent call last): File testredis.py, line 21, in module matrixlist = r_server.get(matrix1) File build\bdist.win32\egg\redis\client.py, line 705, in get File build\bdist.win32\egg\redis\client.py, line 461, in execute_command

pkg_resources.DistributionNotFound: hiredis

2014-03-16 Thread jobmattcon
http://heynemann.github.io/r3/ C:\heynemann-r3-cc6b4eb\build\lib\r3\appr3-app --red is-port=6379 --redis-pass=r3 -c config.py Traceback (most recent call last): File C:\Python27\Scripts\r3-app-script.py, line 5, in module from pkg_resources import load_entry_point File

Re: pkg_resources.DistributionNotFound: hiredis

2014-03-16 Thread Ben Finney
jobmatt...@gmail.com writes: [a dump of text terminal output] Did you have something to say about this? Perhaps a question, with details of what you're expecting and what happened instead? -- \ “Men never do evil so completely and cheerfully as when they do | `\it from

Re: pkg_resources.DistributionNotFound: hiredis

2014-03-16 Thread jobmattcon
first time run command to start r3, it has already got error r3-app --redis-port=6379 --redis-pass=r3 -c config.py On Monday, March 17, 2014 1:09:32 PM UTC+8, Ben Finney wrote: writes: [a dump of text terminal output] Did you have something to say about this? Perhaps a question,

[issue20884] importlib/__init__.py can not be loaded without __file__ - breaks cxFreeze

2014-03-16 Thread Nick Coghlan
Nick Coghlan added the comment: Issue 20942 now covers the spurious value in _frozen_importlib.__file__, leaving this free to cover the fact that importlib/__init__.py doesn't support freezing in 3.4.0. -- priority: deferred blocker - normal ___

[issue20098] email policy needs a mangle_from setting

2014-03-16 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___

[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2014-03-16 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: test needed - patch review versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4142 ___

[issue20943] configparser - add 'getDict' function

2014-03-16 Thread Michael Müller
New submission from Michael Müller: It would be nice to have a 'getDict' function in the configparser lib. Adding that function would be simply def getDict(self, *args): return dict([entry for entry in self.items(*args)]) inside the RawConfigParser class next to the other get*

[issue20941] pytime.c:184 and pytime.c:218: runtime error, outside the range of representable values of type 'long'

2014-03-16 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20941 ___ ___ Python-bugs-list mailing

[issue20827] IDLE : Display function argument list in ClassBrowser

2014-03-16 Thread Saimadhav Heblikar
Saimadhav Heblikar added the comment: I have added a improved patch. What this patch does: 1. resolves issue 1 of msg213193 - uses inspect. signature() instead of inspect.getargspec. 2. resolves issue 2 of msg213193 - the module is imported only once per ClassBrowser instance. 3. resolves

[issue20943] configparser - add 'getDict' function

2014-03-16 Thread R. David Murray
R. David Murray added the comment: How is this different from myconfig['section']? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20943 ___

[issue17846] Building Python on Windows - Supplementary info

2014-03-16 Thread Kathleen Weaver
Kathleen Weaver added the comment: Why are you suggesting the use of Subversion? Why not stick with Mercurial? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17846 ___

[issue17846] Building Python on Windows - Supplementary info

2014-03-16 Thread R. David Murray
R. David Murray added the comment: Because some of the third party components for the windows built are still in a subversion repository. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17846

[issue20940] Test 239: buffer overflow in sock_recvmsg_guts

2014-03-16 Thread Charles-François Natali
Charles-François Natali added the comment: It might be a different test triggering the buffer overflow, but the underlying cause is the same as #20937. -- nosy: +neologix resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - test_socket: buffer

[issue16123] IDLE - deprecate running without a subprocess

2014-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Every enhancement issue can be bumped to 3.5. -- versions: -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16123 ___

[issue20944] Engineering Process Improvements

2014-03-16 Thread Jeffrey Walton
New submission from Jeffrey Walton: Python's code is crisp and sharp. From a software design perspective, I don't see a lot of room for improvement. However, looking at some of the issues flagged by Clang sanitizers and existing bug reports, I think the project has a couple of small

[issue1621] Do not assume signed integer overflow behavior

2014-03-16 Thread Jeffrey Walton
Jeffrey Walton added the comment: Also see http://bugs.python.org/issue20944 for suggestions to identify the offending code. -- nosy: +Jeffrey.Walton ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1621

[issue20945] why save the item to be replaced as olditem in PyTuple_SetItem? It's not useful at all.

2014-03-16 Thread coder.maliubiao
New submission from coder.maliubiao: code: int PyTuple_SetItem(register PyObject *op, register Py_ssize_t i, PyObject *newitem) { register PyObject *olditem; register PyObject **p; if (!PyTuple_Check(op) || op-ob_refcnt != 1) { Py_XDECREF(newitem);

[issue20906] Issues in Unicode HOWTO

2014-03-16 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20906 ___ ___

[issue20945] why save the item to be replaced as olditem in PyTuple_SetItem? It's not useful at all.

2014-03-16 Thread coder.maliubiao
Changes by coder.maliubiao maliub...@gmail.com: -- type: - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20945 ___ ___

[issue20944] Engineering Process Improvements

2014-03-16 Thread R. David Murray
R. David Murray added the comment: We already have Coverty scan in place, and were in fact featured by them for our code quality. Currently Christian Heimes is the lead on that effort, and is monitoring the Coverty reports. We've been working on Clang stuff as developers have had interest,

[issue20944] Engineering Process Improvements

2014-03-16 Thread R. David Murray
R. David Murray added the comment: Oh, and if you there there are general issues to be discussed about approach (and I think out use of asserts might be one such), then the appropriate forum is the python-dev mailing list. -- ___ Python tracker

[issue20944] Engineering Process Improvements

2014-03-16 Thread R. David Murray
R. David Murray added the comment: Oh, and if you think there there are general issues to be discussed about approach (and I think our use of asserts might be one such), then the appropriate forum is the python-dev mailing list. -- ___ Python

[issue20944] Engineering Process Improvements

2014-03-16 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- Removed message: http://bugs.python.org/msg213732 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20944 ___

[issue20944] Engineering Process Improvements

2014-03-16 Thread Jeffrey Walton
Jeffrey Walton added the comment: On Sun, Mar 16, 2014 at 11:12 AM, R. David Murray rep...@bugs.python.org wrote: R. David Murray added the comment: We already have Coverty scan in place, and were in fact featured by them for our code quality. Currently Christian Heimes is the lead on that

[issue20946] ctypes test fixes

2014-03-16 Thread Andreas Schwab
New submission from Andreas Schwab: The attached patch fixes some wrong alignment assumptions in the ctype tests. It has been tested on {ppc,ppc64,ppc64le,i586,x86_64,armv6hl,aarch64,m68k}-suse-linux. -- components: Tests files: ctypes-align.patch keywords: patch messages: 213735

[issue20946] ctypes test fixes

2014-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2150053d77ca by Benjamin Peterson in branch '3.3': fix ctypes test alignment assumptions (closes #20946) http://hg.python.org/cpython/rev/2150053d77ca New changeset e5a09b09bb51 by Benjamin Peterson in branch '2.7': fix ctypes test alignment

[issue20942] _frozen_importlib should not have a __file__ attribute

2014-03-16 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20942 ___

[issue20884] importlib/__init__.py can not be loaded without __file__ - breaks cxFreeze

2014-03-16 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20884 ___

[issue18478] Class bodies: when does a name become local?

2014-03-16 Thread Nitika Agarwal
Nitika Agarwal added the comment: Hi, Please review my patch attached. -- keywords: +patch Added file: http://bugs.python.org/file34441/issue18478.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18478

[issue4744] asynchat documentation needs to be more precise

2014-03-16 Thread Nitika Agarwal
Nitika Agarwal added the comment: Hi, Please review my patch attached.Any comments and feedback are welcome. -- keywords: +patch Added file: http://bugs.python.org/file34442/issue4744_2.patch ___ Python tracker rep...@bugs.python.org

[issue20945] why save the item to be replaced as olditem in PyTuple_SetItem? It's not useful at all.

2014-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: olditem is not useful It is. Py_XDECREF() may have massive side effects (such as calling a __del__ method and executing arbitrary code). Therefore, you have to ensure that the tuple item is set to the new value *before* the old value is DECREF'ed.

[issue18854] is_multipart and walk should document their treatment of 'message' parts.

2014-03-16 Thread Nitika Agarwal
Nitika Agarwal added the comment: Hi David, I didn't exactly get the issue.Will you please help me with what is to be updated. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18854 ___

[issue20906] Issues in Unicode HOWTO

2014-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Do you want to provide a patch? In a narrative such as the current article, a code point value is usually written in hexadecimal. I find use of the word narrative intimidating in the context of a technical documentation. In general, I find it

[issue20947] -Wstrict-overflow findings

2014-03-16 Thread Jeffrey Walton
New submission from Jeffrey Walton: $ hg id 3736bf94535c+ tip Forgive me if you were aware of these. /usr/bin/gcc -pthread -fPIC -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fno-common -Wstrict-overflow -Wformat=2

[issue20948] -Wformat=2 -Wformat-security findings

2014-03-16 Thread Jeffrey Walton
New submission from Jeffrey Walton: $ hg id 3736bf94535c+ tip -Wformat=2 -Wformat-security are useful for detecting possible security related bugs. Compiling with the two options produced a few hits in the source code. /usr/bin/gcc -pthread -c -Wno-unused-result

[issue20948] -Wformat=2 -Wformat-security findings

2014-03-16 Thread Jeffrey Walton
Jeffrey Walton added the comment: If interested, I think the warnings can be selectively turned off: #if defined (__GNUC__) ((__GNUC__ == 4 __GNUC_MINOR__ = 6) || (__GNUC__ = 5)) # pragma GCC diagnostic push # pragma GCC diagnostic ignored -Wformat-security #endif

[issue20948] -Wformat=2 -Wformat-security findings

2014-03-16 Thread Jeffrey Walton
Jeffrey Walton added the comment: #if defined (__GNUC__) ((__GNUC__ == 4 __GNUC_MINOR__ = 6) || (__GNUC__ = 5)) # pragma GCC diagnostic push # pragma GCC diagnostic ignored -Wformat-security #endif My bad... -Wformat-nonliteral -- ___ Python

[issue17442] code.InteractiveInterpreter doesn't display the exception cause

2014-03-16 Thread Claudiu.Popa
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file34443/issue17442_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17442 ___

[issue17383] Possibly ambiguous phrasing in tutorial/modules#more-on-modules

2014-03-16 Thread Nitika Agarwal
Nitika Agarwal added the comment: Hi, I would like to propose a patch for this issue. -- nosy: +nitika ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17383 ___

[issue18854] is_multipart and walk should document their treatment of 'message' parts.

2014-03-16 Thread R. David Murray
R. David Murray added the comment: Well, probably the best thing to do to understand the issue is to look at the implementation of Message.walk and is_multipart, and to notice that is_multipart() can return a different answer than msg.get_content_maintype() == 'multipart' if the Message

[issue1738] filecmp.dircmp does exact match only

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: I don't think that we can just introduce path normalization in phase0. Even though I agree that this would be the proper way to do it when reimplementing from scratch, it breaks backward compatibility. There also is a small mistake in that the *match*

[issue1738] Add match parameter to filecmp.dircmp to ignore name patterns

2014-03-16 Thread Nikolaus Rath
Changes by Nikolaus Rath nikol...@rath.org: -- title: filecmp.dircmp does exact match only - Add match parameter to filecmp.dircmp to ignore name patterns versions: +Python 3.5 -Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue1738] Add match parameter to filecmp.dircmp to ignore using patterns

2014-03-16 Thread Nikolaus Rath
Changes by Nikolaus Rath nikol...@rath.org: -- title: Add match parameter to filecmp.dircmp to ignore name patterns - Add match parameter to filecmp.dircmp to ignore using patterns ___ Python tracker rep...@bugs.python.org

[issue20949] Missing platform security integrations

2014-03-16 Thread Jeffrey Walton
New submission from Jeffrey Walton: $ hg id 3736bf94535c+ tip A standard Python build does not take a proactive approach to integrating with platform security measures. Attepting to add the measures results in a failed build. For example: export CC=/usr/bin/gcc export CXX=/usr/bin/g++

[issue15582] Enhance inspect.getdoc to follow inheritance chains

2014-03-16 Thread Claudiu.Popa
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file34445/issue15582.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15582 ___

[issue17383] Possibly ambiguous phrasing in tutorial/modules#more-on-modules

2014-03-16 Thread Nitika Agarwal
Nitika Agarwal added the comment: Hello everyone, I have tried creating a patch for the issue, Please review the attached patch. -- keywords: +patch Added file: http://bugs.python.org/file34446/issue17383.patch ___ Python tracker

[issue20949] Missing platform security integrations

2014-03-16 Thread Jeffrey Walton
Jeffrey Walton added the comment: $ checksec.sh --file ./python RELRO STACK CANARY NXPIE RPATH RUNPATH FILE Full RELRO Canary found NX enabledPIE enabled No RPATH No RUNPATH ./python Here's what a standard Python

[issue20887] stdlib compatibility with pypy, test_zipfile.py

2014-03-16 Thread mattip
mattip added the comment: The test_zipfile in Python 3 is very different from this one, so I would prefer that it be two seperate issues. After your review of the patch, are there remaining issues that need to be cleared up? -- ___ Python tracker

[issue20950] asyncio.docs : asyncio.subprocess.Process.wait() method typo

2014-03-16 Thread Alexandre JABORSKA
New submission from Alexandre JABORSKA: The asyncio.subprocess.Process.wait() documentation mention self parameter (typo ?) and don't tell it's a coroutine. -- assignee: docs@python components: Documentation messages: 213753 nosy: ajaborsk, docs@python priority: normal severity: normal

[issue19840] The is no way to tell shutil.move to ignore metadata

2014-03-16 Thread Claudiu.Popa
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file34447/issue19840.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19840 ___

[issue20950] asyncio.docs : asyncio.subprocess.Process.wait() method typo

2014-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1009cf8cb304 by Victor Stinner in branch 'default': Issue #20950: Fix typo asyncio doc, wait() has no self parameter http://hg.python.org/cpython/rev/1009cf8cb304 -- nosy: +python-dev ___ Python tracker

[issue20950] asyncio.docs : asyncio.subprocess.Process.wait() method typo

2014-03-16 Thread STINNER Victor
STINNER Victor added the comment: Thanks, it has been fixed (in 12 minutes ;-)). I also mentionned that communicate() and wait() are coroutines. -- nosy: +haypo resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue20941] pytime.c:184 and pytime.c:218: runtime error, outside the range of representable values of type 'long'

2014-03-16 Thread STINNER Victor
STINNER Victor added the comment: Hi, pytime.c:184: runtime error: value -1e+200 is outside the range of representable values of type 'long' How did you get this warning? Shouldn't a range test based on TIME_T_MAX with an epsilon occur first? Two lines after, the integer overflow is

[issue18747] Re-seed OpenSSL's PRNG after fork

2014-03-16 Thread Jeffrey Walton
Jeffrey Walton added the comment: It probably is an OpenSSL bug but the declaration doesn't help us. It's not the first time Python has to work around OpenSSL, e.g. #18709. Sorry to dig up an old issue. But here's some reading on it if interested. Ben Laurire pushed a patch to mix in PID and

[issue20945] why save the item to be replaced as olditem in PyTuple_SetItem? It's not useful at all.

2014-03-16 Thread Benjamin Peterson
Changes by Benjamin Peterson bp+pyb...@benjamin-peterson.org: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20945 ___

[issue11448] docs for HTTPConnection.set_tunnel are ambiguous

2014-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 68a257ca6be6 by Benjamin Peterson in branch '3.3': improve set_tunnel docs (closes #11448) http://hg.python.org/cpython/rev/68a257ca6be6 New changeset 5cab0ada97b2 by Benjamin Peterson in branch 'default': merge 3.3 (#11448)

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
New submission from Nikolaus Rath: When using non-blocking operation, the SSLSocket.send method returns 0 if no data can be sent at this point. This is counterintuitive, because in the same situation (write to non-blocking socket that isn't ready for IO): * A regular (non-SSL) socket raises

[issue20941] pytime.c:184 and pytime.c:218: runtime error, outside the range of representable values of type 'long'

2014-03-16 Thread Gareth Rees
Gareth Rees added the comment: How did you get this warning? This looks like runtime output from a program built using Clang/LLVM with -fsanitize=undefined. See here: http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation Signed integer overflow is undefined behaviour, so

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: This is actually seems to be not just an inconvience, but a real bug: since SSLSocket.sendall() uses SSLSocket.send() internally, the former method will busy-loop when called on a non-blocking socket. Note also that the .sendto and .write methods already

[issue16245] Update html.entities.html5 dictionary and parseentities.py

2014-03-16 Thread Éric Araujo
Éric Araujo added the comment: I just ran the script: $ Tools/scripts/parse_html5_entities.py The current dictionary is updated. This is done :‑) -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue16245] Update html.entities.html5 dictionary and parseentities.py

2014-03-16 Thread Éric Araujo
Éric Araujo added the comment: BTW this message does not mean that the dictionary was just updated, but that is was already up to date. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16245

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread R. David Murray
R. David Murray added the comment: A little hg sleuthing (which I assume you did but I'll record for the record) reveals that this was introduced by Bill Jansen in changeset 8a281bfc058d. Following the bugs mentioned in the checkin message, it looks like it *might* have been related to issue

[issue18624] Add alias for iso-8859-8-i which is the same as iso-8859-8

2014-03-16 Thread Kamilla
Kamilla added the comment: Adding aliases to the set of iso-8859-8. -- keywords: +patch Added file: http://bugs.python.org/file34449/adding_aliases.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18624

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's probably too late to change this, unfortunately. There are non-blocking frameworks and libraries out there relying on the current behaviour. As for sendall(), it doesn't really make sense on a non-blocking socket anyway. --

[issue17383] Possibly ambiguous phrasing in tutorial/modules#more-on-modules

2014-03-16 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the patch. +Enhancing the More on Modules documentation + This should not be in the patch. -Modules can import other modules. It is customary but not required -to place all import

[issue20112] The documentation for http.server error_message_format is inadequate.

2014-03-16 Thread R. David Murray
R. David Murray added the comment: My intent here was that the rewrite should specify where the data that gets placed into the template when it is used comes from. That would be 'responses' by default, but can be overridden in 'send_error'. -- ___

[issue20952] OpenSSL and RDRAND

2014-03-16 Thread Jeffrey Walton
New submission from Jeffrey Walton: Some versions of OpenSSL use the RDRAND engine by default. The versions include openssl-1.0.1-beta1 through openssl-1.0.1f. RDRAND has taken some criticism because its essentially unaudited and it could be spiked like the Dual-EC generator

[issue20112] The documentation for http.server error_message_format is inadequate.

2014-03-16 Thread R. David Murray
R. David Murray added the comment: Hmm. Rereading your patch I see that that is what you are trying to do, but I find the order of presentation confusing. I would rather see the text focus on the fact that the string is used by send_error, and that the variables are filled by default from

[issue20898] Missing 507 response description

2014-03-16 Thread R. David Murray
R. David Murray added the comment: Thanks. That patch looks good except that it is missing the corresponding documentation changes, but... I just noticed that this table is a partial duplicate of the table in http.server. I suspect this has historical origins, but I don't see any reason to

[issue18624] Add alias for iso-8859-8-i which is the same as iso-8859-8

2014-03-16 Thread R. David Murray
R. David Murray added the comment: From python's point of view they are both aliases of iso-8859_8, as discussed in this issue. Python does not have iso-8859_8-e and i codecs, which you changes to the alias table implies that it does (the target of the entry in the aliases table is the

[issue20896] test_ssl.test_get_server_certificate() should use PROTOCOL_SSLv23, not PROTOCOL_SSLv3

2014-03-16 Thread Curtis Doty
Changes by Curtis Doty cur...@greenkey.net: -- nosy: +GreenKey ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20896 ___ ___ Python-bugs-list

[issue18624] Add alias for iso-8859-8-i which is the same as iso-8859-8

2014-03-16 Thread R. David Murray
R. David Murray added the comment: The tests are in test_encodings.py. It is interesting that the tests pass with your patch applied; that indicates that there is a missing test, since we should be testing that all of the values in the aliases table are the names of existing codecs, and

[issue20939] test_geturl of test_urllibnet fails with 'https://www.python.org/' != 'http://www.python.org/'

2014-03-16 Thread Curtis Doty
Changes by Curtis Doty cur...@greenkey.net: -- nosy: +GreenKey ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20939 ___ ___ Python-bugs-list

[issue20952] OpenSSL and RDRAND

2014-03-16 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +christian.heimes, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20952 ___ ___

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: Antoine, do you know that there are frameworks out there using this, or is that a guess? asyncio, for example, seems to expect an SSLWantWrite exception as well. (it also works with a zero return, but it's not clear from the code if that's by design or by a

[issue20952] OpenSSL and RDRAND

2014-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Apart from our Windows binaries, this doesn't seem much of a Python issue. Python normally links with whatever the system OpenSSL is. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Antoine, do you know that there are frameworks out there using this, or is that a guess? It's just a guess. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20951

[issue20896] test_ssl.test_get_server_certificate() should use PROTOCOL_SSLv23, not PROTOCOL_SSLv3

2014-03-16 Thread STINNER Victor
STINNER Victor added the comment: Benjamin: Could you please mention your change in Misc/NEWS? Is it ok to change that in Python 3.1 3.2? Should the change be mentionned in the doc (:versionchanged:)? -- resolution: fixed - status: closed - open

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: Twisted does not seem to rely on it either (there's no mention of SSLWant* in the source at all, and without that, you can't possibly have support for non-blocking ssl sockets). -- ___ Python tracker

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: gevent is calling _sslobject.write() directly, so it would not be affected by any change. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20951 ___

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-16 Thread Nikolaus Rath
Nikolaus Rath added the comment: Tornado uses SSLSocket.send(), and it looks as if a SSLWantWrite exception is not caught but would propagate, so this would probably break. -- ___ Python tracker rep...@bugs.python.org

[issue20898] Missing 507 response description

2014-03-16 Thread Filip Malczak
Filip Malczak added the comment: If we're getting out of original scope, then I wonder... Maybe we should keep only standard status codes here? If not, which should we support, and which not? What about custom Spring 420 Method Failure? One way to clean up mess here is to create some

  1   2   >