ANN: cssutils 0.9.8

2011-12-10 Thread c
what is it -- A Python package to parse and build CSS Cascading Style Sheets. (Not a renderer though!) about this release -- 0.9.8 is the latest stable release. main changes since last stable release 0.9.7 - Python 3 support. Sadly Python 2.4 support

Re: Obtaining user information

2011-12-10 Thread Cameron Simpson
On 10Dec2011 08:43, Hans Mulder han...@xs4all.nl wrote: | On 10/12/11 02:44:48, Tim Chase wrote: | Currently I can get the currently-logged-in-userid via getpass.getuser() | which would yield something like tchase. | | Is there a cross-platform way to get the full username (such as from the |

Re: Buffering of sys.stdout and sys.stderr in python3 (and documentation)

2011-12-10 Thread Geoff Bache
Hi Terry, The difference from 2.x should be in What's New in 3.0, except that the new i/o module is in 2.6, so it was not exactly new. The io module existed in 2.6, but it was not used by default for standard output and standard error. The only mention of this in What's New in 3.0 is in the

Re: Python 2 or 3

2011-12-10 Thread Enrico 'Henryx' Bianchi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steven D'Aprano wrote: RHEL supports Python 3, it just doesn't provide Python 3. True, but as you say later, the only method is to recompile. So, if I want to use Python 3 in a production environment like RHEL, I need: - A development

WeakValueDict and threadsafety

2011-12-10 Thread Darren Dale
I am using a WeakValueDict in a way that is nearly identical to the example at the end of http://docs.python.org/library/weakref.html?highlight=weakref#example , where an application can use objects IDs to retrieve objects that it has seen before. The IDs of the objects can then be used in other

Re: Obtaining user information

2011-12-10 Thread Tim Chase
On 12/10/11 01:37, Cameron Simpson wrote: On 09Dec2011 19:44, Tim Chasepython.l...@tim.thechases.com wrote: | Currently I can get the currently-logged-in-userid via | getpass.getuser() which would yield something like tchase. _If_ you're on a terminal. _And_ that's exactly what you want.

Re: I love the decorator in Python!!!

2011-12-10 Thread 88888 Dihedral
Just wrap the exec() to spawn for fun. -- http://mail.python.org/mailman/listinfo/python-list

Re: I love the decorator in Python!!!

2011-12-10 Thread 88888 Dihedral
Wrap functions to yield is somewhat like a sub-threading in Erlang. -- http://mail.python.org/mailman/listinfo/python-list

Re: WeakValueDict and threadsafety

2011-12-10 Thread Duncan Booth
Darren Dale dsdal...@gmail.com wrote: I'm concerned that this is not actually thread-safe. When I no longer hold strong references to an instance of data, at some point the garbage collector will kick in and remove that entry from my registry. How can I ensure the garbage collection process

Re: how to test attribute existence of feedparser objects

2011-12-10 Thread xDog Walker
On Thursday 2011 December 08 01:34, HansPeter wrote: Hi, While using the feedparser library for downloading RSS feeds some of the blog entries seem to have no title. File build\bdist.win32\egg\feedparser.py, line 382, in __getattr__ AttributeError: object has no attribute 'title' Is

Re: how to test attribute existence of feedparser objects

2011-12-10 Thread Steven D'Aprano
On Sat, 10 Dec 2011 09:19:31 -0800, xDog Walker wrote: Use standard Python dictionary functions such as has_key to test whether an element exists. Idiomatic Python code today no longer uses has_key. # Was: d.feed.has_key('title') # Now preferred 'title' in d.feed -- Steven --

Re: Multiprocessing bug, is information ever omitted from a traceback?

2011-12-10 Thread John Ladasky
On Dec 9, 9:00 pm, Terry Reedy tjre...@udel.edu wrote: On 12/9/2011 6:14 PM, John Ladasky wrote: http://groups.google.com/group/comp.lang.python/browse_frm/thread/751... I'm programming in Python 2.6 on Ubuntu Linux 10.10, if it matters. It might, as many bugs have been fixed since. Can

Re: WeakValueDict and threadsafety

2011-12-10 Thread Darren Dale
On Dec 10, 11:19 am, Duncan Booth duncan.bo...@invalid.invalid wrote: Darren Dale dsdal...@gmail.com wrote: I'm concerned that this is not actually thread-safe. When I no longer hold strong references to an instance of data, at some point the garbage collector will kick in and remove that

Re: Multiprocessing bug, is information ever omitted from a traceback?

2011-12-10 Thread Andrew Berg
On 12/10/2011 11:53 AM, John Ladasky wrote: Why did you specify Python 2.7.2, instead of the 2.7.6 version that is being offered to me by Ubuntu Software Center? Does it matter? There is no Python 2.7.6. I think you have it confused with the version 2.7.2-6. If I'm not mistaken, that appended 6

Re: WeakValueDict and threadsafety

2011-12-10 Thread 88888 Dihedral
On Sunday, December 11, 2011 1:56:38 AM UTC+8, Darren Dale wrote: On Dec 10, 11:19 am, Duncan Booth duncan.bo...@invalid.invalid wrote: Darren Dale dsda...@gmail.com wrote: I'm concerned that this is not actually thread-safe. When I no longer hold strong references to an instance of

Re: Multiprocessing bug, is information ever omitted from a traceback?

2011-12-10 Thread Chris Angelico
On Sun, Dec 11, 2011 at 5:38 AM, Andrew Berg bahamutzero8...@gmail.com wrote: On 12/10/2011 11:53 AM, John Ladasky wrote: Why did you specify Python 2.7.2, instead of the 2.7.6 version that is being offered to me by Ubuntu Software Center?  Does it matter? There is no Python 2.7.6. I think you

Re: Multiprocessing bug, is information ever omitted from a traceback?

2011-12-10 Thread John Ladasky
On Dec 10, 10:38 am, Andrew Berg bahamutzero8...@gmail.com wrote: On 12/10/2011 11:53 AM, John Ladasky wrote: Why did you specify Python 2.7.2, instead of the 2.7.6 version that is being offered to me by Ubuntu Software Center?  Does it matter? There is no Python 2.7.6. I think you have it

Re: WeakValueDict and threadsafety

2011-12-10 Thread Duncan Booth
Darren Dale dsdal...@gmail.com wrote: On Dec 10, 11:19 am, Duncan Booth duncan.bo...@invalid.invalid wrote: Darren Dale dsdal...@gmail.com wrote: def get_data(oid): with reglock: data = registry.get(oid, None) if data is None: data = make_data(oid)

Re: WeakValueDict and threadsafety

2011-12-10 Thread Darren Dale
On Dec 10, 2:09 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: Darren Dale dsdal...@gmail.com wrote: On Dec 10, 11:19 am, Duncan Booth duncan.bo...@invalid.invalid wrote: Darren Dale dsdal...@gmail.com wrote: def get_data(oid):     with reglock:         data = registry.get(oid,

Overriding a global

2011-12-10 Thread Roy Smith
I've got a code pattern I use a lot. In each module, I create a logger for the entire module and log to it all over: logger = logging.getLogger('my.module.name') class Foo: def function(self): logger.debug('stuff') logger.debug('other stuff') and so on. This works, but every

Re: Overriding a global

2011-12-10 Thread MRAB
On 10/12/2011 20:47, Roy Smith wrote: I've got a code pattern I use a lot. In each module, I create a logger for the entire module and log to it all over: logger = logging.getLogger('my.module.name') class Foo: def function(self): logger.debug('stuff') logger.debug('other

Re: Overriding a global

2011-12-10 Thread Roy Smith
MRAB pyt...@mrabarnett.plus.com wrote: or use 'globals': def function(self): logger = globals()['logger'].getChild('function') logger.debug('stuff') logger.debug('other stuff') Ah-ha! That's precisely what I was looking for. Much appreciated. --

Re: Misleading error message of the day

2011-12-10 Thread Lie Ryan
On 12/09/2011 03:57 PM, alex23 wrote: On Dec 9, 11:46 am, Lie Ryanlie.1...@gmail.com wrote: perhaps the one that talks about `a, a.foo = 1, 2` blowing up? Are you sure you're not confusing this with the recent thread on 'x = x.thing = 1'? Ah, yes I do --

Re: Multiprocessing bug, is information ever omitted from a traceback?

2011-12-10 Thread Terry Reedy
On 12/10/2011 2:02 PM, Chris Angelico wrote: There's a few differences between 2.6 and 2.7; not usually enough to be concerned about in daily use, but when dealing with weird issues, it helps to have the latest release. There are 2 issues. First, 2.7.2 has perhaps a couple hundred bug fixes

Re: order independent hash?

2011-12-10 Thread Lie Ryan
On 12/09/2011 10:27 PM, Steven D'Aprano wrote: On Thu, 08 Dec 2011 10:30:01 +0100, Hrvoje Niksic wrote: In a language like Python, the difference between O(1) and O(log n) is not the primary reason why programmers use dict; they use it because it's built-in, efficient compared to alternatives,

Re: Overriding a global

2011-12-10 Thread Terry Reedy
On 12/10/2011 3:47 PM, Roy Smith wrote: What I really want to do is: def function(self): Add a global statement to rebind a global name: global logger logger = logger.getChild('function') logger.debug('stuff') logger.debug('other stuff') which lets me not

Re: order independent hash?

2011-12-10 Thread Chris Angelico
On Sun, Dec 11, 2011 at 10:58 AM, Lie Ryan lie.1...@gmail.com wrote: On 12/09/2011 10:27 PM, Steven D'Aprano wrote: Except for people who needed dicts with tens of millions of items. who should be using a proper DBMS in any case. Not necessarily. Database usually implies disk-based and

Re: Overriding a global

2011-12-10 Thread Terry Reedy
On 12/10/2011 7:14 PM, Terry Reedy wrote: On 12/10/2011 3:47 PM, Roy Smith wrote: What I really want to do is: def function(self): Add a global statement to rebind a global name: global logger But I see that that is not what you want to do, which is to override the global name just

Re: order independent hash?

2011-12-10 Thread Lie Ryan
On 12/11/2011 11:17 AM, Chris Angelico wrote: On Sun, Dec 11, 2011 at 10:58 AM, Lie Ryanlie.1...@gmail.com wrote: On 12/09/2011 10:27 PM, Steven D'Aprano wrote: Except for people who needed dicts with tens of millions of items. who should be using a proper DBMS in any case. Not

Re: Dynamic variable creation from string

2011-12-10 Thread Nobody
On Fri, 09 Dec 2011 01:55:28 -0800, Massi wrote: Thank you all for your replies, first of all my Sum function was an example simplifying what I have to do in my real funciton. In general the D dictionary is complex, with a lot of keys, so I was searching for a quick method to access all the

[issue13453] Tests and network timeouts

2011-12-10 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13453 ___ ___ Python-bugs-list

Dict.update documentation bug

2011-12-10 Thread Gerrat Rickert
The current docstring for dict.update shows: help(dict.update) Help on method_descriptor: update(...) D.update(E, **F) - None. Update D from dict/iterable E and F. If E has a .keys() method, does: for k

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: To make sure we are on the same page, here is what I changed it to: https://github.com/jango/PC/blob/test/pc/pc.py - lines 47-50 commented out (init of PC class that initialises threads); - lines 64, 65, 77, 78 getLogger within the PC class

[issue13248] deprecated in 3.2, should be removed in 3.3

2011-12-10 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f82ebf9b3a52 by Florent Xicluna in branch 'default': Issue #13248: turn 3.2's PendingDeprecationWarning into 3.3's DeprecationWarning (cgi, importlib, nntplib, smtpd). http://hg.python.org/cpython/rev/f82ebf9b3a52

[issue13453] Tests and network timeouts

2011-12-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Wow, the error description (Non-recoverable failure in name resolution) is as useful as a Windows error message. Ok for the patch. -- ___ Python tracker rep...@bugs.python.org

[issue10408] Denser dicts and linear probing

2011-12-10 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: This paper might be of interest: http://www.siam.org/meetings/alenex05/papers/13gheileman.pdf Basically, it concludes that most of the time, there's no speedup to be gained from the increased cached locality incurred by linear probing

[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on x86 Ubuntu Shared 3.x

2011-12-10 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Here's a patch to help nail this down. -- Added file: http://bugs.python.org/file23896/debug_stuck.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11870

[issue13453] Tests and network timeouts

2011-12-10 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5ba1a22c8988 by Charles-François Natali in branch '2.7': Issue #13453: Catch EAI_FAIL in support.transient_internet. http://hg.python.org/cpython/rev/5ba1a22c8988 New changeset c998c6f5464b by Charles-François

[issue13502] Documentation for Event.wait return value is either wrong or incomplete

2011-12-10 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Thanks, here's a patch updated accordingly. -- Added file: http://bugs.python.org/file23897/event_wait_cleared-1.diff ___ Python tracker rep...@bugs.python.org

[issue13570] Expose faster unicode-ascii functions in the C-API

2011-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le 09/12/2011 22:12, Stefan Krah a écrit : The bottleneck in _decimal is (res is ascii): PyUnicode_FromString(res); PyUnicode_DecodeASCII(res) has the same performance. With this function ... static PyObject*

[issue13559] Use sendfile where possible in httplib

2011-12-10 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13559 ___ ___

[issue13453] Tests and network timeouts

2011-12-10 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: The test_poplib failures are likely due to this obvious race: def setUp(self): [...] threading.Thread(target=self.server, args=(self.evt,self.sock)).start() time.sleep(.1) [...] def server(self, evt, serv):

[issue13564] ftplib and sendfile()

2011-12-10 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13564 ___ ___

[issue13530] Docs for os.lseek neglect to mention what it returns

2011-12-10 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13530 ___ ___

[issue11886] test_time.test_tzset() fails on x86 FreeBSD 7.2 3.x: AEST timezone called EST

2011-12-10 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e37a7dc8944e by Victor Stinner in branch 'default': Issue #11886: Fix also test_time for the non-DST timezone name (EST/AEST) http://hg.python.org/cpython/rev/e37a7dc8944e --

[issue13569] multiprocessing module: Process.start() fails with EOFError: pickle.PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock

2011-12-10 Thread Nikita Pchelin
Nikita Pchelin nikita.pche...@gmail.com added the comment: (note these aren't threads, but processes) Fair enough, I should be more careful with terminology. Ok, can you try to move the getLogger call from _Producer.__init__ to, _Producer.run?, (same for _Consumer) Yes, that seems to work

[issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x

2011-12-10 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: http://www.python.org/dev/buildbot/all/builders/ARM%20Ubuntu%203.x/builds/143/steps/test/logs/stdio --- test test_curses crashed -- Traceback (most recent call last): File

[issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x

2011-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The compilation of the module failed for the same reason: building '_curses' extension gcc -pthread -fPIC -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes -DHAVE_NCURSESW=1 -I/usr/include/ncursesw -IInclude -I. -I./Include

[issue13453] Tests and network timeouts

2011-12-10 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: And I assume that the test_telnetlib failure on the OpenIndiana buildbot is due to a broken name resolution service, as in issue #11812. Here's a patch bumping the timeout to 60s, which should be enough to resolve localhost...

[issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x

2011-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The problem comes maybe from the name of a curses key, keyname(). PyInit__curses() gets the name of all keys (KEY_MIN..KEY_MAX). -- ___ Python tracker rep...@bugs.python.org

[issue13570] Expose faster unicode-ascii functions in the C-API

2011-12-10 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I prefer to not expose such function or someone will use it without understanding exactly how dangerous it is. OK. - I'm afraid that I made an error in the benchmarks, since I accidentally used a changed version of telco.py, namely:

[issue13502] Documentation for Event.wait return value is either wrong or incomplete

2011-12-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13502 ___ ___ Python-bugs-list

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13544 ___ ___

[issue13525] Tutorial: Example of Source Code Encoding triggers error

2011-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the detailed bug report. I thought the normalization performed by the codec lookup system would convert 'cp-1252' to 'cp1252' (its “real” name, i.e. the name of the module implementing the codec), but it does not. I’m +1 to

[issue13537] Namedtuple instances can't be pickled in a daemonized process

2011-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Confirmed (3.2): def func(): ... t = collections.namedtuple('t', 'a') ... instance = t(1) ... print(instance) ... return pickle.dumps(instance) func() t(a=1) Traceback (most recent call last): File stdin, line 1, in module

[issue13538] Docstring of str() and/or behavior

2011-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: A note in the docs (without note/warning directives, just a note) and maybe the docstring would be good. It should better explain that str has two uses: converting anything to a str (using __str__ or __repr__), decode buffer to str (with

[issue13538] Improve doc for str(bytesobject)

2011-12-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- title: Docstring of str() and/or behavior - Improve doc for str(bytesobject) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538 ___

[issue13521] Make dict.setdefault() atomic

2011-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: maniram: We try to keep bug reports focused on one thing, and we don’t generally collect votes (we prefer that people vote with patches, tests and messages with content—for example, saying exactly what “more robust” should be). Here I think

[issue13539] Return value missing in calendar.TimeEncoding.__enter__

2011-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Good catch. The code doesn’t break because there is a check for None later on (certainly because getlocale may return None, but here __enter__ always returns None). How did you find this? If you have a code snippet that reproduces the bug

[issue13540] Document the Action API in argparse

2011-12-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +bethard, eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___ ___

[issue13550] Rewrite logging hack of the threading module

2011-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: On #13550 I asked Guido about the Thing/_Thing function/class indirection and use of _Verbose; the reply: IIRC: The design started out this way because it predates new-style classes. When this was put in one couldn't subclass extension

[issue13551] pulldom doesn't populate DOM tree

2011-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: So, is there a code or documentation bug in any version? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13551 ___

[issue3786] _curses, _curses_panel _multiprocessing can't be build in 2.6b3 w/ SunStudio 12

2011-12-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3786 ___ ___ Python-bugs-list

[issue13557] exec of list comprehension fails on NameError

2011-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Would you like to make a doc patch? -- assignee: - docs@python components: +Documentation keywords: +easy nosy: +docs@python, eric.araujo resolution: invalid - stage: - needs patch versions: +Python 2.7, Python 3.3

[issue13559] Use sendfile where possible in httplib

2011-12-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13559 ___ ___ Python-bugs-list

[issue13561] os.listdir documentation should mention surrogateescape

2011-12-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo, haypo, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13561 ___ ___

[issue13562] Notes about module load path

2011-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the patch, I will make a few wording/markup editions if you don’t mind and post the edited version. -- nosy: +eric.araujo versions: +Python 3.3 -Python 2.6, Python 3.1 ___ Python tracker

[issue13564] ftplib and sendfile()

2011-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: deciding whether using sendfile() should probably be done silently (no explicit argument) As an optimization taking advantage from OS support, I think this should be automatic too. But if there are too many issues, then explicit argument

[issue13567] HTTPError interface changes / breaks depending on what was passed to constructor

2011-12-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo, ezio.melotti versions: -Python 2.6, Python 3.1, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13567 ___

[issue13515] Consistent documentation practices for security concerns and considerations

2011-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Note sure about icon vs. text (“Warning:”) vs. colors. I think an icon would be as scary as the current big color boxes. I like Ezio’s change + Antoine’s indenting suggestion. -- nosy: +eric.araujo

[issue13562] Notes about module load path

2011-12-10 Thread Nam Nguyen
Nam Nguyen bits...@gmail.com added the comment: That would be great. Thank you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13562 ___ ___

[issue13549] Incorrect nested list comprehension documentation

2011-12-10 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Having both is fine. I just noticed that the 3.2 docs are different[0], so I tried to merge them: 3.2 says: List comprehensions provide a concise way to create lists from sequences. Common applications are to make lists where each

[issue13549] Incorrect nested list comprehension documentation

2011-12-10 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: Added file: http://bugs.python.org/file23901/issue13549-3-py32.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13549 ___

[issue13515] Consistent documentation practices for security concerns and considerations

2011-12-10 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I think an icon would be as scary as the current big color boxes. Especially if I design it. Georg, is the patch ok if I add a bit of indentation as suggested by Antoine? -- ___ Python tracker

[issue13569] Loggers cannot be pickled

2011-12-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: One thing, however, that this would mean that I would have to declare logger in any method outside of __init__, like in shutdown() for example. If you only use the logger from the child process, you can declare and store it in the run()

[issue13569] Loggers cannot be pickled

2011-12-10 Thread Nikita Pchelin
Nikita Pchelin nikita.pche...@gmail.com added the comment: Fair enough. Thanks for help with investigating this issue! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13569 ___

[issue13515] Consistent documentation practices for security concerns and considerations

2011-12-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Note sure about icon vs. text (“Warning:”) vs. colors. I think an icon would be as scary as the current big color boxes. I like Ezio’s change + Antoine’s indenting suggestion. An icon will only be scary if you chopse a scary one. A warning

[issue13515] Consistent documentation practices for security concerns and considerations

2011-12-10 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I don't really like the combination of the left bar and the background color. What about making the left bar thicker, and leaving out the background color? -- ___ Python tracker

[issue13573] csv.writer uses str() for floats instead of repr()

2011-12-10 Thread Raymond Hettinger
New submission from Raymond Hettinger raymond.hettin...@gmail.com: The csv.writer needs a special case for floats to print them to full precision. See http://stackoverflow.com/a/8455313/1001643 In Py2.7, the csv.writer converts floats to strings using str(). This will store

[issue5689] Support xz compression in tarfile module

2011-12-10 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 899a8c7b2310 by Lars Gustäbel in branch 'default': Issue #5689: Add support for lzma compression to the tarfile module. http://hg.python.org/cpython/rev/899a8c7b2310 -- nosy: +python-dev

[issue5689] Support xz compression in tarfile module

2011-12-10 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de added the comment: Thanks for the review, guys! I can't close this issue yet because it depends on #6715. -- resolution: - fixed stage: needs patch - committed/rejected ___ Python tracker rep...@bugs.python.org

[issue13574] refresh example in doc for Extending and Embedding

2011-12-10 Thread Florent Xicluna
New submission from Florent Xicluna florent.xicl...@gmail.com: The example uses PyInstanceObject which is Python 2 only (old-style classes). http://docs.python.org/dev/extending/newtypes.html#weak-reference-support -- assignee: docs@python components: Documentation, Extension Modules

[issue5689] Support xz compression in tarfile module

2011-12-10 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Great stuff! I'll close this issue along with issue 6715 once the buildbot stuff is all sorted out. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5689

[issue13563] Make use of with statement in ftplib

2011-12-10 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 6cd736239b8a by Giampaolo Rodola' in branch 'default': fix #13563: make use of with statement in ftplib.py where needed http://hg.python.org/cpython/rev/6cd736239b8a -- nosy: +python-dev

[issue13563] Make use of with statement in ftplib

2011-12-10 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: That's why I nosyed you. Thanks. ;) -- assignee: - giampaolo.rodola components: +Library (Lib) keywords: +easy -patch resolution: - fixed status: open - closed ___ Python tracker

[issue13378] Change the variable nsmap from global to instance (xml.etree.ElementTree)

2011-12-10 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: Of course it's better to have someone else to review the patch. However in this case, I'm not sure it is a major feature. BTW, I noticed that effbot is currently marked as *inactive* maintainer

[issue13575] old style classes still alive

2011-12-10 Thread Florent Xicluna
New submission from Florent Xicluna florent.xicl...@gmail.com: there are still some leftovers of Python 2 old-style classes. See attached patch. -- components: Interpreter Core, Library (Lib) files: oldstyle_leftovers.diff keywords: patch messages: 149188 nosy: flox priority: low

[issue13575] old style classes still alive

2011-12-10 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: Off course the leftovers are mainly in comments and documentation. See also issue #13574. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13575

[issue13575] old style classes still alive

2011-12-10 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- priority: low - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13575 ___ ___

[issue8684] improvements to sched.py

2011-12-10 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Updated patch adding a synchronized argument to scheduler class and updating doc is in attachment. -- Added file: http://bugs.python.org/file23903/sched-thread-safe.patch ___ Python tracker

[issue8931] '#' has no affect with 'c' type

2011-12-10 Thread Torsten Landschoff
Torsten Landschoff t.landsch...@gmx.net added the comment: Attached patch makes Python throw an exception in the case above. It also adds a test case for that case. -- keywords: +patch nosy: +torsten Added file: http://bugs.python.org/file23904/issue_8931.diff

[issue13248] deprecated in 3.2, should be removed in 3.3

2011-12-10 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: I know it won't be committed as-is, but this is the patch with most of the deprecated things removed. I skipped all the modules where a veto has been pronounced explicitly. -- keywords: +patch Added file:

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-10 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Patch with tests. -- keywords: +patch nosy: +gruszczy Added file: http://bugs.python.org/file23906/13544.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13544

[issue13568] sqlite3 convert_date error with DATE type

2011-12-10 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: c.execute(insert into testdate values ('now')) This works, but you actually are putting string now into a field with DATE type. When conversion occurs after retrieving data, there is an error. Also if you use datetime() function

[issue13521] Make dict.setdefault() atomic

2011-12-10 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Eric, overload __hash__() and check that is only called once, while now would be called twice. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13521

[issue13575] old style classes still alive

2011-12-10 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Changes look good. -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13575 ___ ___

[issue13574] refresh example in doc for Extending and Embedding

2011-12-10 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13574 ___ ___ Python-bugs-list mailing list

[issue13505] Bytes objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-10 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: I don't really know that much about pickle, but Antoine mentioned that 'bytearray' works fine going from 3.2 to 2.7. Given that, can't we just compose 'bytes' with 'bytearray'? Something like: Python 3.3.0a0 (default:aab45b904141+, Dec 10

[issue11822] Improve disassembly to show embedded code objects

2011-12-10 Thread Torsten Landschoff
Torsten Landschoff t.landsch...@gmx.net added the comment: I offer the attached patch as a starting point to fulfill this feature request. The patch changes the output to insert the disassembly of local code objects on the referencing line. As that made the output unreadable to me, I added

[issue11822] Improve disassembly to show embedded code objects

2011-12-10 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Thank you :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11822 ___ ___

  1   2   >