Karlsruhe (Germany) Python User Group, October 19th 2012, 7pm

2012-10-12 Thread Jürgen A . Erhard
The Karlsruhe Python User Group (KaPy) meets again. Friday, 2012-10-19 (October 19th) at 19:00 (7pm) in the rooms of Entropia eV (the local affiliate of the CCC). See http://entropia.de/wiki/Anfahrt on how to get there. For your calendars: meetings are held monthly, on the 3rd Friday. There's

Re: AI Example Help

2012-10-12 Thread Chris Angelico
On Fri, Oct 12, 2012 at 4:44 PM, Trevor Nelson blindph...@gmail.com wrote: I really would truely appreciate and example coding of how to put together an initial basic AI bot where it can monitor the system and tell me alerts as with being able to query it for questions. As with I am looking

Re: AI Example Help

2012-10-12 Thread Trevor Nelson
An interesting concept. AI monitoring systems have never really appealed to me; I personally prefer something with simpler and clearer rules (eg if server load exceeds 3.0, raise an alert), coupled with information retrieval commands that read like commands, not natural English.

Re: an error in python lib?

2012-10-12 Thread Ulrich Eckhardt
Am 12.10.2012 00:06, schrieb Wenhua Zhao: On Wed, Oct 10, 2012 at 12:21 PM, Ian Kelly ian.g.ke...@gmail.com wrote: Can you demonstrate an API bug that is caused by this? A simple demo of this error is: [...] print in main cv._is_owned: , cv._is_owned() That is kind of cheating,

scipy and numpy for Python3

2012-10-12 Thread chip9munk
Hello! I am an absolute beginner in this. Does anyone know hot to build scipy for python 3? here: http://scipy.org/Installing_SciPy/Windows it says that it was not yet tested... (?) any help is appreciated! any additional help for numpy is also welcome! Thanx in advance! --

serialization and versioning

2012-10-12 Thread Neal Becker
I wonder if there is a recommended approach to handle this issue. Suppose objects of a class C are serialized using python standard pickling. Later, suppose class C is changed, perhaps by adding a data member and a new constructor argument. It would see the pickling protocol does not directly

Re: scipy and numpy for Python3

2012-10-12 Thread chip9munk
ok, i have solved it by the help from the previously mentioned page. python 3.2 should be used, 3.3 has issues with building numpy and scipy. -- http://mail.python.org/mailman/listinfo/python-list

Re: serialization and versioning

2012-10-12 Thread Etienne Robillard
On Fri, 12 Oct 2012 06:42:03 -0400 Neal Becker ndbeck...@gmail.com wrote: I wonder if there is a recommended approach to handle this issue. Suppose objects of a class C are serialized using python standard pickling. Later, suppose class C is changed, perhaps by adding a data member and a

deque and thread-safety

2012-10-12 Thread Christophe Vandeplas
Hello, I have a question about deque and thread-safety. My application has multiple threads running concurrently and doing the same action (downloading pages) To know what has already been downloaded I created the variable: seen = deque('', 1000) (keeps list of max 1000 urls in memory) In

Re: serialization and versioning

2012-10-12 Thread Neal Becker
Etienne Robillard wrote: On Fri, 12 Oct 2012 06:42:03 -0400 Neal Becker ndbeck...@gmail.com wrote: I wonder if there is a recommended approach to handle this issue. Suppose objects of a class C are serialized using python standard pickling. Later, suppose class C is changed, perhaps by

Re: deque and thread-safety

2012-10-12 Thread Christophe Vandeplas
Ok sorry for the mail, I found the solution by using deque.count(url) that's available starting from python 2.7 On Fri, Oct 12, 2012 at 2:40 PM, Christophe Vandeplas christo...@vandeplas.com wrote: Hello, I have a question about deque and thread-safety. My application has multiple threads

Re: serialization and versioning

2012-10-12 Thread Robert Kern
On 10/12/12 11:42 AM, Neal Becker wrote: I wonder if there is a recommended approach to handle this issue. Suppose objects of a class C are serialized using python standard pickling. Later, suppose class C is changed, perhaps by adding a data member and a new constructor argument. It would see

Re: Posix call (execve) breaks mercurial?

2012-10-12 Thread Antoine Pitrou
Hello, Wayne Werner wayne at waynewerner.com writes: So... curiouser and curiouser - it looks like it's not *actually* execve's fault after all. I just compiled the code from the man page, tweaked it to run 'hg root', and passed it a new environment. No problems. Well, then I manually

Re: deque and thread-safety

2012-10-12 Thread Antoine Pitrou
Hello, Christophe Vandeplas christophe at vandeplas.com writes: From the documentation I understand that deques are thread-safe: Deques are a generalization of stacks and queues (the name is pronounced “deck” and is short for “double-ended queue”). Deques support thread-safe, memory

Basic JSON question: Do I really need the quotes

2012-10-12 Thread moogyd
Hi, I need to define some configuration in a file that will be manually created. Internally, the data will be stored as a dict, which contains various properties related to a design e.g. Design Name, dependencies, lists of files (and associated libraries). json seemed a quick an easy way of

Re: Basic JSON question: Do I really need the quotes

2012-10-12 Thread Kwpolska
On Fri, Oct 12, 2012 at 4:09 PM, moo...@yahoo.co.uk wrote: Hi, I need to define some configuration in a file that will be manually created. Internally, the data will be stored as a dict, which contains various properties related to a design e.g. Design Name, dependencies, lists of files

Checking for dlls in ctypes

2012-10-12 Thread Wanderer
I'm trying to write some code that will load one of three dll depending on the one available. I've tried the code below, but it doesn't work. The try except doesn't catch the exception. Is there a way to do this? try: self.dll = windll.pvcam64 except:

Re: __setitem__ without position

2012-10-12 Thread Ethan Furman
Terry Reedy wrote: In 3.x, you would write __setitem__ to recognize that the 'key' is a slice object rather than an int and act accordingly. (In 2.x, you would write __setslice__.) I'm not sure how far back it goes, but at least from 2.4 forward __setitem__ works with slices just fine.

Re: Checking for dlls in ctypes

2012-10-12 Thread Dave Angel
On 10/12/2012 11:36 AM, Wanderer wrote: I'm trying to write some code that will load one of three dll depending on the one available. I've tried the code below, but it doesn't work. The try except doesn't catch the exception. Is there a way to do this? try: self.dll =

Re: __setitem__ without position

2012-10-12 Thread Peter Otten
Ethan Furman wrote: Terry Reedy wrote: In 3.x, you would write __setitem__ to recognize that the 'key' is a slice object rather than an int and act accordingly. (In 2.x, you would write __setslice__.) I'm not sure how far back it goes, but at least from 2.4 forward __setitem__ works with

Re: Checking for dlls in ctypes

2012-10-12 Thread MRAB
On 2012-10-12 16:36, Wanderer wrote: I'm trying to write some code that will load one of three dll depending on the one available. I've tried the code below, but it doesn't work. The try except doesn't catch the exception. Is there a way to do this? try: self.dll =

Re: Insert item before each element of a list

2012-10-12 Thread Joshua Landau
On 9 October 2012 13:55, Peter Otten __pete...@web.de wrote: Duncan Booth wrote: mooremath...@gmail.com wrote: What's the best way to accomplish this? Am I over-complicating it? My gut feeling is there is a better way than the following: import itertools x = [1, 2, 3] y =

Re: Basic JSON question: Do I really need the quotes

2012-10-12 Thread Roel Schroeven
moo...@yahoo.co.uk schreef: Hi, I need to define some configuration in a file that will be manually created. Internally, the data will be stored as a dict, which contains various properties related to a design e.g. Design Name, dependencies, lists of files (and associated libraries). json

Re: Checking for dlls in ctypes

2012-10-12 Thread Wanderer
On Friday, October 12, 2012 12:57:06 PM UTC-4, MRAB wrote: On 2012-10-12 16:36, Wanderer wrote: I'm trying to write some code that will load one of three dll depending on the one available. I've tried the code below, but it doesn't work. The try except doesn't catch the exception. Is

Re: Checking for dlls in ctypes

2012-10-12 Thread Wanderer
On Friday, October 12, 2012 12:29:02 PM UTC-4, Dave Angel wrote: On 10/12/2012 11:36 AM, Wanderer wrote: I'm trying to write some code that will load one of three dll depending on the one available. I've tried the code below, but it doesn't work. The try except doesn't catch the

Re: Basic JSON question: Do I really need the quotes

2012-10-12 Thread Adam Tauno Williams
On Fri, 2012-10-12 at 19:27 +0200, Roel Schroeven wrote: moo...@yahoo.co.uk schreef: Hi, I need to define some configuration in a file that will be manually created. Internally, the data will be stored as a dict, which contains various properties related to a design e.g. Design Name,

How to use while within the command in -c option of python?

2012-10-12 Thread Herman
python -c import os; while True: print('hello') File string, line 1 import os; while True: print('hello') ^ SyntaxError: invalid syntax -- http://mail.python.org/mailman/listinfo/python-list

Re: How to use while within the command in -c option of python?

2012-10-12 Thread Etienne Robillard
On Fri, 12 Oct 2012 15:51:19 -0700 Herman sorsor...@gmail.com wrote: python -c import os; while True: print('hello') File string, line 1 import os; while True: print('hello') ^ SyntaxError: invalid syntax -- http://mail.python.org/mailman/listinfo/python-list You

Re: Basic JSON question: Do I really need the quotes

2012-10-12 Thread Roy Smith
In article cbd2f125-38ca-4f46-9077-95de0cf7e...@googlegroups.com, moo...@yahoo.co.uk wrote: I need to define some configuration in a file that will be manually created. [...] json seemed a quick an easy way of achieving this JSON would not be my first choice for a file which needs to be

New Taylor Francis Int. Journal “CMBBE: Imaging Visualization”: Announcement and CfP

2012-10-12 Thread tava...@fe.up.pt
- Announcement and Call for Contributions New International Journal: Computer Methods in Biomechanics and Biomedical Engineering: Imaging Visualization Publisher: Taylor Francis

Re: How to use while within the command in -c option of python?

2012-10-12 Thread Dave Angel
On 10/12/2012 06:51 PM, Herman wrote: python -c import os; while True: print('hello') File string, line 1 import os; while True: print('hello') ^ SyntaxError: invalid syntax See the recent thread: for-loop on cmd-line The problem has nothing to do with the command

Re: How to use while within the command in -c option of python?

2012-10-12 Thread Steven D'Aprano
On Fri, 12 Oct 2012 19:04:20 -0400, Etienne Robillard wrote: On Fri, 12 Oct 2012 15:51:19 -0700 Herman sorsor...@gmail.com wrote: python -c import os; while True: print('hello') File string, line 1 import os; while True: print('hello') ^ SyntaxError: invalid

Re: How to use while within the command in -c option of python?

2012-10-12 Thread Herman
I was just trying to do in a shell to quickly monitor a file. Imagine instead of printing hello, it is os.system(cat somefile), etc. Look like it works if i press an enter after the import xxx. Thanks. On Fri, Oct 12, 2012 at 5:29 PM, Dave Angel d...@davea.name wrote: On 10/12/2012 06:51 PM,

Re: How to use while within the command in -c option of python?

2012-10-12 Thread Ned Deily
In article canoe_mi+vew6t0ec-kcohouxn7o2a8v6qbbzrzqryvzi+b7...@mail.gmail.com, Herman sorsor...@gmail.com wrote: I was just trying to do in a shell to quickly monitor a file. Imagine instead of printing hello, it is os.system(cat somefile), etc. Look like it works if i press an enter after

Re: Basic JSON question: Do I really need the quotes

2012-10-12 Thread rusi
On Oct 13, 5:03 am, Roy Smith r...@panix.com wrote: In article cbd2f125-38ca-4f46-9077-95de0cf7e...@googlegroups.com,  moo...@yahoo.co.uk wrote: I need to define some configuration in a file that will be manually created. [...] json seemed a quick an easy way of achieving this JSON

Feedback on my python framework I'm building.

2012-10-12 Thread nbvfour
http://giotto.readthedocs.org/en/latest/tutorial.html Can someone give me some feedback on what they think of this framework? I came up with the idea of this framework a few months ago. I gave a talk at a local python user group regarding these ideas, but no one seemed to think I was onto

[issue16206] dict() docs should display multiple signatures

2012-10-12 Thread Chris Jerdonek
New submission from Chris Jerdonek: The documentation for dict() (for both the built-in function and the class constructor) should display multiple signatures as do dict.__doc__ and the documentation for, say, str(). Currently, the dict() documentation just has one signature: dict([arg])

[issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6

2012-10-12 Thread Ralf Schmitt
Ralf Schmitt added the comment: It's not quite true what I wrote. Actually you get a error: getsockaddrarg: bad family error. But regardless of the error, there just is no need to ask for IPv6 addresses! -- ___ Python tracker rep...@bugs.python.org

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-12 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +serwy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15853 ___ ___ Python-bugs-list mailing list

[issue16207] add class name to method signatures in stdtypes docs

2012-10-12 Thread Chris Jerdonek
New submission from Chris Jerdonek: The method signatures for some of the classes documented in library/stdtypes lack the class name. For example, the list, dict, set, and memoryview methods lack the class name. Adding the class name will help to distinguish methods from functions.

[issue14937] IDLE's deficiency in the completion of file names (Python 32, Windows XP)

2012-10-12 Thread Francisco Gracia
Francisco Gracia added the comment: In my machine with Windows XP and Python 3.3.0 both variants work, the only difference being that 'c:/ brings up the selection box authomatically and 'c:\ requieres that it be summoned with the tab key, as indicated. 2012/10/12 Terry J. Reedy

[issue16202] sys.path[0] security issues

2012-10-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Robert: I don't think that running scripts in /tmp is inherently unsafe. It is Python's sys.path handling which makes it unsafe. That being said, I am not against distutils being fixed but I do think the root issue should be fixed. And of course you're

[issue16201] socket.gethostbyname incorrectly parses ip

2012-10-12 Thread Michele Orrù
Michele Orrù added the comment: Attaching patch to trim leading and trailing whitespaces prior to processing. Note that tests are incorrect: the parsing is of the form %d.%d.%d.%d%c, so the parser should accept trailing spaces. That's the same for ping iirc: $ ping 192.168.1.1 PING

[issue16207] add class name to method signatures in stdtypes docs

2012-10-12 Thread Georg Brandl
Georg Brandl added the comment: This is by design: these method descriptions are indented under their class entries; no need to repeat the class name. -- nosy: +georg.brandl resolution: - works for me status: open - pending ___ Python tracker

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-12 Thread Ned Deily
Ned Deily added the comment: Thanks for the patch, Kevin. It does need to be updated a bit for the current 2.7 branch as there have been changes since 2.7.3. Can you outline what you believe the problem is that your patch is trying to workaround? Certainly, nothing that IDLE or any other

[issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6

2012-10-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: The switch --disable-ipv6 is supported and works as intended. It is not the intention of the switch to disable lookups. Instead, it disables support for IPv6 sockets. Requesting that the switch disables any code that somehow deals with IPv6 is

[issue16207] add class name to method signatures in stdtypes docs

2012-10-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: I think I would be more okay with this if it weren't for the fact that some functions also appear indented under their class entries (making them look like methods). Right now, there's no visual distinction between the functions and the methods. Prefixing

[issue16207] add class name to method signatures in stdtypes docs

2012-10-12 Thread Georg Brandl
Georg Brandl added the comment: I think I would be more okay with this if it weren't for the fact that some functions also appear indented under their class entries (making them look like methods). I see, yes. In this case I agree. -- ___

[issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6

2012-10-12 Thread Ralf Schmitt
Ralf Schmitt added the comment: The switch disables support for IPv6 sockets, and since IPv6 support is disabled, there is no need to try to lookup IPv6 addresses in create_connection. They just cannot be used afterwards. I didn't request that the switch disables any code that somehow deals

[issue16208] getaddrinfo returns wrong results if IPv6 is disabled

2012-10-12 Thread Ralf Schmitt
Changes by Ralf Schmitt python-b...@systemexit.de: -- nosy: schmir priority: normal severity: normal status: open title: getaddrinfo returns wrong results if IPv6 is disabled ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16208

[issue16208] getaddrinfo returns wrong results if IPv6 is disabled

2012-10-12 Thread Ralf Schmitt
New submission from Ralf Schmitt: I'm running the following code on python 2.7.3 on a 64 bit linux. import socket print has_ipv6, socket.has_ipv6 res = socket.getaddrinfo(python.org, 80, socket.AF_INET6, socket.SOCK_STREAM) print python.org is, res With IPv6 enabled, I get the following

[issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6

2012-10-12 Thread Ralf Schmitt
Ralf Schmitt added the comment: btw lookups do not work if python is configured with --disable-ipv6, see http://bugs.python.org/issue16208 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7735

[issue16201] socket.gethostbyname incorrectly parses ip

2012-10-12 Thread Michele Orrù
Changes by Michele Orrù maker...@gmail.com: Added file: http://bugs.python.org/file27540/issue16201.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16201 ___

[issue12268] file readline, readlines readall methods can lose data on EINTR

2012-10-12 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12268 ___ ___

[issue16207] add class name to method signatures in stdtypes docs

2012-10-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: So it looks like the class name gets stripped when rendering if you prefix the method name with the class name and the methods are nested beneath the class. So it seems like the options are to either (1) move the non-methods outside the class (e.g. before the

[issue16209] add a class str entry to the docs

2012-10-12 Thread Chris Jerdonek
New submission from Chris Jerdonek: This issue is to add a str class entry to the built-in types page like we have for dict, set, memoryview, etc: http://docs.python.org/dev/library/stdtypes.html This will let us reference ``str`` the class separately from ``str()`` the built-in function.

[issue16207] distinguish methods from non-methods in classes in the stdtypes docs

2012-10-12 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- title: add class name to method signatures in stdtypes docs - distinguish methods from non-methods in classes in the stdtypes docs ___ Python tracker rep...@bugs.python.org

[issue16210] combine the two type() definitions in built-in function docs

2012-10-12 Thread Chris Jerdonek
New submission from Chris Jerdonek: [Found by Ezio] The built-in function documentation has what looks like two separate definitions of the built-in function type(): http://docs.python.org/dev/library/functions.html#type These two definitions should be combined into one with a multi-line

[issue16210] combine the two type() definitions in built-in function docs

2012-10-12 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16210 ___

[issue16192] ctypes - documentation example

2012-10-12 Thread Ezio Melotti
Ezio Melotti added the comment: The note at the beginning could be turned in an actual note using the `.. note:` markup. This will make it more visible. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16192

[issue16202] sys.path[0] security issues

2012-10-12 Thread Volker Braun
Volker Braun added the comment: The fact that Python's own testsuite tripped over this proves that this is subtle enough to merit some special handling. 1) It is not, and has never been, a good idea to run/compile anything off /tmp. This isn't specific to Python, it is just common sense that

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-12 Thread Kevin Walzer
Kevin Walzer added the comment: The crash occurs during a self.editFont.config call, when the sample text in the font dialog is updated with new font properties. My changes re-structures the configure event to first create a tuple with new font properties, then apply that to the parent label

[issue16202] sys.path[0] security issues

2012-10-12 Thread Hynek Schlawack
Changes by Hynek Schlawack h...@ox.cx: -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16202 ___ ___ Python-bugs-list mailing list

[issue11009] urllib.splituser is not documented

2012-10-12 Thread Vinay Sajip
Vinay Sajip added the comment: Note that at least splituser is being used outside the stdlib: packaging (which was intended to be part of the stdlib) used it, and hence so do distutils2 and distlib (by sharing parts of their codebases). Of course these last two are outside the stdlib. Similar

[issue16205] update :class:`str` references to link to the str type section

2012-10-12 Thread Ezio Melotti
Ezio Melotti added the comment: If :class:`str` and :func:`str` point respectively to stdtypes.rst and functions.rst once a class directive is added to stdtypes.rst, then we can do that. We might than need to update a few links to use :class: instead of :func:, and possibly use

[issue16205] update :class:`str` references to link to the str type section

2012-10-12 Thread Ezio Melotti
Ezio Melotti added the comment: Adding a class directive for str is tracked in #16209. -- dependencies: +add a class str entry to the docs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16205

[issue16205] update :class:`str` references to link to the str type section

2012-10-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: If :class:`str` and :func:`str` point respectively to stdtypes.rst and functions.rst once a class directive is added to stdtypes.rst, then we can do that. I agree. I would suggest starting small by adding a stub class entry above the string methods. The

[issue16191] ceval cleanup

2012-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I won't examine the patch in detail, but the cleanup is welcome and I trust you (and the test suite :-)) that it works fine. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue16211] MacInstalls break PyDev

2012-10-12 Thread Doug Ransom
New submission from Doug Ransom: A number of .py files are not installed in the mac installer. While python programs run OK, this thwarts users from using IDEs like Aptana Studio/PyDev. For those of us who are python dabblers, this makes it nearly impossible to write/debug python code.

[issue16211] MacInstalls break PyDev

2012-10-12 Thread Ronald Oussoren
Ronald Oussoren added the comment: The binary installers for OSX do install all of the std library, and AFAIK the same is true for the version of python that ships with the OS. Please explains how to reproduce the problem you are having: * What release of OSX * Which python version

[issue16212] mmap() dumps core upon resizing the underlying file

2012-10-12 Thread Vladimir Ushakov
New submission from Vladimir Ushakov: The following code crashes the interpreter on Linux: #!/usr/bin/python3 import mmap with open('test', 'wb') as f: f.write(bytes(1)) with open('test', 'r+b') as f: m = mmap.mmap(f.fileno(), 0) f.truncate() a = m[:] --- It's not specific

[issue16212] mmap() dumps core upon resizing the underlying file

2012-10-12 Thread Christian Heimes
Christian Heimes added the comment: I'm able to reproduce the bug. Here is a stack trace: #0 0x005a650d in PyBytes_FromStringAndSize (str=0x7f44c127a000 Address 0x7f44c127a000 out of bounds, size=1) at Objects/bytesobject.c:82 82 (op = characters[*str UCHAR_MAX]) !=

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

2012-10-12 Thread Mike Hoy
Mike Hoy added the comment: Patch affects faq.rst/index.rst. In faq I put the two links along with some text as Chris suggested. In index I changed resources to Additional Resources and split up the old 'Resources' into 'Additional Resources/Essential Reading'. Feedback appreciated I will

[issue16211] MacInstalls break PyDev

2012-10-12 Thread Ned Deily
Ned Deily added the comment: In current OS X releases, it is true that the system Pythons as shipped by Apple do not include the .py files in /System/Library/Frameworks/Python.framework; only .pyc and .pyo files are present. However, those .py files are added when you install the Command

[issue15350] {urllib,urllib.parse}.urlencode.__doc__ is unclear

2012-10-12 Thread samwyse
samwyse added the comment: Look good. I'd fix the last line, however: sent the quote_plus - sent to the quote_plus function, maybe. On Fri, Sep 28, 2012 at 6:18 AM, Brian Brazil rep...@bugs.python.org wrote: Brian Brazil added the comment: How does the attached patch look? I also

[issue16202] sys.path[0] security issues

2012-10-12 Thread Christian Heimes
Christian Heimes added the comment: Robert Bradshaw's idea is the only feasible option for Python 2.7 or any other version except for 3.4dev. Your suggested modification to sys.path is out of option as it would create a backwards incompatibility with existing software. I'm adding 2.6 to 3.4

[issue16213] Expose private functions in marshal used by importlib

2012-10-12 Thread Brett Cannon
New submission from Brett Cannon: IOW make _w_long, _r_long, and __fix_co_filename public so as to not be some special ability that only importlib has. -- components: Library (Lib) messages: 172751 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open

[issue16191] ceval cleanup

2012-10-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac30a1b1cf17 by Benjamin Peterson in branch 'default': ceval cleanup http://hg.python.org/cpython/rev/ac30a1b1cf17 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-12 Thread Roger Serwy
Roger Serwy added the comment: It appears that Kevin's patch is working around a bug in Tkinter's tkFont object configuration. I would suggest removing the editFont object entirely from configDialog if it is truly the root cause of Tk crashing. Kevin, is the .textHighlightSample causing the

[issue16213] Expose private functions in marshal used by importlib

2012-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why is it a problem for importlib to use internal APIs? I don't think support these low-level APIs as public helps anyone. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16213

[issue16202] sys.path[0] security issues

2012-10-12 Thread Robert Bradshaw
Robert Bradshaw added the comment: Here's a fix to distutils. I think at least a warning is in order for running scripts from insecure directories, and ideally some happy medium can be found. -- Added file: http://bugs.python.org/file27542/fix_distutils.patch

[issue16202] sys.path[0] security issues

2012-10-12 Thread Christian Heimes
Christian Heimes added the comment: I'm all in favor for the proposal to add a warning when the script is in a world-writable directory. But any modification can't be added to stable version as it's a new feature. Robert, you have to cleanup and remove the directory manually at the end of the

[issue16213] Expose private functions in marshal used by importlib

2012-10-12 Thread Brett Cannon
Brett Cannon added the comment: Well, it means importlib becomes a special library and that no one could ever replicate it as a third-party library. Now if we can expose the various APIs around this such that they are abstracted away then it isn't a big deal. That can be done for the _r_long

[issue16213] Expose private functions in marshal used by importlib

2012-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le vendredi 12 octobre 2012 à 16:23 +, Brett Cannon a écrit : Well, it means importlib becomes a special library and that no one could ever replicate it as a third-party library. Well, it *is* a special library. It is tightly integrated with the

[issue16212] mmap() dumps core upon resizing the underlying file

2012-10-12 Thread Charles-François Natali
Charles-François Natali added the comment: That's normal. You're truncating the file after having it mapped, so touching the pages corresponding to the truncated part of the file will result in a segfault. See mmap's man page: Use of a mapped region can result in these signals:

[issue16212] mmap() dumps core upon resizing the underlying file

2012-10-12 Thread Christian Heimes
Christian Heimes added the comment: The fstat() check isn't bullet proof, too. It has a race condition as another process could truncate the file between the fstat() check and the code lines that access the mmapped file. -- ___ Python tracker

[issue16212] mmap() dumps core upon resizing the underlying file

2012-10-12 Thread Charles-François Natali
Charles-François Natali added the comment: No, it's not. That's why I think there's nothing that can be done. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16212 ___

[issue16202] sys.path[0] security issues

2012-10-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: If you don't plan any further Python-2 releases, it would be pity that this cannot be fixed. If you do plan a further Python-2 release, I find backwards compatibility a poor excuse. I'm not saying that backwards compatibility should be totally ignored, but

[issue16191] ceval cleanup

2012-10-12 Thread Dave Malcolm
Changes by Dave Malcolm dmalc...@redhat.com: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16191 ___ ___ Python-bugs-list

[issue16213] Expose private functions in marshal used by importlib

2012-10-12 Thread Brett Cannon
Brett Cannon added the comment: http://bugs.python.org/issue15031 would deal with not needing to expose _r_long and _w_long, but that still means people are screwed for _fix_co_filename. You could argue that is a margin use-case, though. -- dependencies: +Split .pyc parsing from

[issue16202] sys.path[0] security issues

2012-10-12 Thread Christian Heimes
Christian Heimes added the comment: Ultimately it's Benjamin's and Georg's decision. They are the release managers of 2.7 to 3.3 and need to come to an agreement. You have to convince them that the proposed security restriction is worth the risk of breaking 3rd party software. It would help

[issue15936] Add link from os.urandom to random.SystemRandom

2012-10-12 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- keywords: +easy stage: - needs patch versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15936 ___

[issue16212] mmap() dumps core upon resizing the underlying file

2012-10-12 Thread Vladimir Ushakov
Vladimir Ushakov added the comment: I think, handling the signal would do. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16212 ___ ___

[issue16202] sys.path[0] security issues

2012-10-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: disutils should definitely be fixed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16202 ___ ___

[issue15472] Itertools doc summary table misdocuments some arguments

2012-10-12 Thread Petri Lehtinen
Petri Lehtinen added the comment: cycle() doesn't use seq, but p (p0, p1, ...). Others use seq (seq[0], seq[1], ...). How do you think these should be changed? -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org

[issue16202] sys.path[0] security issues

2012-10-12 Thread Robert Bradshaw
Robert Bradshaw added the comment: Good point about cleanup, patch updated. -- Added file: http://bugs.python.org/file27543/fix_distutils.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16202

[issue16061] performance regression in string replace for 3.3

2012-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch should be completed to optimize also other Unicode kinds. I'm working on it. Here are benchmark scripts which I use. First tests regular strings (replace every n-th char), second tests random strings (replace 1/n of total randomly distributed

[issue16214] 2to3 does not remove exceptions import

2012-10-12 Thread Chris Mayo
New submission from Chris Mayo: Create file a.py: #!/usr/bin/python import exceptions and run: 2to3 a.py ... RefactoringTool: No files need to be modified. Issue 2350 is marked as closed but this is still present for me in 2to3 of Python 2.7, 3.2 and 3.3. -- components: 2to3 (2.x to

[issue16213] Expose private functions in marshal used by importlib

2012-10-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: I don't understand this issue at all: a) _bootstrap does not currently use any private API of marshal. Instead, it has functions _w_long and _r_long implemented in pure Python. So where is the special functionality that only importlib has? Anybody could

[issue2350] 'exceptions' import fixer

2012-10-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: Brett: Why did you close the issue? Benjamin's change was never committed... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2350 ___

  1   2   >