shared libraries symbols visibility

2013-10-30 Thread David Froger
Hi list, Python documentation on Extending Python with C or C++ says [1]: When modules are used as shared libraries, however, the symbols defined in one module may not be visible to another module. Suppose I have an extension module that call functions provided by a shared library, for

Re: personal library

2013-10-30 Thread Ben Finney
patrick vrijlandt patrick.vrijla...@gmail.com writes: Thanks. Do you all agree that Mercurial is the way to go, or is there another distributed version control system that I should shortlist? My vote is for Bazaar URL:http://bazaar.canonical.com/ for its excellent user interface and workflow

Re: sorting german characters äöü...

2013-10-30 Thread Christian Heimes
Am 30.10.2013 19:38, schrieb Ulrich Goebel: Hello, for a SQLite database I would like to prepare a collating function in python. It has to compare two (unicode-)strings s, t and should return -1 if st, 0 if s=t and 1 if st. The strings are german names/words, and what I would like is to

Re: personal library

2013-10-30 Thread Antoon Pardon
Op 30-10-13 21:02, patrick vrijlandt schreef: Chris Angelico ros...@gmail.com wrote: On Wed, Oct 30, 2013 at 3:33 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: *Definitely* use source control. +1, but prefer to call it a “version control system”

Re: First day beginner to python, add to counter after nested loop

2013-10-30 Thread Ned Batchelder
On 10/30/13 3:59 PM, Antoon Pardon wrote: Op 30-10-13 20:13, jonas.thornv...@gmail.com schreef: Den onsdagen den 30:e oktober 2013 kl. 20:05:07 UTC+1 skrev Mark Lawrence: On 30/10/2013 18:43, jonas.thornv...@gmail.com wrote: And ***that is not by having every stupid anal monkey sitting

Re: Algorithm that makes maximum compression of completly diffused data.

2013-10-30 Thread Gene Heskett
On Wednesday 30 October 2013 16:29:12 jonas.thornv...@gmail.com did opine: Den onsdagen den 30:e oktober 2013 kl. 20:46:57 UTC+1 skrev Modulok: On Wed, Oct 30, 2013 at 12:21 PM, jonas.t...@gmail.com wrote: I am searching for the program or algorithm that makes the best possible

Re: personal library

2013-10-30 Thread Mark Lawrence
On 30/10/2013 20:52, Antoon Pardon wrote: Op 30-10-13 21:02, patrick vrijlandt schreef: Chris Angelico ros...@gmail.com wrote: On Wed, Oct 30, 2013 at 3:33 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: *Definitely* use source control. +1, but

Re: personal library

2013-10-30 Thread paul . nospam
patrick vrijlandt patrick.vrijla...@gmail.com writes: Thanks. Do you all agree that Mercurial is the way to go, or is there another distributed version control system that I should shortlist? git is popular too. In the long run it's probably worth getting experience with both. --

function got multiple values for keyword argument for value

2013-10-30 Thread kavithabhaskaran2013
search(lane,value=None,start=105,stop=115,GUI=True) - function definition search(lane,value=value,start=start, stop=stop,GUI=True) - function call I get the error search() got multiple keyword argument for value I understand when this error comes up - if I had a function definition like below

Re: function got multiple values for keyword argument for value

2013-10-30 Thread John Gordon
In 3c5cfc8d-885e-439d-8e66-5c7630e00...@googlegroups.com kavithabhaskaran2...@gmail.com writes: search(lane,value=None,start=105,stop=115,GUI=True) - function definition search(lane,value=value,start=start, stop=stop,GUI=True) - function call I get the error search() got multiple keyword

Re: Algorithm that makes maximum compression of completly diffused data.

2013-10-30 Thread Grant Edwards
On 2013-10-30, jonas.thornv...@gmail.com jonas.thornv...@gmail.com wrote: I am searching for the program or algorithm that makes the best possible of completly (diffused data/random noise) and wonder what the state of art compression is. [...] It is of course lossless compression i am

Re: personal library

2013-10-30 Thread Grant Edwards
On 2013-10-30, Mark Lawrence breamore...@yahoo.co.uk wrote: On 30/10/2013 20:52, Antoon Pardon wrote: So start a small project and try to use a number of them simultaneously and then decide which feels more natural to you. And if the worst comes to the worst there's always Visual Source

Re: function got multiple values for keyword argument for value

2013-10-30 Thread kavithabhaskaran2013
search(lane,value=None,start=105,stop=115,GUI=True) - function definition search(lane,value=value,start=start, stop=stop,GUI=True) - function call I get the error search() got multiple keyword argument for value I dont follow why I get it when the number of arguments I

Re: Algorithm that makes maximum compression of completly diffused data.

2013-10-30 Thread Mark Janssen
On Wed, Oct 30, 2013 at 11:21 AM, jonas.thornv...@gmail.com wrote: I am searching for the program or algorithm that makes the best possible of completly (diffused data/random noise) and wonder what the state of art compression is. Is this an April Fool's Joke? A key idea of completely

Re: Algorithm that makes maximum compression of completly diffused data.

2013-10-30 Thread Joshua Landau
On 30 October 2013 19:18, Mark Lawrence breamore...@yahoo.co.uk wrote: On 30/10/2013 19:01, jonas.thornv...@gmail.com wrote: And your still a stupid monkey i dare you to go test your IQ. It's you're as in you are and not your as in belongs to me. I have no intention of getting my IQ tested,

Re: function got multiple values for keyword argument for value

2013-10-30 Thread Chris Angelico
On Thu, Oct 31, 2013 at 8:10 AM, kavithabhaskaran2...@gmail.com wrote: search(lane,value=None,start=105,stop=115,GUI=True) - function definition search(lane,value=value,start=start, stop=stop,GUI=True) - function call I get the error search() got multiple keyword argument for value Cut your

Re: personal library

2013-10-30 Thread Chris Angelico
On Thu, Oct 31, 2013 at 7:19 AM, Tim Delaney timothy.c.dela...@gmail.com wrote: What it comes down to for me is that Mercurial usage fits in my head and I rarely have to go to the docs, whereas with Git I have to constantly go to the docs for anything but the most trivial usage - even when it's

Re: function got multiple values for keyword argument for value

2013-10-30 Thread Mark Lawrence
On 30/10/2013 21:10, kavithabhaskaran2...@gmail.com wrote: search(lane,value=None,start=105,stop=115,GUI=True) - function definition search(lane,value=value,start=start, stop=stop,GUI=True) - function call I get the error search() got multiple keyword argument for value I understand when this

Re: First day beginner to python, add to counter after nested loop

2013-10-30 Thread Antoon Pardon
Op 30-10-13 21:52, Ned Batchelder schreef: On 10/30/13 3:59 PM, Antoon Pardon wrote: Op 30-10-13 20:13, jonas.thornv...@gmail.com schreef: No it isn't... The programmers of the tools on either of side will have to adapt. I wish it would be Google but it could be a database problem, but what

Re: personal library

2013-10-30 Thread Tim Delaney
On 31 October 2013 08:31, Chris Angelico ros...@gmail.com wrote: On Thu, Oct 31, 2013 at 7:19 AM, Tim Delaney timothy.c.dela...@gmail.com wrote: What it comes down to for me is that Mercurial usage fits in my head and I rarely have to go to the docs, whereas with Git I have to constantly

Re: Error Testing

2013-10-30 Thread Albert van der Horst
In article mailman.1272.1382221693.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Sun, Oct 20, 2013 at 3:22 AM, rusi rustompm...@gmail.com wrote: The problem is that python is an imperative language and uses the '=' sign for assignment. In math of course '=' stands

Re: personal library

2013-10-30 Thread Tim Delaney
On 31 October 2013 08:43, Tim Delaney timothy.c.dela...@gmail.com wrote: On 31 October 2013 08:31, Chris Angelico ros...@gmail.com wrote: On Thu, Oct 31, 2013 at 7:19 AM, Tim Delaney timothy.c.dela...@gmail.com wrote: What it comes down to for me is that Mercurial usage fits in my head and

Re: Algorithm that makes maximum compression of completly diffused data.

2013-10-30 Thread Mark Lawrence
On 30/10/2013 21:30, Joshua Landau wrote: On 30 October 2013 19:18, Mark Lawrence breamore...@yahoo.co.uk wrote: On 30/10/2013 19:01, jonas.thornv...@gmail.com wrote: And your still a stupid monkey i dare you to go test your IQ. It's you're as in you are and not your as in belongs to me. I

Re: function got multiple values for keyword argument for value

2013-10-30 Thread KR
On Wednesday, October 30, 2013 2:34:19 PM UTC-7, Mark Lawrence wrote: On 30/10/2013 21:10, search(lane,value=None,start=105,stop=115,GUI=True) - function definition search(lane,value=value,start=start, stop=stop,GUI=True) - function call I get the error search() got multiple

Re: trying to strip out non ascii.. or rather convert non ascii

2013-10-30 Thread Terry Reedy
On 10/30/2013 12:08 PM, wxjmfa...@gmail.com wrote: From a unicode perspective. Unicode.org knows, these chars a very important, that's the reason why they exist in two forms, precomposed and composed forms. Only some chars have both forms. I believe the precomposed forms are partly a

Re: function got multiple values for keyword argument for value

2013-10-30 Thread KR
On Wednesday, October 30, 2013 2:50:03 PM UTC-7, KR wrote: On Wednesday, October 30, 2013 2:34:19 PM UTC-7, Mark Lawrence wrote: On 30/10/2013 21:10, search(lane,value=None,start=105,stop=115,GUI=True) - function definition search(lane,value=value,start=start, stop=stop,GUI=True) -

Re: function got multiple values for keyword argument for value

2013-10-30 Thread Mark Lawrence
On 30/10/2013 21:50, KR wrote: On Wednesday, October 30, 2013 2:34:19 PM UTC-7, Mark Lawrence wrote: On 30/10/2013 21:10, search(lane,value=None,start=105,stop=115,GUI=True) - function definition search(lane,value=value,start=start, stop=stop,GUI=True) - function call I get the

Re: function got multiple values for keyword argument for value

2013-10-30 Thread Mark Lawrence
On 30/10/2013 21:56, KR wrote: On Wednesday, October 30, 2013 2:50:03 PM UTC-7, KR wrote: On Wednesday, October 30, 2013 2:34:19 PM UTC-7, Mark Lawrence wrote: On 30/10/2013 21:10, search(lane,value=None,start=105,stop=115,GUI=True) - function definition search(lane,value=value,start=start,

Re: Algorithm that makes maximum compression of completly diffused data.

2013-10-30 Thread Tim Chase
On 2013-10-30 21:30, Joshua Landau wrote: started talking about compressing *random data* If it's truly random bytes, as long as you don't need *the same* random data, you can compress it quite easily. Lossy compression is acceptable for images, so why not random files? :-) import os

Re: trying to strip out non ascii.. or rather convert non ascii

2013-10-30 Thread Roy Smith
In article mailman.1821.1383156703.18130.python-l...@python.org, Michael Torrie torr...@gmail.com wrote: On 10/30/2013 10:08 AM, wxjmfa...@gmail.com wrote: My comment had nothing to do with Python, it was a general comment. A diacritical mark just makes a letter a different letter; a ï

Re: Algorithm that makes maximum compression of completly diffused data.

2013-10-30 Thread Chris Angelico
On Thu, Oct 31, 2013 at 10:01 AM, Tim Chase python.l...@tim.thechases.com wrote: On 2013-10-30 21:30, Joshua Landau wrote: started talking about compressing *random data* If it's truly random bytes, as long as you don't need *the same* random data, you can compress it quite easily. Lossy

Re: Error Testing

2013-10-30 Thread Chris Angelico
On Thu, Oct 31, 2013 at 8:43 AM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: In article mailman.1272.1382221693.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: Pascal tried to create a new operator, := to be read becomes... This suggests that Pascal went against

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-30 Thread rurpy
On 10/30/2013 04:22 AM, Steven D'Aprano wrote: On Tue, 29 Oct 2013 13:00:07 -0700, rurpy wrote: On Tuesday, October 29, 2013 8:08:16 AM UTC-6, Steven D'Aprano wrote: On Tue, 29 Oct 2013 12:37:36 +0100, Skybuck Flying wrote: [...] Skybuck, please excuse my question, but have you ever done any

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-30 Thread rurpy
On 10/29/2013 12:22 AM, Chris Angelico wrote: On Tue, Oct 29, 2013 at 3:03 PM, ru...@yahoo.com wrote: Regarding esr's smart-questions, although I acknowledge it has useful advice, I have always found it elitist and abrasive. I wish someone would rewrite it without the we are gods attitude.

Re: First day beginner to python, add to counter after nested loop

2013-10-30 Thread Dave Angel
On 30/10/2013 12:31, jonas.thornv...@gmail.com wrote: No that is not my problem, apparently so it is that the newsreader constructors do not like the competition of Google groups otherwise they would had written the five lines of codes necessary to remove the empty linebreaks. I like

Re: Algorithm that makes maximum compression of completly diffused data.

2013-10-30 Thread Dave Angel
On 30/10/2013 14:21, jonas.thornv...@gmail.com wrote: I am searching for the program or algorithm that makes the best possible of completly (diffused data/random noise) and wonder what the state of art compression is. I understand this is not the correct forum but since i think i have an

OT: Hierarchies (was Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.)

2013-10-30 Thread Chris Angelico
On Thu, Oct 31, 2013 at 1:53 PM, ru...@yahoo.com wrote: Your hierarchy is particularly unappealing to me. We all know that such hierarchies exist in the real world, but there is a question: should they be promoted as a natural and desirable state of society to be encouraged? There are

Re: small regexp help

2013-10-30 Thread jianbing . tai
On Thursday, October 31, 2013 12:56:49 AM UTC+8, rusi wrote: Well it seems that we are considerably closer to a solution to the GG double-spaced crap problem. Just wondering if someone can suggest a cleanup of the regexp part Currently I have (elisp) (defun clean-gg ()

[issue19445] heapq.heapify is n log(n), not linear

2013-10-30 Thread Blaise Gassend
New submission from Blaise Gassend: The documentation for heapq.heapify indicates that it runs in linear time. I believe that this is incorrect, and that it runs in worst case n * log(n) time. I checked the implementation, and there are indeed n _siftup operations, which each appear to be

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-10-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Graham, do we have a contributor agreement from you? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19072 ___

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-10-30 Thread Graham Dumpleton
Graham Dumpleton added the comment: I don't believe so. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19072 ___ ___ Python-bugs-list mailing

[issue19446] Integer division for negative numbers

2013-10-30 Thread Nitin Kumar
New submission from Nitin Kumar: Mathematically python is not giving correct output for integer division for negative number, e.g. : -7//2= -3 but python is giving output -4. -- components: IDLE files: Integer_division.py messages: 201715 nosy: Nitin.Kumar priority: normal severity:

[issue19445] heapq.heapify is n log(n), not linear

2013-10-30 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19445 ___

[issue19446] Integer division for negative numbers

2013-10-30 Thread Nitin Kumar
Changes by Nitin Kumar nitinkumar@gmail.com: Removed file: http://bugs.python.org/file32420/Integer_division.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19446 ___

[issue19446] Integer division for negative numbers

2013-10-30 Thread Nitin Kumar
Changes by Nitin Kumar nitinkumar@gmail.com: Added file: http://bugs.python.org/file32421/Integer_division.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19446 ___

[issue19446] Integer division for negative numbers

2013-10-30 Thread Georg Brandl
Georg Brandl added the comment: Hi Nitin, a // b is defined as the floor division operation, same as what math.floor(a / b) gives: the largest integer = a / b. -7/2 is -3.5, the largest integer = -3.5 is -4. -- nosy: +georg.brandl resolution: - invalid status: open - closed

[issue19445] heapq.heapify is n log(n), not linear

2013-10-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: The run time is O(n) because the heapify algorithm runs bottom-to-top so most of the n//2 sift operations are working on very short heaps (i.e. half of them are at depth 1, a quarter of them are at depth 2, one eight at depth 3, etc). Please take a look

[issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

2013-10-30 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19444 ___ ___ Python-bugs-list mailing

[issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

2013-10-30 Thread Christian Heimes
Christian Heimes added the comment: Can you suggest a documentation update? -- assignee: - docs@python components: +Documentation -Library (Lib) nosy: +christian.heimes, docs@python stage: - needs patch versions: +Python 3.2 ___ Python tracker

[issue19446] Integer division for negative numbers

2013-10-30 Thread Nitin Kumar
Nitin Kumar added the comment: Hi Georg, Is there any operator for integer division in python? On Wed, Oct 30, 2013 at 1:00 PM, Georg Brandl rep...@bugs.python.orgwrote: Georg Brandl added the comment: Hi Nitin, a // b is defined as the floor division operation, same as what

[issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

2013-10-30 Thread STINNER Victor
STINNER Victor added the comment: the file descriptor that mmap.mmap() allocates is not set to close-on-exec In Python 3.4, the file descriptor is now non-inheritable, as a side effect of the PEP 446. http://www.python.org/dev/peps/pep-0446/ -- versions: +Python 3.3, Python 3.4

[issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

2013-10-30 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19444 ___ ___

[issue19447] py_compile.compile raises if a file has bad encoding

2013-10-30 Thread Bohuslav Slavek Kabrda
New submission from Bohuslav Slavek Kabrda: If py_compile.compile is used on a file with bad encoding (e.g. Lib/test/bad_coding2.py), the function raises even if doraise=False is passed. I'm attaching a patch that fixes this in 3.3 - I haven't tried on 3.4 yet and the code has changed, so I'm

[issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

2013-10-30 Thread Robert Merrill
Robert Merrill added the comment: I'm adding Library again because I think the current behavior is a bug and should be fixed in the 2.7 tree. Perhaps the documentation in older versions should be updated mmap.mmap should always set the FD_CLOEXEC flag on the descriptor that it gets from

[issue19447] py_compile.compile raises if a file has bad encoding

2013-10-30 Thread STINNER Victor
STINNER Victor added the comment: py_compile.compile() has been modified in Python 3.4. The encoding is now detected in the try/except block. You should write a unit test for your patch. http://docs.python.org/devguide/runtests.html#writing -- nosy: +haypo

[issue19448] SSL: add OID / NID lookup

2013-10-30 Thread Christian Heimes
New submission from Christian Heimes: For #17134 I need a decent way to map OIDs to human readable strings and vice versa. OpenSSL has a couple of method for the task, e.g. http://www.openssl.org/docs/crypto/OBJ_nid2obj.html The patch implements three ways to lookup NID, SN, LN and OID: by

[issue19447] py_compile.compile raises if a file has bad encoding

2013-10-30 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda added the comment: Ok, I'm attaching a patch for 3.3 with a test case included. -- Added file: http://bugs.python.org/file32424/dont-raise-from-py_compile-test-included.patch ___ Python tracker rep...@bugs.python.org

[issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

2013-10-30 Thread Robert Merrill
Robert Merrill added the comment: Sorry, I correct my earlier statement: even if the fd you pass to mmap.mmap() is set to FD_CLOEXEC, the dup'd fd /will not be/ So this is a REALLY bad bug because users cannot workaround it except by just not using mmap --

[issue19449] csv.DictWriter can't handle extra non-string fields

2013-10-30 Thread Tomas Grahn
New submission from Tomas Grahn: When csv.DictWriter.writerow is fed a dict with extra fieldnames (and extrasaction='raise') and any of those extra fieldnames aren't strings, a TypeError-exception is thrown. To fix the issue; in csv.py, edit the line: raise ValueError(dict contains fields not

[issue19450] Bug in sqlite in Windows binaries

2013-10-30 Thread Marc Schlaich
New submission from Marc Schlaich: My System: $ python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import sqlite3 sqlite3.version '2.6.0' sqlite3.sqlite_version '3.6.21' Test Script:

[issue18683] Core dumps on CentOS

2013-10-30 Thread Marc Schlaich
Marc Schlaich added the comment: Ok, these issues were probably due to the shipped version of PyGTK (which is used as event scheduler). Since I built my own Python and own PyGTK everything looks fine. -- resolution: - invalid status: open - closed

[issue19451] urlparse accepts invalid hostnames

2013-10-30 Thread Daniele Sluijters
New submission from Daniele Sluijters: Python 2's urlparse.urlparse() and Python 3's urllib.parse.urlparse() accept URI/URL's with underscores in the host/domain/subdomain. I believe this behaviour to be incorrect. A distinction needs to be made between DNS names and Uniform Resource Locators

[issue19443] add to dict fails after 1,000,000 items on py 2.7.5

2013-10-30 Thread STINNER Victor
STINNER Victor added the comment: It works for me on Linux 64-bit: $ python Python 2.7.3 (default, Aug 9 2012, 17:23:57) [GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2 Type help, copyright, credits or license for more information. d, i = {}, 0 while (i 1000): ... n = i + 1 ...

[issue19449] csv.DictWriter can't handle extra non-string fields

2013-10-30 Thread R. David Murray
R. David Murray added the comment: I would argue that the TypeError is correct (field names must be strings), even though the way it is generated is a bit unorthodox :) Let's see what others think. -- nosy: +r.david.murray ___ Python tracker

[issue19449] csv.DictWriter can't handle extra non-string fields

2013-10-30 Thread R. David Murray
R. David Murray added the comment: Rereading my post I disagree with myself. ValueError is probably better in this context (the difference between ValueError and TypeError is a bit grey, and Python is not necessarily completely consistent about it.) --

[issue19452] ElementTree iterparse documentation

2013-10-30 Thread Peter Harris
New submission from Peter Harris: Documentation on python website says: xml.etree.ElementTree.iterparse(source, events=None, parser=None) Parses an XML section into an element tree incrementally, and reports what’s going on to the user. source is a filename or file object containing XML

[issue19449] csv.DictWriter can't handle extra non-string fields

2013-10-30 Thread Tomas Grahn
Tomas Grahn added the comment: If non-string field names aren't allowed then shouldn't they be caught at an earlier stage, rather then when the user feeds writerow a dict with an unexpected key? But why should the field names have to be strings in the first place? Everything else is passed

[issue19451] urlparse accepts invalid hostnames

2013-10-30 Thread R. David Murray
R. David Murray added the comment: Python often defaults to the practical over the strictly-conforming (unless there is a 'strict' flag :) We generally follow the lead of the browsers in implementing our web related modules. The situation here appears to be a real mess. Here's an

[issue19407] PEP 453: update the Installing Python Modules documentation

2013-10-30 Thread Nick Coghlan
Nick Coghlan added the comment: Alternative (more sensible) option - leave the packaging user guide hosted on ReadTheDocs, and if we decide to add a python.org subdomain for it later, that won't break any existing links. -- ___ Python tracker

[issue19449] csv.DictWriter can't handle extra non-string fields

2013-10-30 Thread R. David Murray
R. David Murray added the comment: But why should the field names have to be strings in the first place? Everything else is passed through str before being written anyway... Good point. -- ___ Python tracker rep...@bugs.python.org

[issue19414] OrderedDict.values() behavior for modified instance

2013-10-30 Thread Ethan Furman
Ethan Furman added the comment: Do we currently have any data structures in Python, either built-in or in the stdlib, that aren't documented as raising RuntimeError if the size changes during iteration? list, dict, set, and defaultdict all behave this way. If not, I think OrderedDict should

[issue19413] Reload semantics changed unexpectedly in Python 3.3

2013-10-30 Thread Brett Cannon
Brett Cannon added the comment: Fine with fixing it, but in context of PEP 451, not 3.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19413 ___

[issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit

2013-10-30 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the preliminary patch to fix the problem. My patch produces 8bit for msg.as_string and msg.as_bytes for simplicity reason. If msg.as_string should gives content-transfer-encoding 7bit with 8bit data but msg.as_bytes should gives

[issue19414] OrderedDict.values() behavior for modified instance

2013-10-30 Thread Armin Rigo
Armin Rigo added the comment: 'list' doesn't, precisely. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19414 ___ ___ Python-bugs-list mailing

[issue19414] OrderedDict.values() behavior for modified instance

2013-10-30 Thread Ethan Furman
Ethan Furman added the comment: Ah, right you are: list just acts wierd. ;) So the question then becomes is OrderedDict more like a list or more like a dict? It seems to me that OrderedDict is more like a dict. -- ___ Python tracker

[issue19445] heapq.heapify is n log(n), not linear

2013-10-30 Thread Blaise Gassend
Blaise Gassend added the comment: I stand corrected. Sorry for the noise. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19445 ___ ___

[issue19414] OrderedDict.values() behavior for modified instance

2013-10-30 Thread Nikolaus Rath
Nikolaus Rath added the comment: I agree that OrderedDict is more a dict than a list, but it is not clear to me why this means that it cannot extend a dict's functionality in that respect. OrderedDict already adds functionality to dict (preserving the order), so why shouldn't it also allow

[issue19452] ElementTree iterparse documentation

2013-10-30 Thread Stefan Behnel
Stefan Behnel added the comment: How about actually allowing a list in addition to a tuple? And, in fact, any sequence? I can't see a reason not to. For reference, lxml only expects it to be either None or an iterable. Essentially, I consider it more of a set-like filter, since the linear

[issue19435] Directory traversal attack for CGIHTTPRequestHandler

2013-10-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset e4fe8fcaef0d by Benjamin Peterson in branch '2.7': use the collapsed path in the run_cgi method (closes #19435) http://hg.python.org/cpython/rev/e4fe8fcaef0d New changeset b1ddcb220a7f by Benjamin Peterson in branch '3.1': use the collapsed path in

[issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update

2013-10-30 Thread Mark Richman
Mark Richman added the comment: I had to do `sudo sh ./patch_readline_issue_18458.sh` or the patch script itself would cause Python to crash. After applying this patch, I got the following output, and the problem is still *not* solved for me: -- running on OS X 10.9 -- 2.7 does not need to

[issue19424] _warnings: patch to avoid conversions from/to UTF-8

2013-10-30 Thread Zachary Ware
Zachary Ware added the comment: Adding to Vajrasky's report, the same commit also adds 3 warnings when building on Windows: ..\Objects\unicodeobject.c(10588): warning C4018: '' : signed/unsigned mismatch [P:\Projects\OSS\Python\cpython\PCbuild\pythoncore.vcxproj]

[issue19453] pydoc.py doesn't detect IronPython, help(foo) can hang

2013-10-30 Thread David Evans
New submission from David Evans: The pager functions used by help() in StdLib's pydoc.py don't detect IronPython correctly and the result is a lack of functionality or in some cases a hang. This is similar to issue 8110 in that the code attempts to detect windows with a check for win32 from

[issue19414] OrderedDict.values() behavior for modified instance

2013-10-30 Thread Ethan Furman
Ethan Furman added the comment: The further from dict it goes, the more there is to remember. Considering the work around is so simple, I just don't think it's worth it: for key in list(ordered_dict): if some_condition: del ordered_dict[key] A simple list around the

[issue19424] _warnings: patch to avoid conversions from/to UTF-8

2013-10-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 52ec6a3eeda5 by Victor Stinner in branch 'default': Issue #19424: Fix a compiler warning http://hg.python.org/cpython/rev/52ec6a3eeda5 -- ___ Python tracker rep...@bugs.python.org

[issue19451] urlparse accepts invalid hostnames

2013-10-30 Thread Daniele Sluijters
Daniele Sluijters added the comment: The link you mention only deals with the DNS side of things, this issue is specifically not about that, it's about the URI/URL side of things which is a very important distinction in this case. I'm also not entirely sure I agree with the sentiment of it's

[issue19451] urlparse accepts invalid hostnames

2013-10-30 Thread R. David Murray
R. David Murray added the comment: Yes, I said that link only dealt with the DNS side of things...where there are also incompatibilities. I don't think that strictly adhering to the URI RFCs would clear things up. What about those domains that have _s and want to run web services on them?

[issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

2013-10-30 Thread Charles-François Natali
Charles-François Natali added the comment: I agree this should be fixed. Robert, want to submit a patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19444 ___

[issue19452] ElementTree iterparse documentation

2013-10-30 Thread Peter Harris
Peter Harris added the comment: Yeah it would make sense to accept any iterable, but I'm only proposing a documentation fix not a feature enhancement. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19452

[issue19414] OrderedDict.values() behavior for modified instance

2013-10-30 Thread Nikolaus Rath
Nikolaus Rath added the comment: The workaround is trivial, but there is no technical necessity for it, and it involves copying the entire dict into a list purely for.. what exactly? I guess I do not understand the drawback of allowing changes. What is wrong with for key in ordered_dict:

[issue19414] OrderedDict.values() behavior for modified instance

2013-10-30 Thread Nikolaus Rath
Nikolaus Rath added the comment: Ethan: when you say ..the more there is to remember, what exactly do you mean? I can see that it is important to remember that you're *not allowed* to make changes during iteration for a regular dict. But is there really a significant cognitive burden if it

[issue19377] Backport SVG mime type to Python 2

2013-10-30 Thread anatoly techtonik
anatoly techtonik added the comment: I think we are talking about double standards. Why the .xz and .txz are worthy including in 2.7.5 and .svg is not? See issue #16316. http://bugs.python.org/issue15207 will break a lot of this stuff anyway, so I hope it will fix the issue. --

[issue19172] selectors: add keys() method

2013-10-30 Thread Guido van Rossum
Guido van Rossum added the comment: LGTM. Commit! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19172 ___ ___ Python-bugs-list mailing list

[issue19172] selectors: add keys() method

2013-10-30 Thread Guido van Rossum
Guido van Rossum added the comment: (Adding CF's new patch so I can compare and review it.) -- Added file: http://bugs.python.org/file32428/selectors_map-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19172

[issue19454] devguide: Document what a platform support is

2013-10-30 Thread anatoly techtonik
New submission from anatoly techtonik: As a followup to issue19377 it would be nice if devguide contained a paragraph to resolve the conflicting point provided by http://bugs.python.org/msg187373 and http://bugs.python.org/msg201141 arguments. -- assignee: docs@python components:

[issue19414] OrderedDict.values() behavior for modified instance

2013-10-30 Thread Ethan Furman
Ethan Furman added the comment: Firstly, you're not copying the entire dict, just its keys. [1] Secondly, you're only copying the keys when you'll be adding/deleting keys from the dict. Thirdly, using the list idiom means you can use OrderedDicts, defaultdicts, dicts, sets, and most likely

[issue19377] Backport SVG mime type to Python 2

2013-10-30 Thread anatoly techtonik
anatoly techtonik added the comment: Added issue19454 to settle this down. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19377 ___ ___

[issue19437] More failures found by pyfailmalloc

2013-10-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7097b5c39db0 by Victor Stinner in branch 'default': Issue #19437: Fix os.statvfs(), handle errors http://hg.python.org/cpython/rev/7097b5c39db0 New changeset b49f9aa12dae by Victor Stinner in branch 'default': Issue #19437: Fix select.epoll.poll(),

[issue19414] OrderedDict.values() behavior for modified instance

2013-10-30 Thread Ethan Furman
Ethan Furman added the comment: Nikolaus, in reply to your question about more to remember: Even though I may not use it myself, if it is allowed then at some point I will see it in code; when that happens the sequence of events is something like: 1) hey, that won't work 2) oh, wait, is

[issue19443] add to dict fails after 1,000,000 items on py 2.7.5

2013-10-30 Thread Milton Mobley
Milton Mobley added the comment: I followed the suggestion of email responders to use xrange instead of while, and observed that 32-bit Suse Linux got past 44,000,000 adds before exiting with Memory Error, while 64-bit Windows 7 slowed down markedly after 22,000,000 adds and was unusable

[issue19443] add to dict fails after 1,000,000 items on py 2.7.5

2013-10-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: But in my opinion Python should be able to detect failure to complete an allocation request on Windows Which failure? You're telling us it doesn't fail, it just becomes slow. (by the way, have you checked whether your machine is swapping when that happens?)

<    1   2   3   >