RE: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Moez AbdelGawad
Date: Thu, 18 Apr 2013 15:53:15 -0700 From: dreamingforw...@gmail.com To: types-l...@lists.seas.upenn.edu Subject: Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages I am very thankful for the references given by everyone.

Re: Encoding NaN in JSON

2013-04-19 Thread Robert Kern
On 2013-04-19 10:34, Tim Roberts wrote: Miki Tebeka miki.teb...@gmail.com wrote: I'm trying to find a way to have json emit float('NaN') as 'N/A'. No. There is no way to represent NaN in JSON. It's simply not part of the specification. I know that. I'm trying to emit the *string* 'N/A'

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Jason Wilkins
I don't quite think I understand what you are saying. Are you saying that mathematical models are not a good foundation for computer science because computers are really made out of electronic gates? All I need to do is show that my model reduces to some basic physical implementation (with

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Chris Angelico
On Fri, Apr 19, 2013 at 1:35 PM, rusi rustompm...@gmail.com wrote: If I have a loop: while i len(a) and a[i] != x: i++ I need to understand that at the end of the loop: i = len(a) or a[i] == x and not i = len(a) and a[i] == x nor i == len(a) or a[i] == x # What if I forgot to

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Uday S Reddy
Mark Janssen writes: The main thing that I notice is that there is a heavy bias in academia towards mathematical models. I understand that Turing Machines, for example, were originally abstract computational concepts before there was an implementation in hardware, so I have some sympathies

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Claus Reinke
The main thing that I notice is that there is a heavy bias in academia towards mathematical models. I understand that Turing Machines, for example, were originally abstract computational concepts before there was an implementation in hardware, so I have some sympathies with that view, yet,

Re: How to set my gui?

2013-04-19 Thread Alister
On Thu, 18 Apr 2013 23:24:29 +0200, Tracubik wrote: Hi all! I'm trying to make a simple program that essentially do this: 1) open a html file (extracted epub file) 2) search for occurrences like ita-ly 3) put them on a simple GUI: 1 text field and two buttons: keepy it and correct it

Re: How to set my gui?

2013-04-19 Thread Roland Koebler
Hi, These days, GUI programming is to me just programming and calling on certain libraries/modules. +1 One thing you may want to consider is using your main thread for the UI, and spinning off another thread to do your search. But do that ONLY if you know you understand threads, and

RE: subprocess.call

2013-04-19 Thread Ombongi Moraa Fe
Hi Team, In my python script, I have this: command=lynx -dump 'phpscript?param1=%sparam2=%sparam3=%sparam4=%sparam5=%s'%(value1,value2,value3,value4) result=subprocess.call(command,shell=True) print 'xml message' However, the response from running the php script is also printed on output

Re: subprocess.call

2013-04-19 Thread Mau C
Il 19/04/2013 11:56, Ombongi Moraa Fe ha scritto: Hi Team, In my python script, I have this: command=lynx -dump 'phpscript?param1=%sparam2=%sparam3=%sparam4=%sparam5=%s'%(value1,value2,value3,value4) http://docs.python.org/2/library/subprocess.html#module-subprocess You should set the

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Steven D'Aprano
On Thu, 18 Apr 2013 17:14:13 -0400, Robert Harper wrote: In short, there is no such thing as a paradigm. Of course there is. A paradigm is a distinct way of thinking, a philosophy if you will. To say that there is no such thing as a paradigm is to say that all ways of thinking about a topic

Re: dynamic forms generation

2013-04-19 Thread andrea crotti
Well I think since we are using django anyway (and bottle on the API side) I'm not sure why we would use flask forms for this.. Anyway the main question is probably, is it worth to try to define a DSL or not? The problem I see is that we have a lot and very complex requirements, trying to define

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Roy Smith
In article 517131cd$0$29977$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 18 Apr 2013 17:14:13 -0400, Robert Harper wrote: In short, there is no such thing as a paradigm. Of course there is. A paradigm is a distinct way of

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Chris Angelico
On Fri, Apr 19, 2013 at 11:07 PM, Roy Smith r...@panix.com wrote: I was indeed talking about the ways people think about programming. For example, OOP in C++ is very much about encapsulation. People declare all data private, and writing setter/getter functions which carefully control what

Request

2013-04-19 Thread usman mjoda
Good day, I need help on how to upgradean SAES to AES 128 bits. thank you -- *Usman M. Joda (zhoda), * * * * * *Master Student of Computer Science Technology,* * * * * * * *Liaoning University Of Technology (LUT), * * * * * * * *+8613840619645* * * * usmanjo...@yahoo.com * * * * Zhinzou- China*

Feature Request: `operator.not_in`

2013-04-19 Thread Matthew Gilson
I believe that I read somewhere that this is the place to start discussions on feature requests, etc. Please let me know if this isn't the appropriate venue (and what the appropriate venue would be if you know). This request has 2 related parts, but I think they can be considered seperately:

Re: How to set my gui?

2013-04-19 Thread Tracubik
On 19/04/2013 10:42, Alister wrote: On Thu, 18 Apr 2013 23:24:29 +0200, Tracubik wrote: Hi all! I'm trying to make a simple program that essentially do this: 1) open a html file (extracted epub file) 2) search for occurrences like ita-ly 3) put them on a simple GUI: 1 text field and two

Re: subprocess.call

2013-04-19 Thread Jens Thoms Toerring
Ombongi Moraa Fe moraa.lovetak...@gmail.com wrote: [-- text/plain, encoding 7bit, charset: ISO-8859-1, 19 lines --] In my python script, I have this: command=lynx -dump 'phpscript?param1=%sparam2=%sparam3=%sparam4=%sparam5=%s'%(value1,value2,value3,value4)

Re: Encoding NaN in JSON

2013-04-19 Thread Grant Edwards
On 2013-04-18, Wayne Werner wa...@waynewerner.com wrote: On Wed, 17 Apr 2013, Miki Tebeka wrote: I'm trying to find a way to have json emit float('NaN') as 'N/A'. No. There is no way to represent NaN in JSON. It's simply not part of the specification. I know that. I'm trying to emit the

Re: howto remove the thousand separator

2013-04-19 Thread Duncan Booth
pyth0n3r pyth0...@gmail.com wrote: I came across a problem that when i deal with int data with ',' as thousand separator, such as 12,916, i can not change it into int() or float(). How can i remove the comma in int data? Any reply will be appreciated!! Parse it using the locale module,

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Roy Smith
In article mailman.821.1366378384.3114.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Fri, Apr 19, 2013 at 11:07 PM, Roy Smith r...@panix.com wrote: I was indeed talking about the ways people think about programming. For example, OOP in C++ is very much about

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Chris Angelico
On Sat, Apr 20, 2013 at 1:31 AM, Roy Smith r...@panix.com wrote: #define private public #define protected public #include whatever.h And: #define class struct But what I mean is that, _in my design_, I make everything public. No getters/setters, just direct member access. The theory behind

python : how to Opens folder with specified items selected on Windows

2013-04-19 Thread iMath
I want to Opens folder with specified items selected on Windows ,I looked up the The Windows Shell Reference found a function fit for this job SHOpenFolderAndSelectItems http://msdn.microsoft.com/en-us/library/windows/desktop/bb762232(v=vs.85).aspx but I cannot find an example on how to

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Roy Smith
In article mailman.824.1366386029.3114.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Sat, Apr 20, 2013 at 1:31 AM, Roy Smith r...@panix.com wrote: #define private public #define protected public #include whatever.h And: #define class struct I suppose, while we're

Re: python : how to Opens folder with specified items selected on Windows

2013-04-19 Thread Tim Golden
On 19/04/2013 16:54, iMath wrote: I want to Opens folder with specified items selected on Windows ,I looked up the The Windows Shell Reference found a function fit for this job SHOpenFolderAndSelectItems http://msdn.microsoft.com/en-us/library/windows/desktop/bb762232(v=vs.85).aspx but

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Steven D'Aprano
On Fri, 19 Apr 2013 12:02:00 -0400, Roy Smith wrote: PS: a great C++ interview question is, What's the difference between a class and a struct? Amazing how few self-professed C++ experts have no clue. I'm not a C++ expert, but I am an inquiring mind, and I want to know the answer! --

New release 0.19 of the Cython compiler

2013-04-19 Thread Stefan Behnel
I'm happy to announce that Cython 0.19 has been released. This is a feature release of the Cython compiler that adds some major usability improvements especially for code that needs to run in both Py2 and Py3, as well as better Python compatibility and optimisations. http://cython.org/ You can

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

2013-04-19 Thread Serhiy Storchaka
18.04.13 19:24, James Jong написав(ла): The file libtk8.6.so http://libtk8.6.so has 1.5M and is definitely there. So why did that compilation fail? LD_LIBRARY_PATH=/path_to_libtk However be careful. For now Python doesn't support Tk 8.6 (results of some functions changed in 8.6), this is a

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Steven D'Aprano
On Fri, 19 Apr 2013 09:07:15 -0400, Roy Smith wrote: Often, when you talk to C++ people, they will tell you that encapsulation is what OOP is all about. What they are doing is saying, C++ isa OOPL, and C++ has encapsulation, therefore OOPL implies encapsulation. When they look at something

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Ned Batchelder
On 4/19/2013 12:16 PM, Steven D'Aprano wrote: On Fri, 19 Apr 2013 12:02:00 -0400, Roy Smith wrote: PS: a great C++ interview question is, What's the difference between a class and a struct? Amazing how few self-professed C++ experts have no clue. I'm not a C++ expert, but I am an inquiring

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Ian Kelly
On Fri, Apr 19, 2013 at 4:16 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 19 Apr 2013 12:02:00 -0400, Roy Smith wrote: PS: a great C++ interview question is, What's the difference between a class and a struct? Amazing how few self-professed C++ experts have no

Ubuntu package python3 does not include tkinter

2013-04-19 Thread lcrocker
Am I mistaken in my belief that tkinter is a non-optional part of the Python language? I installed the python3 package on Ubuntu, and tkinter is not included--it's an optional package python3-tk that has to be installed separately. I reported this as a bug as was summarily slapped down. Can we

Re: Ubuntu package python3 does not include tkinter

2013-04-19 Thread Joel Goldstick
On Fri, Apr 19, 2013 at 1:17 PM, lcrocker l...@piclab.com wrote: Am I mistaken in my belief that tkinter is a non-optional part of the Python language? I installed the python3 package on Ubuntu, and tkinter is not included--it's an optional package python3-tk that has to be installed

Re: Ubuntu package python3 does not include tkinter

2013-04-19 Thread lcrocker
Thanks, but I'm not having any trouble running tkinter, it works just fine. I have an issue with the fact that it's optional. It reflects badly on the language and community if we allow just anyone to call something Python that doesn't meet some minimum standard of quality. Java has its compliance

Re: Ubuntu package python3 does not include tkinter

2013-04-19 Thread Andrew Berg
On 2013.04.19 12:17, lcrocker wrote: Am I mistaken in my belief that tkinter is a non-optional part of the Python language? I installed the python3 package on Ubuntu, and tkinter is not included--it's an optional package python3-tk that has to be installed separately. I reported this as a bug

Re: Ubuntu package python3 does not include tkinter

2013-04-19 Thread lcrocker
On Apr 19, 10:35 am, Andrew Berg bahamutzero8...@gmail.com wrote: On 2013.04.19 12:17, lcrocker wrote: Am I mistaken in my belief that tkinter is a non-optional part of the Python language? I installed the python3 package on Ubuntu, and tkinter is not included--it's an optional package

Re: Ubuntu package python3 does not include tkinter

2013-04-19 Thread Peter Otten
lcrocker wrote: Am I mistaken in my belief that tkinter is a non-optional part of the Python language? I installed the python3 package on Ubuntu, and tkinter is not included--it's an optional package python3-tk that has to be installed separately. I reported this as a bug as was summarily

Re: Ubuntu package python3 does not include tkinter

2013-04-19 Thread rusi
On Apr 19, 10:42 pm, lcrocker leedanielcroc...@gmail.com wrote: On Apr 19, 10:35 am, Andrew Berg bahamutzero8...@gmail.com wrote: On 2013.04.19 12:17, lcrocker wrote: Am I mistaken in my belief that tkinter is a non-optional part of the Python language? I installed the python3 package on

unzipping a zipx file

2013-04-19 Thread b_erickson1
I have python 2.6.2 and I trying to get it to unzip a file made with winzip pro. The file extension is zipx. This is on a windows machine where I have to send them all that files necessary to run. I am packaging this with py2exe. I can open the file with zFile =

Re: Ubuntu package python3 does not include tkinter

2013-04-19 Thread Andrew Berg
On 2013.04.19 12:42, lcrocker wrote: I understand that for something like a server distribution, but Ubuntu is a user-focused desktop distribution. It has a GUI, always. That is incorrect. http://www.ubuntu.com/server -- CPython 3.3.0 | Windows NT 6.2.9200 / FreeBSD 9.1 --

Re: Encoding NaN in JSON

2013-04-19 Thread Chris “Kwpolska” Warrick
On Fri, Apr 19, 2013 at 4:54 PM, Grant Edwards invalid@invalid.invalid wrote: On 2013-04-18, Wayne Werner wa...@waynewerner.com wrote: On Wed, 17 Apr 2013, Miki Tebeka wrote: I'm trying to find a way to have json emit float('NaN') as 'N/A'. No. There is no way to represent NaN in JSON. It's

Re: Feature Request: `operator.not_in`

2013-04-19 Thread Terry Jan Reedy
On 4/19/2013 10:27 AM, Matthew Gilson wrote: ) It seems to me that the operator module should have a `not_in` or `not_contains` function. It seems asymmetric that there exists a `is_not` function which implements `x is not y` but there isn't a function to represent `x not in y`. There is also

Re: unzipping a zipx file

2013-04-19 Thread John Gordon
In mailman.834.1366394500.3114.python-l...@python.org b_erickson1 br...@dashley.net writes: ozFile = open(filename,'w') ozFile.write(zFile.read(filename)) ozFile.close() Perhaps you want to use zFile.extract() instead of zFile.read()? -- John Gordon

Re: Ubuntu package python3 does not include tkinter

2013-04-19 Thread Terry Jan Reedy
On 4/19/2013 1:17 PM, lcrocker wrote: Am I mistaken in my belief that tkinter is a non-optional part of the Python language? Yes. The PSF CPython Windows installer makes installation of tcl/tk/tkinter optional. The build files will compile and build Python without tkinter and without other

Re: unzipping a zipx file

2013-04-19 Thread John Gordon
In kks2mi$54d$1...@reader1.panix.com John Gordon gor...@panix.com writes: In mailman.834.1366394500.3114.python-l...@python.org b_erickson1 br...@dashley.net writes: ozFile = open(filename,'w') ozFile.write(zFile.read(filename)) ozFile.close()

Toolbar and PyQT

2013-04-19 Thread lionelgreenstreet
Hi, i'm new with python, so i need an help about this problem. I've implemented a toolbar in a QDialog box: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar . self.toolbar = NavigationToolbar(self.canvas, self) I've found this code on internet. I

Re: Unicode issue with Python v3.3

2013-04-19 Thread Νίκος Γκρ33κ
Hello Cameron, Did you received my yesterday's mail? -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature Request: `operator.not_in`

2013-04-19 Thread Matthew Gilson
On 4/19/13 2:27 PM, Terry Jan Reedy wrote: On 4/19/2013 10:27 AM, Matthew Gilson wrote: ) It seems to me that the operator module should have a `not_in` or `not_contains` function. It seems asymmetric that there exists a `is_not` function which implements `x is not y` but there isn't a

Re: Encoding NaN in JSON

2013-04-19 Thread Grant Edwards
On 2013-04-19, Chris ???Kwpolska??? Warrick kwpol...@gmail.com wrote: On Fri, Apr 19, 2013 at 4:54 PM, Grant Edwards invalid@invalid.invalid wrote: On 2013-04-18, Wayne Werner wa...@waynewerner.com wrote: On Wed, 17 Apr 2013, Miki Tebeka wrote: I'm trying to find a way to have json emit

Re: Encoding NaN in JSON

2013-04-19 Thread Miki Tebeka
You understand that this will result in a chunk of text that is not JSON? I think he means something like this: json.dumps([float('nan')]) '[N/A]' That's exactly what I mean :) -- http://mail.python.org/mailman/listinfo/python-list

Re: unzipping a zipx file

2013-04-19 Thread Dave Angel
On 04/19/2013 01:59 PM, b_erickson1 wrote: I have python 2.6.2 and I trying to get it to unzip a file made with winzip pro. The file extension is zipx. This is on a windows machine where I have to send them all that files necessary to run. I am packaging this with py2exe. I can open the

Re: unzipping a zipx file

2013-04-19 Thread Tim Chase
On 2013-04-19 16:29, Dave Angel wrote: zFile = zipfile.ZipFile(fullPathName,'r') The second parameter to ZipFile() probably should be 'rb' not 'r' Just for the record, the zipfile.ZipFile.__init__ maps r to open the file with rb, so that's not the issue. Your suggestion about opening the

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Roy Smith
I wrote: I suppose people who grew up learning Python as their first language look at something like C++ and say, That's not OOP because classes aren't objects, or something equally silly. In article 517172e7$0$29977$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Roy Smith
In article mailman.843.1366412626.3114.python-l...@python.org, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Fri, 19 Apr 2013 12:02:00 -0400, Roy Smith r...@panix.com declaimed the following in gmane.comp.python.general: PS: a great C++ interview question is, What's the difference

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-19 Thread Steven D'Aprano
On Fri, 19 Apr 2013 19:37:38 -0400, Roy Smith wrote: There aren't many schools who teach Python as a first (and only language), but I suppose it's starting to catch on. 5 years from now, we may see waves of kids graduating from college knowing nothing but Python, with a similarly narrow view

Re: Ubuntu package python3 does not include tkinter

2013-04-19 Thread Steven D'Aprano
On Fri, 19 Apr 2013 10:17:58 -0700, lcrocker wrote: Am I mistaken in my belief that tkinter is a non-optional part of the Python language? I installed the python3 package on Ubuntu, and tkinter is not included--it's an optional package python3-tk that has to be installed separately. I

Re: unzipping a zipx file

2013-04-19 Thread Steven D'Aprano
On Fri, 19 Apr 2013 17:59:26 +, b_erickson1 wrote: I have python 2.6.2 and I trying to get it to unzip a file made with winzip pro. The file extension is zipx. This is on a windows machine where I have to send them all that files necessary to run. I am packaging this with py2exe. I

Re: unzipping a zipx file

2013-04-19 Thread Dave Angel
On 04/19/2013 08:24 PM, Steven D'Aprano wrote: SNIP You are missing that zipx is not the same as zip, and Python very likely does not support the zipx compression algorithm. http://kb.winzip.com/kb/entry/7/ My guess is that the zipx header is similar enough to zip that Python can

Re: How to set my gui?

2013-04-19 Thread Chris Angelico
On Sat, Apr 20, 2013 at 9:10 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Fri, 19 Apr 2013 09:24:36 +1000, Chris Angelico ros...@gmail.com declaimed the following in gmane.comp.python.general: On Fri, Apr 19, 2013 at 8:57 AM, Walter Hurry walterhu...@lavabit.com wrote: On Fri, 19

Different cache filename

2013-04-19 Thread Fabian PyDEV
Hi, when load a module mymodule.py with importlib.machinery.SourceFileLoader a bytecode file is created as mymodule.cpython-33.pyc. If I load a module mymodule.ext.py the same way the same bytecode file is created as mymodule.cpython-33.pyc. Is there any way I could tell python to generate

[issue14364] Argparse incorrectly handles '--'

2013-04-19 Thread paul j3
paul j3 added the comment: The patch that I recently submitted for http://bugs.python.org/issue13922 appears to solve this issue. It only removes the '--' that marked the end of options. With: parser = argparse.ArgumentParser() parser.add_argument('-f','--foo')

[issue17760] No i18n of IDLE's interface in french

2013-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: The target is different though (especially the target of Firefox). Kate might be used mainly by developers, but it's also used by non-developers and it's probably translated also because all the KDE programs are. Mercurial would be a better example against

[issue14364] Argparse incorrectly handles '--'

2013-04-19 Thread Michele Orrù
Michele Orrù added the comment: wow, I was just writing the unittests, thanks paul. Shall I continue? I don't see any test case on tip. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14364

[issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets

2013-04-19 Thread Mike Lundy
New submission from Mike Lundy: The changed merged from http://bugs.python.org/issue16168 causes a regression in SysLogHandler behavior. The socktype of /dev/log is dependent on syslog configuration, and the fallback behavior (trying SOCK_DGRAM and then SOCK_STREAM if the former failed) was

[issue17796] No mimetype guessed for tar.xz url

2013-04-19 Thread LCID Fire
New submission from LCID Fire: mimetypes.guess_type( http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.36/libxml++-2.36.0.tar.xz;), strict=False ) gives (None, None) -- components: Library (Lib) messages: 187348 nosy: lcid-fire priority: normal severity: normal status: open title:

[issue13922] argparse handling multiple -- in args improperly

2013-04-19 Thread Michele Orrù
Changes by Michele Orrù maker...@gmail.com: -- nosy: +maker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13922 ___ ___ Python-bugs-list mailing

[issue14364] Argparse incorrectly handles '--'

2013-04-19 Thread Michele Orrù
Michele Orrù added the comment: Yes, http://bugs.python.org/file29845/dbldash.patch seems to fix this. Attaching the unittests, and noisying on your issue. -- keywords: +patch Added file: http://bugs.python.org/file29938/issue14364.test.patch ___

[issue17468] Generator memory leak

2013-04-19 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17468 ___ ___

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2013-04-19 Thread Stijn Hoop
Stijn Hoop added the comment: So after a good nights sleep: does it not make sense to use the canonical hostname iff the name argument is not present / empty? Otherwise, fall back to the documented steps? That way extra API is avoided, and I can't think of a case where you would rather have

[issue17778] Fix test discovery for test_multiprocessing.py

2013-04-19 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17778 ___ ___ Python-bugs-list mailing

[issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets

2013-04-19 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- assignee: - vinay.sajip nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17795 ___

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Mateusz Loskot
New submission from Mateusz Loskot: In pythonrun.c, there is function initstdio() with the following test: static int initstdio(void) { ... /* Set sys.stdin */ fd = fileno(stdin); /* Under some conditions stdin, stdout and stderr may not be connected * and fileno() may point to

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: And does it cause an issue later? How? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17797 ___

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Mateusz Loskot
Mateusz Loskot added the comment: Yes, it does. In file Modulfileio.c, in function fileio_init, there is this code: if (fd = 0) { if (check_fd(fd)) goto error; self-fd = fd; self-closefd = closefd; } The check_fd tests: if (!_PyVerify_fd(fd) ||

[issue17468] Generator memory leak

2013-04-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: Generators exit using GeneratorExit, which you could possible catch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17468 ___

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2013-04-19 Thread R. David Murray
R. David Murray added the comment: That is an interesting proposal, yes. I suppose someone that needs the getaddrinfo semantics for something other than the local host can just call it directly. Now, do we add the fact that we are doing this to the current alogarithmic documention? :)

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Mateusz Loskot
Mateusz Loskot added the comment: In file Modulfileio.c, I messed the path and filename above I meant: In file Modules/_io/fileio.c, -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17797

[issue17796] No mimetype guessed for tar.xz url

2013-04-19 Thread R. David Murray
R. David Murray added the comment: Adding xz was treated as an enhancement in issue 16316. Our thinking about applying these types of changes as bug fixes has evolved a bit, so I think we can consider backporting it. -- nosy: +r.david.murray ___

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Maybe check_fd(fd) could be used in initstdio as well. Can you check whether it's the same for the other files? What are the values for fileno(stdout) and fileno(stderr)? -- ___ Python tracker

[issue17468] Generator memory leak

2013-04-19 Thread Anssi Kääriäinen
Anssi Kääriäinen added the comment: True, except GeneratorExit will run at garbage collection time and this will result in reference cycle problems. Checking if there is no except GeneratorExit clause might be too complicated. I still think this is worth a brief note in the gc docs. The gc

[issue17468] Generator memory leak

2013-04-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: A documentation patch sounds good to me. -- assignee: - docs@python components: +Documentation nosy: +docs@python type: resource usage - behavior ___ Python tracker rep...@bugs.python.org

[issue17177] Document/deprecate imp

2013-04-19 Thread Brett Cannon
Brett Cannon added the comment: The deprecation warnings for the explicitly deprecated functions already have the instructions on how to port. A note could probably be added to turn on deprecation warnings if one needs help with moving code over. But the deprecation isn't even officially

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Mateusz Loskot
Mateusz Loskot added the comment: Replacing if the current test in Python 3.2 if (fd 0) with if (check_fd(fd) 0) Seems to be a working solution. I just noticed, that in current Python/pythonrun.c in the repo, there the fd 0 tests have been replaced with new function is_valid_fd(). But,

[issue17732] distutils.cfg Can Break venv

2013-04-19 Thread Nick Sloan
Nick Sloan added the comment: Responded to comments with an updated patch. Thanks for all the feedback, and sorry for the silly mistakes. Should have read up more thoroughly on the docs style guide and the terminology. Hopefully the latest patch is ready to go (or at least, nearly so).

[issue17177] Document/deprecate imp

2013-04-19 Thread R. David Murray
R. David Murray added the comment: Should we back out that module level deprecation notice for the moment, then? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17177 ___

[issue3778] python uninstaller leave registry entries

2013-04-19 Thread anatoly techtonik
anatoly techtonik added the comment: What is the reason for not following the good practice? Is it so hard to fix? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3778 ___

[issue3778] python uninstaller leave registry entries

2013-04-19 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- nosy: -michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3778 ___ ___

[issue3778] python uninstaller leave registry entries

2013-04-19 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3778 ___ ___ Python-bugs-list

[issue17177] Document/deprecate imp

2013-04-19 Thread Brett Cannon
Brett Cannon added the comment: Nah, consider it motivation for me to get it done in Python 3.4 else I have to back it out before release. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17177

[issue17468] Generator memory leak

2013-04-19 Thread Nick Coghlan
Nick Coghlan added the comment: Adding Guido because this appears to be due to a longstanding difference between the handling of tp_del and most other slots Specifically, the reason for the odd behaviour appears to be that generator objects define tp_del [1] (which is what the cyclic gc

[issue17764] Support http.server passing bind address via commend line argument

2013-04-19 Thread Berker Peksag
Berker Peksag added the comment: I left comments on Rietveld. The patch also needs a documentation update. -- nosy: +berker.peksag stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17764

[issue17468] Generator memory leak

2013-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: With the advent of yield-based asynchronous programming, it is going to be problematic if a generator caught in a reference cycle can create a memory leak. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue17796] No mimetype guessed for tar.xz url

2013-04-19 Thread Éric Araujo
Éric Araujo added the comment: +1 -- nosy: +eric.araujo stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17796 ___ ___

[issue17796] No mimetype guessed for tar.xz url

2013-04-19 Thread Éric Araujo
Éric Araujo added the comment: Let’s keep using that other bug report. -- resolution: - duplicate stage: needs patch - committed/rejected status: open - closed superseder: - Support xz compression in mimetypes module ___ Python tracker

[issue17468] Generator memory leak

2013-04-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think the creation of __del__ wrappers for extension types is separate from this issue of generator finalization. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17468

[issue16316] Support xz compression in mimetypes module

2013-04-19 Thread Éric Araujo
Éric Araujo added the comment: Small changes in registries (mimetypes, html.entities, sometimes webbrowser) are acceptable in stable branches. Can you backport this? -- stage: committed/rejected - commit review status: closed - open ___ Python

[issue17468] Generator memory leak

2013-04-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yes. Hopefully, the async framework using generators can properly can close() on them, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17468

[issue17468] Generator memory leak

2013-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes. Hopefully, the async framework using generators can properly can close() on them, though. With yield from-based generators, you don't need a trampoline anymore, so the close() call is now left to the application developers (if I'm not mistaken).

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2013-04-19 Thread Todd Rovito
Changes by Todd Rovito rovit...@gmail.com: -- nosy: +Todd.Rovito ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7951 ___ ___ Python-bugs-list

[issue17732] distutils.cfg Can Break venv

2013-04-19 Thread Nick Sloan
Nick Sloan added the comment: Here is another update. It has come to my attention that I missed some options: prefix, exec-prefix, home, user and root These have been added, and the docs and test have been updated to reflect the change. -- Added file:

  1   2   >