[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-04-05 Thread R. David Murray
R. David Murray added the comment: Thanks, Martin and Demian. I tweaked the patch slightly before commit, so I've uploaded the diff. After thinking about it I decided that it does indeed make sense that the new exception subclass both ConnectionResetError and BadStatusLine, exactly because

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-05 Thread Cyd Haselton
Cyd Haselton added the comment: Latest error: gcc --sysroot=/usr/gcc-4.9.2/sysroot -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 05.04.2015 23:25, R. David Murray wrote: MAL: then what you are arguing for is that the SSL changes in 2.7.9 should not have happened. Which is an argument that Antoine and I at least are sympathetic to :) I think those changes were probably

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread R. David Murray
R. David Murray added the comment: Actually I was in favor of an environment variable (or something like that) from the start, because it could be set per-process (making it as close to per-application as we can get from upstream). But a global config file I think is a bad idea (at least in

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-04-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset eba80326ba53 by R David Murray in branch 'default': #3566: Clean up handling of remote server disconnects. https://hg.python.org/cpython/rev/eba80326ba53 -- nosy: +python-dev ___ Python tracker

Re: [issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread M.-A. Lemburg
On 05.04.2015 22:49, Donald Stufft wrote: Donald Stufft added the comment: I don't consider monkey patching a proper way to configure a Python installation. The point is that that TLS validation on/off isn't conceptually a Python level configuration option, that's going to be a per

ANN: polynice 0.7 - a nice(1) like utility for throttling processes

2015-04-05 Thread garabik-news-2005-05
polynice is a nice(1)-like command line utility for unix systems to throttle long running processes beyond what can be achieved by nice(1), by repeatedly suspending and resuming the process. It is written for python3, though there is some python2.7 compatibility. Author: Radovan Garabík URL:

Re: XML Parsing

2015-04-05 Thread Ben Finney
Sepideh Ghanavati sepideh...@gmail.com writes: I know basic of python and I have an xml file created from csv What XML schema defines the document's format? Without knowing the schema, parsing will be unreliable. What created the document? Why is it relevant that the document was “created

Re: Help with pipes, buffering and pseudoterminals

2015-04-05 Thread Cameron Simpson
On 05Apr2015 12:20, Daniel Ellis ellis...@gmail.com wrote: I have a small little tool I'd like to make. It essentially takes piped input, modifies the text in some way, and immediately prints the output. The problem I'm having is that any output I pipe to the program seems to be buffered,

Re: Is it possible to deliver different source distributions for different Python versions?

2015-04-05 Thread Steven D'Aprano
On Mon, 6 Apr 2015 06:38 am, Dave Hein wrote: I would like to distribute a python package with different code for Python 2.* than for Python 3.*. (Mostly this is because of different unicode string handling). There is nothing in to setuptools or PyPi that directly supports this scenario.

Re: Is it possible to deliver different source distributions for different Python versions?

2015-04-05 Thread Mark Lawrence
On 05/04/2015 21:38, Dave Hein wrote: I would like to distribute a python package with different code for Python 2.* than for Python 3.*. (Mostly this is because of different unicode string handling). There is nothing in to setuptools or PyPi that directly supports this scenario. But perhaps

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Donald Stufft
Donald Stufft added the comment: I don't consider monkey patching a proper way to configure a Python installation. The point is that that TLS validation on/off isn't conceptually a Python level configuration option, that's going to be a per application configuration option. The monkeypatching

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-05 Thread Cyd Haselton
Cyd Haselton added the comment: issue_20306.patch won't install; attempting to do so yields the following: patching file configure.ac Hunk 56 FAILED 4944/4944. AC_MSG_RESULT($ENSUREPIP) AC_SUBST(ENSUREPIP)

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread R. David Murray
R. David Murray added the comment: MAL: then what you are arguing for is that the SSL changes in 2.7.9 should not have happened. Which is an argument that Antoine and I at least are sympathetic to :) -- ___ Python tracker

Re: Help with pipes, buffering and pseudoterminals

2015-04-05 Thread Nobody
On Sun, 05 Apr 2015 12:20:48 -0700, Daniel Ellis wrote: This only seems to print from the parent process. I read that I need to do the os.read call for the fork to happen. I've also tried printing *after* the os.read call. The child process has its std{in,out,err} attached to the

[issue18553] os.isatty() is not Unix only

2015-04-05 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: needs patch - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18553 ___ ___

Re: XML Parsing

2015-04-05 Thread Stefan Behnel
Sepideh Ghanavati schrieb am 06.04.2015 um 04:26: I know basic of python and I have an xml file created from csv which has three attributes category, definition and definition description. I want to parse through xml file and identify actors, constraints, principal from the text. However, I am

Re: Is it possible to deliver different source distributions for different Python versions?

2015-04-05 Thread Stefan Behnel
Dave Hein schrieb am 05.04.2015 um 22:38: I would like to distribute a python package with different code for Python 2.* than for Python 3.*. (Mostly this is because of different unicode string handling). There is nothing in to setuptools or PyPi that directly supports this scenario. But

[issue23870] pprint collections classes

2015-04-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: This seems like a reasonable intermediate step. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23870 ___

[issue18704] IDLE: Integrate external code analysis tools

2015-04-05 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- superseder: - IDLE: Ability to run 3rd party code checkers ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18704 ___

XML Parsing

2015-04-05 Thread Sepideh Ghanavati
Hi, I know basic of python and I have an xml file created from csv which has three attributes category, definition and definition description. I want to parse through xml file and identify actors, constraints, principal from the text. However, I am not sure what is the best way to go. Any

Re: emacs for python web development

2015-04-05 Thread Sayth
Thanks, got the python bit down is just the Web for flask and django. Getting the templates and snippets to work in a good flow is where I am looking for advice. Cheers Sayth -- https://mail.python.org/mailman/listinfo/python-list

Re: [issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread M.-A. Lemburg
FWIW: I just ran into a situation where the new approach resulted in pip, setuptools and zc.buildout not working anymore. This was on an AIX system which did come with CA root certificates at all. Now, I knew how to fix this, but the solution was not an obvious one. I had to use truss to figure

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: This was on a system where Python 2.7.3 had been installed previously. After the upgrade to Python 2.7.9 nothing worked anymore. Who did the upgrade and with which binaries? If you're compiling Python from source, especially for an exotic system, well,

[issue23872] Typo in response in smtpd

2015-04-05 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23872 ___ ___

[issue23872] Typo in response in smtpd

2015-04-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc2c7aa2d7a6 by Benjamin Peterson in branch '3.4': fix extended command syntax (closes #23872) https://hg.python.org/cpython/rev/cc2c7aa2d7a6 New changeset 2c89c1c34e19 by Benjamin Peterson in branch 'default': merge 3.4 (#23872)

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Nick Coghlan
Nick Coghlan added the comment: PEP 476 *has* a mechanism in it that was supposed to deal with this problem, thus leaving *end users* in full control of the decision on when they upgrade their security infrastructure rather than having that decision arbitrarily imposed on them by a vendor or

[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: weakrefs are traditionally cleared by the cyclic GC before calling any __del__ method. This used to be mandatory to eschew situations where a weakref callback could see cleared objects, but produces the side effect that __del__ methods can see dead weakrefs.

[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Concretely, the possible workarounds are: - don't do anything complex in your __del__ - be prepared to deal with unexpected errors in your __del__ - starting from Python 3.4, don't define __del__ and use weakref.finalize() instead:

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-05 Thread Cyd Haselton
Cyd Haselton added the comment: Hey Ryan, Just now patching downloaded/unzipped tip and was wondering if there was an order in which patches should be applied. I ask because i'm getting the following when applying the android_segfault_fix.patch /bld/python/cpython-3.4/cpython-3.4/Python $

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-05 Thread Cyd Haselton
Cyd Haselton added the comment: UPDATE: I found the file in github, under master, in Python/. It's not in the 3.4 or origin/3.4 branches...aren't we working on those? Or does it not matter? -- ___ Python tracker rep...@bugs.python.org

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-05 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: I thought this was for the tip, i.e. the 3.5 dev...? But I created the patches in the order that I wrote the descriptions in the comment. So you might want to use that order. If that fails, I can figure out the revision I was at when I created the patches.

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

2015-04-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is reworked patch for the _codecs module. No optional groups are used, all parameters have sensible defaults. Default encoding is utf-8, default errors is strict or None (if function accepts None), default mapping is None. Unified names and coding

[issue23871] turning itertools.{repeat, count} into indexable iterables

2015-04-05 Thread Antti Haapala
Antti Haapala added the comment: well, they wouldn't and shouldn't behave like range. range is a sequence whereas count or repeat wouldn't necessarily be sequences. (they can be infinite and thus not having length). And the count shouldn't be *reiterable* because that is why it exists

[issue20159] Derby #7: Convert 51 sites to Argument Clinic across 3 files - Derby: Convert the ElementTree module to use Argument Clinic

2015-04-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch. Converted __init__ methods and removed explicit declarations of self parameters. SubElement and Element.__init__ still are not converted, as they need the support of **kwargs. -- Added file:

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, if a vendor wants vendor-specific behaviour, forking the standard library is a normal price to pay. (in this case, the diff wouldn't be large, and it's made against an extremely stable upstream branch) --

[issue23871] turning itertools.{repeat, count} into indexable iterables

2015-04-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23871 ___ ___ Python-bugs-list

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Donald Stufft
Donald Stufft added the comment: On it's own I think this switch is a bad idea because it's too big of a hammer. Someone shouldn't accidentally disable TLS verification in pip for instance because they wanted to disable TLS verification for some random tool that only hit internal TLS but

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Nick Coghlan
Nick Coghlan added the comment: The discussion isn't on python-ideas yet because I wanted to get a better sense of what might be politically feasible before putting this question to a broader audience. I agree it needs to move there eventually (likely during or after PyCon), and will almost

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Nick Coghlan
Nick Coghlan added the comment: As far as Alex's post goes, it's simply wrong, and I wish he had spoken to me about his frustrations with the significant challenges of infrastructure maintenance in large established organisations before posting it. Red Hat's been fighting the battle for

[issue23830] Add AF_IUCV support to sockets

2015-04-05 Thread Armin Rigo
Armin Rigo added the comment: The PyArg_ParseTuple() size arguments should be of type Py_ssize_t instead of int. -- nosy: +arigo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23830 ___

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 05/04/2015 12:25, Nick Coghlan a écrit : This does mean spending more time upfront coming up with a way of designing the feature that the core development community considers to be useful independently of backporting considerations (e.g. bringing the

[issue21114] wsgiref.simple_server doesn't handle multi-line headers correctly

2015-04-05 Thread Tom Tanner
Tom Tanner added the comment: Any chance to get this into 2.7.10? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21114 ___ ___ Python-bugs-list

[issue21718] sqlite3 cursor.description seems to rely on incomplete statement parsing for detection

2015-04-05 Thread Tom Tanner
Tom Tanner added the comment: Are you going to merge it into 2.7.10? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21718 ___ ___

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Donald Stufft
Donald Stufft added the comment: Now, I knew how to fix this, but the solution was not an obvious one. I had to use truss to figure out where OpenSSL was looking for certificates and the added the Mozilla cert bundle from our egenix-pyopenssl package to make things work again. You also

Re: Permission denied when opening a file that was created concurrently by os.rename (Windows)

2015-04-05 Thread Dave Angel
On 04/05/2015 01:45 PM, Alexey Izbyshev wrote: Hello! I've hit a strange problem that I reduced to the following test case: * Run several python processes in parallel that spin in the following loop: while True: if os.path.isfile(fname): with open(fname, 'rb') as f: f.read()

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-05 Thread Cyd Haselton
Cyd Haselton added the comment: From previous post: ** How does this sound? * I'll clone the fork of the 3.4 branch I made in github, build and patch. * Ryan will (as best as he can) grab said patches, regenerate them for the bug tracker or forward port them to 3.5 (in

Permission denied when opening a file that was created concurrently by os.rename (Windows)

2015-04-05 Thread Alexey Izbyshev
Hello! I've hit a strange problem that I reduced to the following test case: * Run several python processes in parallel that spin in the following loop: while True: if os.path.isfile(fname): with open(fname, 'rb') as f: f.read() break * Then, run another process that creates a

Re: Permission denied when opening a file that was created concurrently by os.rename (Windows)

2015-04-05 Thread Chris Angelico
On Mon, Apr 6, 2015 at 3:45 AM, Alexey Izbyshev izbys...@ispras.ru wrote: The test case is attached, the main file is test.bat. Python is expected to be in PATH. Stderr of readers is redirected to *.log. You may need to run several times to hit the issue. You have an interesting-looking

[issue19511] lib2to3 Grammar file is no longer a Python 3 superset

2015-04-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: This was fixed in 3.4.1: https://hg.python.org/cpython/log/094615256a54/Lib/lib2to3/Grammar.txt i'm leaving this open to update the devguide. -- ___ Python tracker rep...@bugs.python.org

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 05.04.2015 18:28, Donald Stufft wrote: Donald Stufft added the comment: Now, I knew how to fix this, but the solution was not an obvious one. I had to use truss to figure out where OpenSSL was looking for certificates and the added the Mozilla

Help with pipes, buffering and pseudoterminals

2015-04-05 Thread Daniel Ellis
I have a small little tool I'd like to make. It essentially takes piped input, modifies the text in some way, and immediately prints the output. The problem I'm having is that any output I pipe to the program seems to be buffered, removing the desired effect. From what I understand, I need

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 05/04/2015 21:26, Marc-Andre Lemburg a écrit : But this is only an example of an application not working anymore because the system's OpenSSL could not verify certificates. In this case, no root CA certs were available. On older systems with proper root

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 05.04.2015 21:36, Antoine Pitrou wrote: And you want the python-dev community to care for that broken situation by bearing the cost of additional maintenance and security risk in implementing the new configuration options? No, I want to be able to

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Donald Stufft
Donald Stufft added the comment: No, I want to be able to easily disable the newly added checks in 2.7.9+ to get systems such as these behave the same as with 2.7.8, since without this option, people using these system are going to be forced to stick with buggy 2.7.8 systems. Why is the

[issue23871] turning itertools.{repeat, count} into indexable iterables

2015-04-05 Thread R. David Murray
R. David Murray added the comment: I agree with Antti. If Raymond disagrees he can reopen :) (There is a reason it is called *iter*tools. As Antti says, range is documented as being a *sequence* type.) -- nosy: +r.david.murray resolution: - rejected stage: - resolved status: open

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 05.04.2015 21:48, Donald Stufft wrote: Donald Stufft added the comment: No, I want to be able to easily disable the newly added checks in 2.7.9+ to get systems such as these behave the same as with 2.7.8, since without this option, people using

Re: Permission denied when opening a file that was created concurrently by os.rename (Windows)

2015-04-05 Thread Terry Reedy
On 4/5/2015 1:45 PM, Alexey Izbyshev wrote: Hello! I've hit a strange problem that I reduced to the following test case: * Run several python processes in parallel that spin in the following loop: while True: if os.path.isfile(fname): with open(fname, 'rb') as f: f.read()

[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread R. David Murray
R. David Murray added the comment: Really these arguments make it sound like 2.7.9 never should have happened. Given that it did, Nick has not addressed the question of why the vendors maintaining this simple patch (given that it addresses what he sees as their need) is not a viable option.

[issue21718] sqlite3 cursor.description seems to rely on incomplete statement parsing for detection

2015-04-05 Thread R. David Murray
R. David Murray added the comment: It looks to me like a patch that could be merged as a bug fix. -- stage: - commit review versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21718

Is it possible to deliver different source distributions for different Python versions?

2015-04-05 Thread Dave Hein
I would like to distribute a python package with different code for Python 2.* than for Python 3.*. (Mostly this is because of different unicode string handling). There is nothing in to setuptools or PyPi that directly supports this scenario. But perhaps there could be some script run at install