lxml 3.0 final released - efficient XML and HTML processing with Python

2012-10-11 Thread Stefan Behnel
Hi everyone, it's been a while since the last stable release series appeared, so I'm proud to announce the final release of lxml 3.0. http://lxml.de/ http://pypi.python.org/pypi/lxml/3.0 In short, lxml is the most feature-rich and easy-to-use library for processing XML and HTML in the Python

Django training for beginners and advanced

2012-10-11 Thread Dr. Mike Mueller
Six Days of Django Training === There are still a couple of places in our Django courses next week. If you would like to get up to speed with Django, this course is for you: October 15-17, 2012 (Leipzig, Germany) Introduction to Django [1] If you already have solid

Re: Private methods

2012-10-11 Thread Dieter Maurer
alex23 wuwe...@gmail.com writes: On 10 Oct, 17:03, real-not-anti-spam-addr...@apple-juice.co.uk (D.M. Procida) wrote: It certainly makes it quick to build a class with the attributes I need, but it does make tracing logic sometimes a pain in the neck. I don't know what the alternative is

Re: Is `wsample` a proper name for a function like this?

2012-10-11 Thread Steven D'Aprano
On Wed, 10 Oct 2012 20:33:16 -0700, Satoru Logic wrote: I came across a function named `wsample` in a `utils` package of my workplace recently. The w in `wsample` stands for `weighted`, and it randomly selects an element from a container according to relative weights of all the elements.

Re: Is `wsample` a proper name for a function like this?

2012-10-11 Thread suzaku
On Thursday, October 11, 2012 2:29:37 PM UTC+8, Steven D'Aprano wrote: On Wed, 10 Oct 2012 20:33:16 -0700, Satoru Logic wrote: I came across a function named `wsample` in a `utils` package of my workplace recently. The w in `wsample` stands for `weighted`, and it randomly

Re: Generating C++ code

2012-10-11 Thread Etienne Robillard
On Wed, 10 Oct 2012 20:12:36 -0700 Tim Roberts t...@probo.com wrote: Jean-Michel Pichavant jeanmic...@sequans.com wrote: I'm trying to generate C++ code from an XML file. I'd like to use a template engine, which imo produce something readable and maintainable. My google search about this

for-loop on cmd-line

2012-10-11 Thread Gisle Vanem
Hello list. I'm a newbie when it comes to Python. I'm trying to turn this: def print_sys_path(): i = 0 for p in sys.path: print ('sys.path[%2d]: %s' % (i, p)) i += 1 into a one-line python command (in a .bat file): python -c import sys,os; i=0; for p in sys.path:

Re: for-loop on cmd-line

2012-10-11 Thread suzaku
According to the document (http://docs.python.org/using/cmdline.html#interface-options), When called with -c command, it executes the Python statement(s) given as command. Here command may contain multiple statements separated by newlines. Leading whitespace is significant in Python

Re: for-loop on cmd-line

2012-10-11 Thread Dave Angel
On 10/11/2012 07:24 AM, Gisle Vanem wrote: Hello list. I'm a newbie when it comes to Python. I'm trying to turn this: def print_sys_path(): i = 0 for p in sys.path: print ('sys.path[%2d]: %s' % (i, p)) i += 1 into a one-line python command (in a .bat file): python -c

Re: for-loop on cmd-line

2012-10-11 Thread D'Arcy J.M. Cain
On Thu, 11 Oct 2012 13:24:22 +0200 Gisle Vanem gva...@broadpark.no wrote: Hello list. I'm a newbie when it comes to Python. I'm trying to turn this: def print_sys_path(): i = 0 for p in sys.path: print ('sys.path[%2d]: %s' % (i, p)) i += 1 into a one-line python

Re: for-loop on cmd-line

2012-10-11 Thread Chris Angelico
On Thu, Oct 11, 2012 at 11:16 PM, D'Arcy J.M. Cain da...@druid.net wrote: On Thu, 11 Oct 2012 13:24:22 +0200 Gisle Vanem gva...@broadpark.no wrote: Hello list. I'm a newbie when it comes to Python. I'm trying to turn this: def print_sys_path(): i = 0 for p in sys.path:

Re: for-loop on cmd-line

2012-10-11 Thread Ramchandra Apte
On Thursday, 11 October 2012 18:44:44 UTC+5:30, Chris Angelico wrote: On Thu, Oct 11, 2012 at 11:16 PM, D'Arcy J.M. Cain da...@druid.net wrote: On Thu, 11 Oct 2012 13:24:22 +0200 Gisle Vanem gva...@broadpark.no wrote: Hello list. I'm a newbie when it comes to Python. I'm

Re: for-loop on cmd-line

2012-10-11 Thread Chris Angelico
On Fri, Oct 12, 2012 at 12:16 AM, Ramchandra Apte maniandra...@gmail.com wrote: What about the Power in PowerShell? What about it? Are you suggesting that the OP use it? Are you saying that Windows batch already includes it? You quoted my entire post (double-spaced), but that context adds

Re: [ANN] pylint 0.26 / logilab-astng 0.24.1

2012-10-11 Thread Ramchandra Apte
On Monday, 8 October 2012 19:50:18 UTC+5:30, Sylvain Thénault wrote: Hi all, I'm very pleased to announce new releases of Pylint and underlying ASTNG library, respectivly 0.26 and 0.24.1. The great news is that both bring a lot of new features and some bug fixes, mostly provided

Re: for-loop on cmd-line

2012-10-11 Thread Gisle Vanem
Dave Angel d...@davea.name wrote: it has nothing to do with being on a command line. You're using semicolon to combine several statements, and there are restrictions on what can be combined that way. One restriction is the looping constructs, for, if, while. Ok, I suspected something like

__builtins__ thread-safe / __builtins__ as function?

2012-10-11 Thread Juergen Bartholomae
Hello. I have quite a peculiar problem. A little overview of our situation: Our program enables our users to write their own python code (which they use extensively). Unfortunately, (due to us actually encouraging this in an earlier release (!stupid!)) this meant that, in several cases, there are

Re: [Python-ideas] Make undefined escape sequences have SyntaxWarnings

2012-10-11 Thread MRAB
On 2012-10-11 06:34, Greg Ewing wrote: Steven D'Aprano wrote: If you escape a character, you should get something. If it's a special character, you get the special meaning. If it's not, escaping should be transparent: escaping something that doesn't need escaping is a null op I think that

Re: __builtins__ thread-safe / __builtins__ as function?

2012-10-11 Thread Chris Angelico
On Fri, Oct 12, 2012 at 1:16 AM, Juergen Bartholomae bartholomae.juer...@googlemail.com wrote: One possible solution is to somehow redirect every __builtins__ to a function that returns a different __builtins__ dictionary for each thread (such a function already exists). How exactly does the

Re: Getting ipython notebook to plot inline [updated]

2012-10-11 Thread Frank Franklin
Ok, so just to add to this, there is no problem plotting when I used the following command in my terminal to start the notebook: ipython notebook The only problem is that this plots my figures outside of the notebook page, and I really want to get everything into the notebook, since that's

Re: for-loop on cmd-line

2012-10-11 Thread wxjmfauth
Le jeudi 11 octobre 2012 15:16:33 UTC+2, Ramchandra Apte a écrit : PS C:\ $cmd=import sys; PS C:\ $cmd+=print('\n'.join(sys.path)) PS C:\ $cmd import sys;print('\n'.join(sys.path)) PS C:\ c:\python32\python -c $cmd C:\Windows\system32\python32.zip c:\python32\DLLs c:\python32\lib c:\python32

Re: for-loop on cmd-line

2012-10-11 Thread Chris Angelico
On Fri, Oct 12, 2012 at 3:24 AM, wxjmfa...@gmail.com wrote: Le jeudi 11 octobre 2012 15:16:33 UTC+2, Ramchandra Apte a écrit : PS C:\ $cmd=import sys; PS C:\ $cmd+=print('\n'.join(sys.path)) PS C:\ $cmd import sys;print('\n'.join(sys.path)) PS C:\ c:\python32\python -c $cmd

Re: for-loop on cmd-line

2012-10-11 Thread Gisle Vanem
wxjmfa...@gmail.com wrote in comp.lang.python (my ISP no longer updates this group. Last message is from 8. April. Does the postings to the python mailing-list automatically get reposted to comp.lang.python?) C:\Windows\system32\python32.zip c:\python32\DLLs I see a similar result:

Re: for-loop on cmd-line

2012-10-11 Thread Chris Angelico
On Fri, Oct 12, 2012 at 3:49 AM, Gisle Vanem gva...@broadpark.no wrote: wxjmfa...@gmail.com wrote in comp.lang.python (my ISP no longer updates this group. Last message is from 8. April. Does the postings to the python mailing-list automatically get reposted to comp.lang.python?) Yes, c.l.p

Static analysis tools

2012-10-11 Thread Dan Stromberg
I'm familiar with pylint, and have recently played with pyflakes and flake8. I've also heard of pychecker. Are there others, perhaps including some that aren't written in Python, but still check Python? We're considering doing static analysis of a large CPython 3.2 project, but so far the

Re: Static analysis tools

2012-10-11 Thread Mark Lawrence
On 11/10/2012 18:25, Dan Stromberg wrote: I'm familiar with pylint, and have recently played with pyflakes and flake8. I've also heard of pychecker. Are there others, perhaps including some that aren't written in Python, but still check Python? We're considering doing static analysis of a

RE: for-loop on cmd-line

2012-10-11 Thread Prasad, Ramit
Chris Angelico wrote: On Fri, Oct 12, 2012 at 3:49 AM, Gisle Vanem gva...@broadpark.no wrote: wxjmfa...@gmail.com wrote in comp.lang.python (my ISP no longer updates this group. Last message is from 8. April. Does the postings to the python mailing-list automatically get reposted to

Re: __builtins__ thread-safe / __builtins__ as function?

2012-10-11 Thread Dave Angel
On 10/11/2012 10:16 AM, Juergen Bartholomae wrote: Hello. I have quite a peculiar problem. A little overview of our situation: Our program enables our users to write their own python code (which they use extensively). Unfortunately, (due to us actually encouraging this in an earlier release

Re: for-loop on cmd-line

2012-10-11 Thread Dave Angel
On 10/11/2012 09:40 AM, Gisle Vanem wrote: Dave Angel d...@davea.name wrote: it has nothing to do with being on a command line. You're using semicolon to combine several statements, and there are restrictions on what can be combined that way. One restriction is the looping constructs, for,

__setitem__ without position

2012-10-11 Thread Kevin Anthony
I have a class that contains a list of items I can set items using __setitem__ but if i want to set the while list, i changes the variable from a myclass to a list. How can i accomblish this Example C = myclass() C[0] = 57 type(C) myclass C = [57,58,59,60] type(C) list --

Re: for-loop on cmd-line

2012-10-11 Thread Gisle Vanem
Dave Angel d...@davea.name wrote: Why would you write some C-program just to save having two separate files, one batch and one for the script? For that matter, several answers have given you approaches that didn't involve list comprehensions, including merging the two in a single file, using

Re: __setitem__ without position

2012-10-11 Thread Dave Angel
On 10/11/2012 04:48 PM, Kevin Anthony wrote: I have a class that contains a list of items I can set items using __setitem__ but if i want to set the while list, i changes the variable from a myclass to a list. How can i accomblish this Example C = myclass() C[0] = 57 type(C) myclass C =

Re: an error in python lib?

2012-10-11 Thread Wenhua Zhao
On Wed, Oct 10, 2012 at 6:18 AM, Ulrich Eckhardt The comment clearly states owned by current thread, not owned by any thread. The latter would also be useless, as that can change concurrently at any time when owned by a different thread, so making decisions on this state is futile. Agree.

Re: __setitem__ without position

2012-10-11 Thread Kevin Anthony
I'm not supprised... and understand why it's happening. I'm asking how to get around it. Basically i'm asking how to override, if i can, the `=` On Thu, Oct 11, 2012 at 5:32 PM, Dave Angel d...@davea.name wrote: On 10/11/2012 04:48 PM, Kevin Anthony wrote: I have a class that contains a

Re: Insert item before each element of a list

2012-10-11 Thread Hans Mulder
On 9/10/12 04:39:28, rusi wrote: On Oct 9, 7:34 am, rusi rustompm...@gmail.com wrote: How about a 2-paren version? x = [1,2,3] reduce(operator.add, [['insert', a] for a in x]) ['insert', 1, 'insert', 2, 'insert', 3] Or if one prefers the different parens on the other side:

Re: __setitem__ without position

2012-10-11 Thread Ian Kelly
On Thu, Oct 11, 2012 at 4:13 PM, Kevin Anthony kevin.s.anth...@gmail.com wrote: I'm not supprised... and understand why it's happening. I'm asking how to get around it. Basically i'm asking how to override, if i can, the `=` You cannot override assignment of local variables. To get around

Posix call (execve) breaks mercurial?

2012-10-11 Thread Wayne Werner
So... this is certainly the deepest I've got to dig into any source code. I'm experimenting with Review Board for code reviews, and trying to get it set up/working here at work. When using post-review, however, I started getting issues with untrusted users - even though they were set to

Re: Posix call (execve) breaks mercurial?

2012-10-11 Thread Wayne Werner
On Thu, 11 Oct 2012, Wayne Werner wrote: So here's where things got weird. I could call `subprocess.check_output(['hg', 'root'])`, and things worked just fine. But when I added the env parameter, I got the untrusted issues. So if I did: import os, subprocess # Works just fine

Re: Insert item before each element of a list

2012-10-11 Thread Terry Reedy
On 10/11/2012 6:21 PM, Hans Mulder wrote: On 9/10/12 04:39:28, rusi wrote: On Oct 9, 7:34 am, rusi rustompm...@gmail.com wrote: How about a 2-paren version? x = [1,2,3] reduce(operator.add, [['insert', a] for a in x]) ['insert', 1, 'insert', 2, 'insert', 3] Or if one prefers the

Re: __setitem__ without position

2012-10-11 Thread Terry Reedy
On 10/11/2012 5:32 PM, Dave Angel wrote: Alternatively, you could call one of the other methods in the class. But since you gave us no clues, I'm shouldn't guess what it was called. But if I were to make such a class, I might use slicing: C[:] = [57, 50, 59, 60] In 3.x, you would write

Re: __setitem__ without position

2012-10-11 Thread Ethan Furman
Kevin Anthony wrote: I'm not supprised... and understand why it's happening. I'm asking how to get around it. I don't think you do understand what's happening. What's happening is the basic application of name binding in Python: -- C = anything whatever C was bound to before, it no longer

Re: Insert item before each element of a list

2012-10-11 Thread Steven D'Aprano
On Fri, 12 Oct 2012 00:21:57 +0200, Hans Mulder wrote: On 9/10/12 04:39:28, rusi wrote: On Oct 9, 7:34 am, rusi rustompm...@gmail.com wrote: How about a 2-paren version? x = [1,2,3] reduce(operator.add, [['insert', a] for a in x]) ['insert', 1, 'insert', 2, 'insert', 3] Or if one

Re: Is `wsample` a proper name for a function like this?

2012-10-11 Thread Steven D'Aprano
On Wed, 10 Oct 2012 23:44:42 -0700, suzaku wrote: I think if a programmer has used the built-in `random` module before, he would expect a function with sample in its name to return a population sequence. I have used the random module for about fifteen years, and I still write random.sample

Re: Is `wsample` a proper name for a function like this?

2012-10-11 Thread suzaku
On Friday, October 12, 2012 10:22:16 AM UTC+8, Steven D'Aprano wrote: On Wed, 10 Oct 2012 23:44:42 -0700, suzaku wrote: I think if a programmer has used the built-in `random` module before, he would expect a function with sample in its name to return a population sequence.

Re: Static analysis tools

2012-10-11 Thread Tim Leslie
On 12 October 2012 04:25, Dan Stromberg drsali...@gmail.com wrote: I'm familiar with pylint, and have recently played with pyflakes and flake8. I've also heard of pychecker. Are there others, perhaps including some that aren't written in Python, but still check Python? Another one I've

AI Example Help

2012-10-11 Thread Trevor Nelson
Hello all, For the first time in well... a very long time I am coming to a loss on where to really get started here on the project I wish to undertake to help me really get into Python programming. A quick explanation of how I learn. I learn best with example working small code bits. With the

[issue16088] http.server's send_error could set the content-length of the error body

2012-10-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset ee34cb049a10 by Senthil Kumaran in branch 'default': Issue #16088: BaseHTTPRequestHandler's send_error method includes a http://hg.python.org/cpython/rev/ee34cb049a10 -- nosy: +python-dev ___ Python

[issue16088] http.server's send_error could set the content-length of the error body

2012-10-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: I took the privilege of testing, adding news and docs and committing it. Thank you! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue16192] ctypes - documentation example

2012-10-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Perhaps if some machines expect otherwise that should be documented, otherwise might we change them. The very beginning of the ctypes documentation has documentation to that effect: Note: Some code samples reference the ctypes c_int type. This type is an

[issue16192] ctypes - documentation example

2012-10-11 Thread Brian Thorne
Brian Thorne added the comment: The very beginning of the ctypes documentation has documentation to that effect Does that address your suggestion? Thanks Chris, that explains why the difference is present on non 32 bit platforms. Would using c_long for the examples produce the expected

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2012-10-11 Thread Yongzhi Pan
Changes by Yongzhi Pan fossi...@users.sourceforge.net: -- nosy: +fossilet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4749 ___ ___

[issue16192] ctypes - documentation example

2012-10-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: I don't know off-hand. But maybe an additional note or code comment at the first instance in a code example would help. Switching the examples to c_long might serve only to shift potential confusion from the examples to someone's personal machine.

[issue16190] Misleading warning in random module docs

2012-10-11 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: docs@python - rhettinger components: +Documentation nosy: +rhettinger priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16190

[issue13440] Explain the status quo wins a stalemate principle in the devguide

2012-10-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: I'll say it again, the devguide should be short enough to be practical for someone learning to contribute. Better organization could help here. I could see the devguide being a combination of (1) a brief document meant to be read cover to cover that

[issue8492] Addition to readline module to get dictionary of keystrokes and commands

2012-10-11 Thread anand jeyahar
Changes by anand jeyahar anand.jeya...@gmail.com: -- nosy: +anand.jeyahar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8492 ___ ___

[issue16061] performance regression in string replace for 3.3

2012-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I compared performances of the two methods: dummy loop vs find. You can hybridize them. First just compare chars and if not match then use memcmp(). This speed up the case of repeated chars. -- Added file:

[issue13440] Explain the status quo wins a stalemate principle in the devguide

2012-10-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Would this be the appropriate place for the links to the two essays: Personally, I would start out with a question in the FAQ. It could be called something like, When is a change to Python justified? and go after or in the same section as the question,

[issue8492] Addition to readline module to get dictionary of keystrokes and commands

2012-10-11 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8492 ___ ___ Python-bugs-list

[issue14799] Tkinter ttk tests hang on linux

2012-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: $ ./python -m test.regrtest -u gui test_ttk_guionly For me (on 32-bit Ubuntu 10.04, Tk 8.5) it failed: test test_ttk_guionly failed -- Traceback (most recent call last): File /home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py, line 579, in

[issue14799] Tkinter ttk tests hang on linux

2012-10-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: For me it still fails. I use Ubuntu 12.04, 11.10 was failed also IIRC. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14799 ___

[issue16190] Misleading warning in random module docs

2012-10-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, haypo stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16190 ___

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Václav Šmilauer
New submission from Václav Šmilauer: I have several compiled modules linked into one .so file and import them using imp.load_dynamic. Only the first module imported with load_dynamic is imported properly, all subsequent calls of load_dynamic on the same file ignore the first argument (name)

[issue16193] display full e-mail name in hg.python.org annotate pages

2012-10-11 Thread Ezio Melotti
Ezio Melotti added the comment: I don't think it's necessary to have the full email name for each line. The current format already allows you to distinguish users and reversions. If you need more information you can click on it and look at the changeset info. There might be problems if two

[issue16186] shlex bug?

2012-10-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Library (Lib) nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16186 ___

[issue1043134] Add preferred extensions for MIME types

2012-10-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti versions: +Python 3.4 -Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1043134 ___

[issue15114] Deprecate strict mode of HTMLParser

2012-10-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file27528/issue15114-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15114 ___

[issue15939] make *.rst files in Doc/ parseable by doctest

2012-10-11 Thread Ezio Melotti
Ezio Melotti added the comment: If they don't work I see no reasons to leave them there. Either there's another way to run those tests on selected platforms that can be used instead, of if there's no way the tests should just be skipped. -- ___

[issue8402] glob returns empty list with [ character in the folder name

2012-10-11 Thread a1abhishek
a1abhishek added the comment: i m agree with answer number 6. the resolution mentioned is quite easy and very effectve thanks http://www.packersmoversdirectory.net/ -- nosy: +a1abhishek ___ Python tracker rep...@bugs.python.org

[issue16190] Misleading warning in random module docs

2012-10-11 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #15213 (and the issue #12754). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16190 ___ ___

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Brett Cannon
Brett Cannon added the comment: Did this actually work in a previous version of Python, and if so what version? -- nosy: +brett.cannon status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16194

[issue13440] Explain the status quo wins a stalemate principle in the devguide

2012-10-11 Thread Nick Coghlan
Nick Coghlan added the comment: I'd suggest two things: Clearly separate Essential Reading and Additional Resources headings on the main page. Add Tips Tricks and Design Philosophy sections somewhere. -- ___ Python tracker rep...@bugs.python.org

[issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types

2012-10-11 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone: There appears to be very little, if any, documentation about how to handle the list at tp_weaklistoffset for types supporting being weak referenced, particularly with respect to garbage collection. Who owns the list? Who owns the objects in the list?

[issue16196] Typo in devguide stdlibchanges.html

2012-10-11 Thread Mike Hoy
New submission from Mike Hoy: Typo in: http://docs.python.org/devguide/stdlibchanges.html#adding-to-the-stdlib Reads: This document it meant to explain... Should read: This document is meant to explain... -- components: Devguide messages: 172640 nosy: ezio.melotti, mikehoy priority:

[issue1634774] locale 1251 does not convert to upper case properly

2012-10-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1634774 ___ ___

[issue1634774] locale 1251 does not convert to upper case properly

2012-10-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Interpreter Core -Library (Lib) versions: +Python 2.7 -Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1634774

[issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types

2012-10-11 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16195 ___ ___

[issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types

2012-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think Cython is wrong here. The only thing to do is to call PyObject_ClearWeakRefs() in the deallocator. Everything else is handled by the interpreter. Agreed improving the documentation would be good. -- nosy: +pitrou, scoder stage: - needs patch

[issue15939] make *.rst files in Doc/ parseable by doctest

2012-10-11 Thread Ezio Melotti
Ezio Melotti added the comment: The attached patch fixes the doctests in Doc/library/ctypes.rst. -- stage: - patch review versions: +Python 3.4 Added file: http://bugs.python.org/file27529/issue15939-ctypes.diff ___ Python tracker

[issue16196] Typo in devguide stdlibchanges.html

2012-10-11 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in 291342c08dd6. Thanks for the report! -- assignee: - ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed type: - enhancement ___ Python tracker rep...@bugs.python.org

[issue15650] PEP 3121, 384 refactoring applied to dbm module

2012-10-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: Robin, after thinking I would to agree with your decision to hold reference to type into type instance. Please, can you describe your check like: if((void *)type-tp_dealloc == (void *)dbm_dealloc) { Py_DECREF(type); } Why you decref only if

[issue16178] atexit._run_exitfuncs should be a public API

2012-10-11 Thread Philip Mountifield
Changes by Philip Mountifield phi...@mountifield.org: -- nosy: +Philip.Mountifield ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16178 ___ ___

[issue1634034] Show expected token on syntax error

2012-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm attaching a new version of the patch, based on Dave's (from 2.5 years ago). This patch is against the 3.4. Previous patches contained an error in the message formatting. buf variable out of scope before msg used. Appending '\0' to the format string

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Václav Šmilauer
Václav Šmilauer added the comment: I tried with python 2.4.5 and 2.5.2 in chroot (using ubuntu hardy, which packaged both of them) and the result is exactly the same for both. I doubt I am able to install anything older in a sensible manner. -- status: pending - open

[issue9720] zipfile writes incorrect local file header for large files in zip64

2012-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What the conclusion about the patches? Which variant I should backport for older versions? -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9720

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread R. David Murray
R. David Murray added the comment: This is an enhancement request, then. -- nosy: +r.david.murray stage: - needs patch type: behavior - enhancement versions: +Python 3.4 -Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Václav Šmilauer
Václav Šmilauer added the comment: No, it is an old bug, since the behavior does something else than documented (http://docs.python.org/library/imp.html#imp.load_dynamic) and reasonably expected -- imp.load_dynamic(baz,foo.so) imports the foo module under some circumstances. -- type:

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Brett Cannon
Brett Cannon added the comment: It's actually a documentation bug. -- assignee: - docs@python components: +Documentation -Library (Lib) keywords: +easy nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16194

[issue9720] zipfile writes incorrect local file header for large files in zip64

2012-10-11 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'd write the extended header when the current file size is larger than the zip64 limit (that is, when 'st.st_size ZIP64_LIMIT' in the write method. That way the minimal header size is used whenever possible. As you noted this can cause problems when the

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Václav Šmilauer
Václav Šmilauer added the comment: While I understand that this behavior went unnoticed for ages and can be seen therefore as unimportant, designating this as documentation bug is quite absurd; perhaps the following wording would be appropriate: .. note:: If this function is called

[issue15452] Improve the security model for logging listener()

2012-10-11 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- hgrepos: +154 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15452 ___ ___ Python-bugs-list

[issue15452] Improve the security model for logging listener()

2012-10-11 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- keywords: +patch Added file: http://bugs.python.org/file27531/3d0ca1e82c46.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15452 ___

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Brett Cannon
Brett Cannon added the comment: Before this gets out of control I want to clarify that it is not quite absurd to label this a documentation bug and that is the proper classification for this bug. The documentation was not clear enough for you to understand what the behavior would be, so it

[issue16197] Several small errors in winreg documentation

2012-10-11 Thread Zachary Ware
New submission from Zachary Ware: There are several small inconsistencies in the winreg module documentation (docstrings and winreg.rst). Mostly these are discrepancies between res and reserved, sam and access, and whether or not those two are keyword arguments, but there are some other

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Václav Šmilauer
Václav Šmilauer added the comment: I found the cause of the behavior (perhaps it is common knowledge, but I am new to python source); imp.load_dynamic calls the following functions Python/import.c: imp_load_dynamic (http://hg.python.org/cpython/file/ad51ed93377c/Python/import.c#l1777)

[issue16197] Several small errors in winreg documentation

2012-10-11 Thread Brian Curtin
Brian Curtin added the comment: The patch looks alright, but I would remove the lining up of definitions. It's probably easiest to do a patch against 3.2 and I can handle the porting on commit. -- assignee: docs@python - brian.curtin components: +Windows type: - behavior

[issue15776] Allow pyvenv to work in existing directory

2012-10-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset c3c188a0325a by Vinay Sajip in branch 'default': Closes #15776: pyvenv now works with existing directories. http://hg.python.org/cpython/rev/c3c188a0325a -- resolution: - fixed stage: patch review - committed/rejected status: open - closed

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Václav Šmilauer
Václav Šmilauer added the comment: I did not notice it was not documented in python 3.3 anymore -- my fault, sorry. In case there is no functional replacement for it, I will try to raise it on the ML. I am currently writing some code in 2.7 which relies on it (I don't see another way of

[issue15776] Allow pyvenv to work in existing directory

2012-10-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: Looks good. Thank you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15776 ___ ___ Python-bugs-list mailing

[issue16197] Several small errors in winreg documentation

2012-10-11 Thread Zachary Ware
Zachary Ware added the comment: Okie doke. I'll try to have a patch ready for review later this afternoon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16197 ___

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-11 Thread Brett Cannon
Brett Cannon added the comment: The new functional equivalent is importlib.machinery.ExtensionFileLoader (http://docs.python.org/dev/py3k/library/importlib.html#importlib.machinery.ExtensionFileLoader), but underneath the hood it uses the same code as imp.load_dynamic() did. --

[issue16198] IDLE - tabbing in a string always brings up file completion window

2012-10-11 Thread Roger Serwy
New submission from Roger Serwy: Pressing Tab while the cursor is in a string will bring up the file completion dialog rather than inserting a tab (or 4 spaces). This behavior is rather annoying in a text editor especially when editing multiline doc strings. This behavior is new to the 3.3

  1   2   >