Re: __dict__ attribute for built-in types

2011-10-28 Thread Steven D'Aprano
On Fri, 28 Oct 2011 01:36:41 +0200, candide wrote: Le 28/10/2011 00:57, Hrvoje Niksic a écrit : was used at class definition time to suppress it. Built-in and extension types can choose whether to implement __dict__. Is it possible in the CPython implementation to write something like

Re: Unicode literals and byte string interpretation.

2011-10-28 Thread Steven D'Aprano
On Thu, 27 Oct 2011 20:05:13 -0700, Fletcher Johnson wrote: If I create a new Unicode object u'\x82\xb1\x82\xea\x82\xcd' how does this creation process interpret the bytes in the byte string? It doesn't, because there is no byte-string. You have created a Unicode object from a literal string

Re: Need Windows user / developer to help with Pynguin

2011-10-28 Thread Lee Harr
I started a wiki page here:  http://code.google.com/p/pynguin/wiki/InstallingPynguinOnWindows but I can't even test if it actually

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Steven D'Aprano
On Thu, 27 Oct 2011 17:09:34 -0700, Patrick Maupin wrote: On Oct 27, 5:31 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: From the outside, you can't tell how big a generator expression is. It has no length: I understand that. Since the array object has no way of

Re: Dynamically creating properties?

2011-10-28 Thread Steven D'Aprano
On Thu, 27 Oct 2011 16:00:57 -0700, DevPlayer wrote: def isvalid_named_reference( astring ): # varible name is really a named_reference # import string # would be cleaner I don't understand the comment about variable name. valid_first_char =

Re: __dict__ attribute for built-in types

2011-10-28 Thread Steven D'Aprano
On Fri, 28 Oct 2011 00:52:40 +0200, candide wrote: Le 28/10/2011 00:19, Steven D'Aprano a écrit : What, you think it goes against the laws of physics that nobody thought to mention it in the docs?wink No but I'm expecting from Python documentation to mention the laws of Python ... You

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Terry Reedy
On 10/28/2011 3:21 AM, Steven D'Aprano wrote: If the slice has too few elements, you've just blown away the entire iterator for no good reason. If the slice is the right length, but the iterator doesn't next raise StopIteration, you've just thrown away one perfectly good value. Hope it

Re: spawnl issues with Win 7 access rights

2011-10-28 Thread Tim Golden
On 27/10/2011 20:53, Terry Reedy wrote: On 10/27/2011 6:36 AM, Tim Golden wrote: On 27/10/2011 11:27, Propad wrote: the suggestion to add the optional second parameter fixed the problem, spawnl now works on the Win 7 computer I'm responsible for (with Python 2.2). So the suggested cause seems

Re: __dict__ attribute for built-in types

2011-10-28 Thread Hrvoje Niksic
candide candide@free.invalid writes: Le 28/10/2011 00:57, Hrvoje Niksic a écrit : was used at class definition time to suppress it. Built-in and extension types can choose whether to implement __dict__. Is it possible in the CPython implementation to write something like this : foo.bar

Re: Entre local et global

2011-10-28 Thread Laurent
Le 28/10/2011 10:43, ll.snark a écrit : On 27 oct, 17:06, Laurent Claessensmoky.m...@gmail.com wrote: J'aimerais donc pouvoir indiquer dans fonca, que la variable lst est celle définie dans fonc1. Je ne veux pas d'une variable locale à fonca, ni une variable globale à tout mon

Re: __dict__ attribute for built-in types

2011-10-28 Thread candide
Le 28/10/2011 05:02, Patrick Maupin a écrit : You can easily do that by subclassing a string: class AnnotatedStr(str): pass x = AnnotatedStr('Node1') x.title = 'Title for node 1' Less or more what I did. But requires to transport the string graph structure to the AnnotatedStr one.

Re: __dict__ attribute for built-in types

2011-10-28 Thread candide
Le 28/10/2011 10:01, Steven D'Aprano a écrit : didn't think of it. This is hardly a surprise. Wanting to add arbitrary attributes to built-ins is not exactly an everyday occurrence. Depends. Experimented programmers don't even think of it. But less advanced programmers can consider of it.

Re: __dict__ attribute for built-in types

2011-10-28 Thread candide
Le 28/10/2011 11:08, Hrvoje Niksic a écrit : longer be allowed for the interpreter to transparently cache them. The same goes for integers and other immutable built-in objects. On the other hand, immutability and optimization don't explain the whole thing because you can't do something

Re: Entre local et global

2011-10-28 Thread Laurent Claessens
Woops. This was aimed to the french speaking python's usenet. Sorry. Laurent Le 28/10/2011 11:29, Laurent a écrit : Le 28/10/2011 10:43, ll.snark a écrit : On 27 oct, 17:06, Laurent Claessensmoky.m...@gmail.com wrote: J'aimerais donc pouvoir indiquer dans fonca, que la variable lst

Re: __dict__ attribute for built-in types

2011-10-28 Thread Christian Heimes
Am 28.10.2011 10:01, schrieb Steven D'Aprano: hasattr(int, '__dict__') # Does the int class/type have a __dict__? True hasattr(42, '__dict__') # Does the int instance have a __dict__? False Also __dict__ doesn't have to be an instance of __dict__. Builtin types usually have a dictproxy

Is Python in the browser a dead-end ?

2011-10-28 Thread Amirouche Boubekki
Héllo, There was a thread recently about the missed opportunity for Python to be a language that could replace Javascript in the browser. They are several attempts at doing something in this spirit here are the ones I'm aware of: - pyjamas aka. pyjs it is to Python what GWT is to Java :

Re: Is Python in the browser a dead-end ?

2011-10-28 Thread Billy Earney
I believe that python maybe had missed an opportunity to get in early and be able to take over a large market share from javascript. But that doesn't mean python is dead in the browser, it just means it will have more competition if it wants to replace javascript for Rich Internet Applications.

ANN: python-ldap 2.4.4

2011-10-28 Thread Michael Ströder
Find a new release of python-ldap: http://pypi.python.org/pypi/python-ldap/2.4.4 python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related

Re: __dict__ attribute for built-in types

2011-10-28 Thread Peter Pearson
On Fri, 28 Oct 2011 00:52:40 +0200, candide candide@free.invalid wrote: [snip] hasattr(42, '__dict__') False [snip] Let'have a try : hasattr(43, '__dict__') False so we have proved by induction that no integer instance has a dictionnary attribute ;) You left out an important step in

getting columns attributes in declarative style with sqlalchemy

2011-10-28 Thread Gabriele
Hi, I'm tryed to write my first application using SqlAlchemy. I'm using declarative style. I need to get the attributes of the columns of my table. This is an example of my very simple model-class: class Country(base): __tablename__ = bookings_countries id =

Re: Forking simplejson

2011-10-28 Thread Nathan Rice
Just a random note, I actually set about the task of re-implementing a json encoder which can be subclassed, is highly extensible, and uses (mostly) sane coding techniques (those of you who've looked at simplejson's code will know why this is a good thing). So far preliminary tests show the json

How to mix-in __getattr__ after the fact?

2011-10-28 Thread dhyams
Python 2.7.2 I'm having trouble in a situation where I need to mix-in the functionality of __getattr__ after the object has already been created. Here is a small sample script of the situation: =snip import types class Cow(object): pass # this __getattr__ works as advertised.

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Patrick Maupin
On Oct 27, 10:23 pm, Terry Reedy tjre...@udel.edu wrote: I do not think everyone else should suffer substantial increase in space and run time to avoid surprising you. What substantial increase? There's already a check that winds up raising an exception. Just make it empty an iterator

Fast recursive generators?

2011-10-28 Thread Michael McGlothlin
I'm trying to generate a list of values where each value is dependent on the previous value in the list and this bit of code needs to be repeatedly so I'd like it to be fast. It doesn't seem that comprehensions will work as each pass needs to take the result of the previous pass as it's argument.

Re: How to mix-in __getattr__ after the fact?

2011-10-28 Thread Jerry Hill
On Fri, Oct 28, 2011 at 1:34 PM, dhyams dhy...@gmail.com wrote: If I call __getattr__ directly, as in bessie.__getattr__('foo'), it works as it should obviously; so the method is bound and ready to be called.  But Python does not seem to want to call __getattr__ appropriately if I mix it in

Re: How to mix-in __getattr__ after the fact?

2011-10-28 Thread Ethan Furman
dhyams wrote: Python 2.7.2 I'm having trouble in a situation where I need to mix-in the functionality of __getattr__ after the object has already been created. Here is a small sample script of the situation: =snip import types class Cow(object): pass # this __getattr__ works

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Terry Reedy
On 10/28/2011 2:05 PM, Patrick Maupin wrote: On Oct 27, 10:23 pm, Terry Reedytjre...@udel.edu wrote: I do not think everyone else should suffer substantial increase in space and run time to avoid surprising you. What substantial increase? of time and space, as I said, for the temporary

Re: Fast recursive generators?

2011-10-28 Thread Terry Reedy
On 10/28/2011 2:10 PM, Michael McGlothlin wrote: I'm trying to generate a list of values Better to think of a sequence of values, whether materialized as a 'list' or not. where each value is dependent on the previous value in the list and this bit of code needs to be repeatedly so I'd like

save tuple of simple data types to disk (low memory foot print)

2011-10-28 Thread Gelonida N
Hi, I would like to save many dicts with a fixed amount of keys tuples to a file in a memory efficient manner (no random, but only sequential access is required) As the keys are the same for each entry I considered converting them to tuples. The tuples contain only strings, ints (long ints)

Re: Forking simplejson

2011-10-28 Thread Terry Reedy
On 10/28/2011 1:20 PM, Nathan Rice wrote: Just a random note, I actually set about the task of re-implementing a json encoder which can be subclassed, is highly extensible, and uses (mostly) sane coding techniques (those of you who've looked at simplejson's code will know why this is a good

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Patrick Maupin
On Oct 28, 3:19 am, Terry Reedy tjre...@udel.edu wrote: On 10/28/2011 3:21 AM, Steven D'Aprano wrote: If the slice has too few elements, you've just blown away the entire iterator for no good reason. If the slice is the right length, but the iterator doesn't next raise StopIteration,

Re: Forking simplejson

2011-10-28 Thread Nathan Rice
I've found that in a lot of cases getting a patch submitted is only half about good engineering. The other half is politics. I like one of those things, I don't like the other, and I don't want to take time out of my coding schedule to write something if in the end a reviewer shoots down my

Re: save tuple of simple data types to disk (low memory foot print)

2011-10-28 Thread Roy Smith
In article mailman.2293.1319834877.27778.python-l...@python.org, Gelonida N gelon...@gmail.com wrote: I would like to save many dicts with a fixed amount of keys tuples to a file in a memory efficient manner (no random, but only sequential access is required) There's two possible scenarios

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Patrick Maupin
On Oct 28, 4:51 pm, Patrick Maupin pmau...@gmail.com wrote: On Oct 28, 3:19 am, Terry Reedy tjre...@udel.edu wrote: On 10/28/2011 3:21 AM, Steven D'Aprano wrote: If the slice has too few elements, you've just blown away the entire iterator for no good reason. If the slice is the

Re: Fast recursive generators?

2011-10-28 Thread Michael McGlothlin
I'm trying to generate a list of values Better to think of a sequence of values, whether materialized as a 'list' or not. The final value will actually be a string but it seems it is usually faster to join a list of strings than to concat them one by one. where each value is dependent on

Re: save tuple of simple data types to disk (low memory foot print)

2011-10-28 Thread Steven D'Aprano
On Fri, 28 Oct 2011 22:47:42 +0200, Gelonida N wrote: Hi, I would like to save many dicts with a fixed amount of keys tuples to a file in a memory efficient manner (no random, but only sequential access is required) What do you call many? Fifty? A thousand? A thousand million? How many

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Steven D'Aprano
On Fri, 28 Oct 2011 16:27:37 -0700, Patrick Maupin wrote: And, BTW, the example you give of, e.g. a,b,c = (some generator expression) ALREADY LOSES DATA if the iterator isn't the right size and it raises an exception. Yes. What's your point? This fact doesn't support your proposal in the

Re: Need Windows user / developer to help with Pynguin

2011-10-28 Thread Andrew Berg
On 10/27/2011 5:36 PM, Lee Harr wrote: What message do you get when trying to download? It said something like You're trying to download from a forbidden country. That's all we know. Anyway, I was able to get the files. Once everything is set up, it seems to work. I haven't done any serious

Re: Assigning generator expressions to ctype arrays

2011-10-28 Thread Patrick Maupin
On Oct 28, 8:01 pm, Steven D'Aprano ALREADY LOSES DATA if the iterator isn't the right size and it raises an exception. Yes. What's your point? This fact doesn't support your proposal in the slightest. You earlier made the argument that If the slice has too few elements, you've just blown

Re: How to mix-in __getattr__ after the fact?

2011-10-28 Thread Lie Ryan
On 10/29/2011 05:20 AM, Ethan Furman wrote: Python only looks up __xxx__ methods in new-style classes on the class itself, not on the instances. So this works: 8 class Cow(object): pass def attrgetter(self, a): print CAUGHT:

Re: Fast recursive generators?

2011-10-28 Thread Terry Reedy
On 10/28/2011 8:49 PM, Michael McGlothlin wrote: Better to think of a sequence of values, whether materialized as a 'list' or not. The final value will actually be a string but it seems it is usually faster to join a list of strings than to concat them one by one. .join() takes an iterable

Re: Fast recursive generators?

2011-10-28 Thread Gabriel Genellina
En Fri, 28 Oct 2011 15:10:14 -0300, Michael McGlothlin micha...@plumbersstock.com escribió: I'm trying to generate a list of values where each value is dependent on the previous value in the list and this bit of code needs to be repeatedly so I'd like it to be fast. It doesn't seem that

[issue5661] asyncore should catch EPIPE while sending() and receiving()

2011-10-28 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Did you try with the current branches? Yes, the test is pass against the current default and 2.7 branches. One must remove EPIPE from the asyncore._DISCONNECTED frozenset to make the test to fail. OK. Then I'll add this test to

[issue13281] robotparser.RobotFileParser ignores rules preceeded by a blank line

2011-10-28 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: patch review - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13281 ___

[issue6745] (curses) addstr() takes str in Python 3

2011-10-28 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6745 ___ ___ Python-bugs-list

[issue12567] curses implementation of Unicode is wrong in Python 3

2011-10-28 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12567 ___ ___ Python-bugs-list

[issue13218] test_ssl failures on Debian/Ubuntu

2011-10-28 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: ./python -m test -v -u all test_ssl pass with issue13218.diff or issue13218-true.diff on Ubuntu 10.10. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13218

[issue13059] Sporadic test_multiprocessing failure: IOError(bad message length) in recv_bytes()

2011-10-28 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: @antoine: can you try to add more debug messages? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13059 ___

[issue13279] Add memcmp into unicode_compare for optimizing comparisons

2011-10-28 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I would be nice to have a third path for inegality with kind1==kind2, something like: else if (kind1 == PyUnicode_2BYTE_KIND kind2 == PyUnicode_2BYTE_KIND) { /* use Py_UCS2* pointers */ } else if (kind1 == PyUnicode_4BYTE_KIND

[issue13279] Add memcmp into unicode_compare for optimizing comparisons

2011-10-28 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: These 3 minor optimizations can make unicode_compare faster. Can you please try to write a short benchmark script? (or just run a benchmark using ./python -m timeit) -- ___ Python

[issue10570] curses.tigetstr() returns bytes, but curses.tparm() expects a string

2011-10-28 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen stage: - test needed versions: +Python 3.2, Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10570

[issue13270] all classes are new style

2011-10-28 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: the typeclass change reflects the current output on 3.x -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13270 ___

[issue10363] Embedded python, handle (memory) leak

2011-10-28 Thread Martin Dunschen
Martin Dunschen mdunsc...@gmail.com added the comment: Hello Antoine Unloading would not be necessary if the DLL is just the python interpreter, but if you build a DLL with python embedded that does quite a bit more than some python interpreting (in my case complex C/C++ numerical calculations)

[issue13270] all classes are new style

2011-10-28 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 54abca0ab03b by Florent Xicluna in branch '3.2': Fixes #13270: obsolete reference to old-style/new-style classes. http://hg.python.org/cpython/rev/54abca0ab03b -- nosy: +python-dev

[issue13270] all classes are new style

2011-10-28 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13270 ___

[issue13278] Typo in documentation for sched module

2011-10-28 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 3e72de3c8ad5 by Ezio Melotti in branch '2.7': #13278: fix typo. http://hg.python.org/cpython/rev/3e72de3c8ad5 New changeset 9c4b62f67a28 by Ezio Melotti in branch '3.2': #13278: fix typo.

[issue13278] Typo in documentation for sched module

2011-10-28 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the report! -- assignee: docs@python - ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue1294232] Error in metaclass search order

2011-10-28 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: After changeset c72063032a7a I get this complain: Python/bltinmodule.c: In function ‘builtin___build_class__’: Python/bltinmodule.c:43: warning: unused variable ‘nbases’ -- nosy: +flox ___

[issue13282] the table of contents in epub file is too long

2011-10-28 Thread wrobell
New submission from wrobell wrob...@pld-linux.org: the table of contents in python documentation epub file is very very long. it takes several long minutes to jump from first page to a part containing language reference toc. imho it would be great if first page of epub file contained pointers

[issue13283] removal of two unused variable in locale.py

2011-10-28 Thread Nicolas Évrard
New submission from Nicolas Évrard ni...@no-log.org: While using pyflake on some of my file I noticed in a copied version of _group two unused variables. The attached patch fixed that very little annoyance. -- components: Library (Lib) files: locale.diff keywords: patch messages:

[issue13273] HTMLParser improperly handling open tags when strict is False

2011-10-28 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 41d41776aa6d by Ezio Melotti in branch '3.2': #13273: fix a bug that prevented HTMLParser to properly detect some tags when strict=False. http://hg.python.org/cpython/rev/41d41776aa6d New changeset b194117f176c by

[issue13284] email.utils.formatdate function does not handle timezones correctly.

2011-10-28 Thread Burak Arslan
New submission from Burak Arslan burak.ars...@arskom.com.tr: There's an issue with email.utils.formatdate function, illustrated here: https://gist.github.com/1321994 for reference i'm on Europe/Istanbul timezone, which is +03:00 because of DST at the time of this writing. I'm on stable

[issue13273] HTMLParser improperly handling open tags when strict is False

2011-10-28 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks a lot for the report! -- resolution: - fixed stage: commit review - committed/rejected status: open - closed versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2011-10-28 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +benjamin.peterson, georg.brandl Removed file: http://bugs.python.org/file16209/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6877

[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2011-10-28 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file16169/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6877 ___

[issue13285] signal module in ignores external signal changes

2011-10-28 Thread Vilya Harvey
New submission from Vilya Harvey vilya.har...@gmail.com: The signal module is oblivious to any changes to the set of installed signal handlers which occur outside of the module. This can happen when a native module changes a signal handler, or when the python interpreter is embedded in

[issue13285] signal module ignores external signal changes

2011-10-28 Thread Vilya Harvey
Changes by Vilya Harvey vilya.har...@gmail.com: -- title: signal module in ignores external signal changes - signal module ignores external signal changes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13285

[issue13284] email.utils.formatdate function does not handle timezones correctly.

2011-10-28 Thread Burak Arslan
Burak Arslan burak.ars...@arskom.com.tr added the comment: turns out timetuple was not passing timezone information. the correct way of converting a datetime.datetime object to a correct rfc-2822 compliant date string seems to be: email.utils.formatdate(time.mktime(a.utctimetuple()) + 1e-6 *

[issue13270] all classes are new style

2011-10-28 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13270 ___ ___

[issue13238] Add shell command helpers to shutil module

2011-10-28 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I realised I could use the convert_field() option in the custom formatter to choose between several interpolation quoting options: default - str + shutil.quote_ascii_whitespace !q - str + shlex.quote !u - unquoted (i.e. no conversion,

[issue13238] Add shell command helpers to shutil module

2011-10-28 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Some examples: import shutil shutil.shell_call(du -hs {}, ../py*) 594M../py3k 579M../py3k_pristine 480M../python27 301M../python31 382M../python32 288K../python_swallowed_whole 0 shutil.shell_call(du -hs {!q}, ../py*)

[issue13258] replace hasattr(obj, '__call__') with callable(obj)

2011-10-28 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8e57b5d8f58f by Florent Xicluna in branch '3.2': Closes #13258: Use callable() built-in in the standard library. http://hg.python.org/cpython/rev/8e57b5d8f58f -- nosy: +python-dev resolution: - fixed stage:

[issue1294232] Error in metaclass search order

2011-10-28 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b9bb9340eb0c by Florent Xicluna in branch 'default': Merge 3.2 (linked to issue #1294232) http://hg.python.org/cpython/rev/b9bb9340eb0c -- ___ Python tracker

[issue13244] WebSocket schemes in urllib.parse

2011-10-28 Thread Tobias Oberstein
Tobias Oberstein tobias.oberst...@tavendo.de added the comment: Is that patch supposed to be in Python 2.7.2? If so, it doesn't work for ws: ws://example.com/somewhere?foo=bar#dgdg F:\scm\Autobahn\testsuite\websockets\serverspython Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32

[issue13285] signal module ignores external signal changes

2011-10-28 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: So it's impossible to reliably save and restore signal handlers through python when they can also be changed outside the python interpreter. signal.getsignal() or signal.signal() return the current/previous handler as a Python

[issue13285] signal module ignores external signal changes

2011-10-28 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13285 ___ ___

[issue13278] Typo in documentation for sched module

2011-10-28 Thread Jeffrey Finkelstein
Jeffrey Finkelstein jeffrey.finkelst...@gmail.com added the comment: Thank you for the great work, Python project! On Fri, Oct 28, 2011 at 5:36 AM, Ezio Melotti rep...@bugs.python.org wrote: Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the report! --

[issue13286] PEP 3151 breaks backward compatibility: it should be documented

2011-10-28 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: The following example works on Python 2.7 and 3.2, but fails on Python 3.3: --- import errno import os try: os.rmdir(testdir) except: pass os.mkdir(testdir) try: try: os.mkdir(testdir) except

[issue13286] PEP 3151 breaks backward compatibility: it should be documented

2011-10-28 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Why would you catch IOError after os.mkdir()? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13286 ___

[issue13285] signal module ignores external signal changes

2011-10-28 Thread Vilya Harvey
Vilya Harvey vilya.har...@gmail.com added the comment: Could it return an opaque wrapper object, rather than just the raw address? Something like: typedef struct _PyNativeSignalHandler { PyObject_HEAD sighandler_t handler_func; } PyNativeSignalHandler; where the type object doesn't expose

[issue13286] PEP 3151 breaks backward compatibility: it should be documented

2011-10-28 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The first example was extracted from Lib/importlib/_bootstrap.py. The code was maybe wrong, I don't know. Another example: -- import errno import os try: os.rmdir(testdir) except: pass os.mkdir(testdir)

[issue13224] Change str(class) to return only the class name

2011-10-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: [Guido] What's holding this up? - I haven’t updated the patch for function and module objects yet - I need to catch up with the python-ideas discussion - There is at least one strong argument against the idea (I’ll point it out on the ML)

[issue13238] Add shell command helpers to shutil module

2011-10-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: The custom formatter idea sounds brilliant. Can you test that auto-escaping of spaces works well with glob patterns? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13238

[issue13287] urllib.request exposes too many names

2011-10-28 Thread Florent Xicluna
New submission from Florent Xicluna florent.xicl...@gmail.com: len(dir()) 4 import urllib.request import * len(dir()) 88 In this list we find 14 modules: ['base64', 'collections', 'ssl', 'bisect', 'http', 're', 'email', 'socket', 'os', 'posixpath', 'hashlib', 'io', 'time', 'sys'] And many

[issue13287] urllib.request exposes too many names

2011-10-28 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13287 ___ ___ Python-bugs-list mailing

[issue13170] distutils2 test failures

2011-10-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: The remaining test (test_command_install_data.InstallDataTestCase.test_simple_run) was broken in r1152. This looks like a local revision number, which has no meaning outside of one specific repository. What is the changeset identifier? (see

[issue13238] Add shell command helpers to shutil module

2011-10-28 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: default - str + shutil.quote_ascii_whitespace !q - str + shlex.quote !u - unquoted (i.e. no conversion, str.format default behaviour) The default doesn't look very understandable to me. Why would you quote only some characters and not all

[issue13287] urllib.request exposes too many names

2011-10-28 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This is technically backward incompatible, so if we define an __all__ with most of these names, we are officially making them public, if we leave them out, from urllib.request import * will break for someone. You could argue that import *

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-10-28 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13241 ___ ___ Python-bugs-list mailing

[issue13287] urllib.request exposes too many names

2011-10-28 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Let's deprecate some of these (or add deprecation warnings) for upcoming release. But, doing from xxx import * is not a recommended way for any module, as we know that it stands to pollute the namespace with unneccesary functions/methods. I

[issue13257] Move importlib over to PEP 3151 exceptions

2011-10-28 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Florent inadvertently did this for me in rev 73169. -- resolution: - fixed stage: needs patch - status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13257

[issue13170] distutils2 test failures

2011-10-28 Thread David Barnett
David Barnett davidbarne...@gmail.com added the comment: The remaining test (test_command_install_data.InstallDataTestCase.test_simple_run) was broken in r1152. This looks like a local revision number, which has no meaning outside of one specific repository. What is the changeset

[issue13283] removal of two unused variable in locale.py

2011-10-28 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13283 ___

[issue13218] test_ssl failures on Debian/Ubuntu

2011-10-28 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: I can't test this on OS X 10.7 because of issue 13241 but it works fine on OS X 10.6. I'm going to go with the first diff (i.e. the non-sense changing version). I can't say why I favor that version but since you've both verified it works on

[issue13287] urllib.request exposes too many names

2011-10-28 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: We should only expose the names which are documented. The modules and the objects from urllib.parse don't need to be exposed in urllib.request. I suggest to apply this patch on 3.3 only. -- keywords: +patch stage: needs

[issue13283] removal of two unused variable in locale.py

2011-10-28 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: This patch looks good. Is it relevant for minor releases 2.7.3 and 3.2.3? I cannot confirm. -- nosy: +flox priority: normal - low versions: +Python 3.2, Python 3.3 ___ Python tracker

[issue13286] PEP 3151 breaks backward compatibility: it should be documented

2011-10-28 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13286 ___

[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2011-10-28 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- resolution: accepted - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6877 ___ ___ Python-bugs-list

[issue13218] test_ssl failures on Debian/Ubuntu

2011-10-28 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 3c225f938dae by Barry Warsaw in branch '2.7': - Issue #13218: Fix test_ssl failures on Debian/Ubuntu. http://hg.python.org/cpython/rev/3c225f938dae New changeset 415e2c998e18 by Barry Warsaw in branch '3.2': - Issue

[issue13288] SSL module doesn't allow access to cert issuer information

2011-10-28 Thread John Nagle
New submission from John Nagle na...@users.sourceforge.net: The SSL module still doesn't return much information from the certificate. SSLSocket.getpeercert only returns a few basic items about the certificate subject. You can't retrieve issuer information, and you can't get the extensions

  1   2   >