Re: Why Python 3?

2014-04-20 Thread Ian Foote
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/04/14 03:34, Michael Torrie wrote: On 04/18/2014 10:49 PM, Andrew Berg wrote: Python 3 is not the future; it is the present. If you're developing an application, just use Python 3.4 and don't look back unless you absolutely positively *need*

Re: Why Python 3?

2014-04-20 Thread Ben Finney
Paul Rubin no.email@nospam.invalid writes: [people I know] use whatever is in the OS distro, and that is generally still 2.6 or 2.7. When the OS contains *both* Python 2 and Python 3, does Python 3 count as “in the OS”? Or will you only count Python 3 as “in the OS” when Python 2 is not

Re: Why Python 3?

2014-04-20 Thread Steven D'Aprano
On Fri, 18 Apr 2014 21:50:09 -0700, Ethan Furman wrote: Use Python 3 if you can. The best reason not to is if you have some critical library that you absolutely need and it's not yet available on 3. That's good advice, but it isn't just applicable to Python 3, it applies to *any* critical

Re: Why Python 3?

2014-04-20 Thread Steven D'Aprano
On Fri, 18 Apr 2014 23:40:18 -0700, Paul Rubin wrote: It's just that the improvement from 2 to 3 is rather small, and 2 works perfectly well and people are used to it, so they keep using it. Spoken like a true ASCII user :-) The killer feature of Python 3 is improved handling of Unicode,

Re: Why Python 3?

2014-04-20 Thread Steven D'Aprano
On Sat, 19 Apr 2014 09:26:53 -0400, Roy Smith wrote: One of the problems is you don't know in advance if something is going to stop you. By committing to P3 now, you are eliminating from possible future use, all of those third-party modules which only support P2. And you don't know which of

Integer and float division [was Re: Why Python 3?]

2014-04-20 Thread Steven D'Aprano
On Sat, 19 Apr 2014 19:37:31 +1000, Chris Angelico wrote: On Sat, Apr 19, 2014 at 7:25 PM, Ian Kelly ian.g.ke...@gmail.com wrote: The change from / denoting classic division to true division really only affects the case where both operands are integers, so far as I'm aware. If you want to

Re: Why Python 3?

2014-04-20 Thread Tim Chase
On 2014-04-20 09:43, Steven D'Aprano wrote: So really the advice comes down to: - if you can, use the latest version of Python, which is 3.4; - if you must, use the version of Python provided by your operating system, which could be anything from Python 2.3 to 3.3; - if you have no

Re: Integer and float division [was Re: Why Python 3?]

2014-04-20 Thread Jussi Piitulainen
Steven D'Aprano writes: It doesn't round, it truncates. [steve@ando ~]$ python2.7 -c print round(799.0/100) 8.0 [steve@ando ~]$ python2.7 -c print 799/100 7 Seems it floors rather than truncates: $ python2.7 -c from math import trunc;print trunc(799./-100) -7 $ python2.7 -c from math

ctypes: returning an array from a subroutine

2014-04-20 Thread Alex van der Spek
I have a C code function like this: ++ int __declspec(dllexport) __stdcall bnd2prb(float *in, float *out, int init) {enum {OK, Error, Not_Valid}; ... return(OK): } ++ And in Python I am trying to call this C function: ++

Re: Why Python 3?

2014-04-20 Thread Michael Torrie
On 04/20/2014 02:47 AM, Ian Foote wrote: Depends on what OS you want to be running on. I don't know of any currently-supported Enterprise distributions (long-term support) that ship with Python 3.4. I don't know if you'd count it as an Enterprise distribution, but ubuntu 14.04 (LTS) ships

Re: Integer and float division [was Re: Why Python 3?]

2014-04-20 Thread Steven D'Aprano
On Sun, 20 Apr 2014 15:38:03 +0300, Jussi Piitulainen wrote: Steven D'Aprano writes: It doesn't round, it truncates. [steve@ando ~]$ python2.7 -c print round(799.0/100) 8.0 [steve@ando ~]$ python2.7 -c print 799/100 7 Seems it floors rather than truncates: $ python2.7 -c from math

Re: ctypes: returning an array from a subroutine

2014-04-20 Thread Alex van der Spek
Many hours later I found a working solutions in ctypes: The below makes sense to me but I am still at a loss why the first solution did not work. Anybody willing to explain for my better understanding? Regards, Alex van der Spek _snns =

Re: Why Python 3?

2014-04-20 Thread Ian Kelly
On Apr 19, 2014 2:54 PM, Chris Angelico ros...@gmail.com wrote: On Sun, Apr 20, 2014 at 6:38 AM, Ian Kelly ian.g.ke...@gmail.com wrote: Or you just cast one of them to float. That way you're sure you're working with floats. Which is inappropriate if the type passed in was a Decimal or a

[OT] Testing and credentials best practices?

2014-04-20 Thread Miki Tebeka
Greetings, How do you deal with tests (both on dev machine and Jenkins) that need credentials (such as AWS keys)?. I know of the following methods: 1. Test user with known (stored in source control) limited credentials 2. ~/.secrets (or any other known location) RC file which is not in source

Re: Why Python 3?

2014-04-20 Thread MRAB
On 2014-04-20 17:22, Ian Kelly wrote: On Apr 19, 2014 2:54 PM, Chris Angelico ros...@gmail.com mailto:ros...@gmail.com wrote: On Sun, Apr 20, 2014 at 6:38 AM, Ian Kelly ian.g.ke...@gmail.com mailto:ian.g.ke...@gmail.com wrote: Or you just cast one of them to float. That way you're sure

Re: Why Python 3?

2014-04-20 Thread Chris Angelico
On Mon, Apr 21, 2014 at 2:22 AM, Ian Kelly ian.g.ke...@gmail.com wrote: When I'm writing a generic average function, I probably don't know whether it will ever be used to average complex numbers. This keeps coming up in these discussions. How often do you really write a function that generic?

Re: [OT] Testing and credentials best practices?

2014-04-20 Thread Chris Angelico
On Mon, Apr 21, 2014 at 2:36 AM, Miki Tebeka miki.teb...@gmail.com wrote: How do you deal with tests (both on dev machine and Jenkins) that need credentials (such as AWS keys)?. I know of the following methods: 1. Test user with known (stored in source control) limited credentials 2.

Re: Why Python 3?

2014-04-20 Thread CHIN Dihedral
On Saturday, April 19, 2014 12:50:09 PM UTC+8, Ethan Furman wrote: On 04/18/2014 08:28 PM, Anthony Papillion wrote: What is the general feel of /this/ community? I'm about to start a large scale Python project. Should it be done in 2 or 3? What are the benefits, aside from the

Re: Why Python 3?

2014-04-20 Thread Bernd Waterkamp
Michael Torrie schrieb: For example, RHEL 6 is Red Hat's most current enterprise distribution and it does not yet even ship Python 2.7, to say nothing of Python 3. RHEL 7 has python 2.7 as the default system dependency, and currently does not yet have any python3 packages in the official

symple programming task

2014-04-20 Thread Ivan Ivanivich
hi all, i have simple programming task: [quot] If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. [/quote] this task from http://projecteuler.net/ site I

Re: symple programming task

2014-04-20 Thread Chris Angelico
On Mon, Apr 21, 2014 at 4:43 AM, Ivan Ivanivich ivriabt...@gmail.com wrote: [quot] If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. [/quote] this task

Re: symple programming task

2014-04-20 Thread Peter Otten
Ivan Ivanivich wrote: hi all, i have simple programming task: [quot] If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. [/quote] this task from

Re: symple programming task

2014-04-20 Thread Joel Goldstick
On Sun, Apr 20, 2014 at 3:02 PM, Chris Angelico ros...@gmail.com wrote: On Mon, Apr 21, 2014 at 4:43 AM, Ivan Ivanivich ivriabt...@gmail.com wrote: [quot] If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Re: symple programming task

2014-04-20 Thread Ivan Ivanivich
On Sunday, April 20, 2014 10:43:37 PM UTC+4, Ivan Ivanivich wrote: hi all, i have simple programming task: [quot] If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples

Re: Why Python 3?

2014-04-20 Thread Michael Torrie
On 04/20/2014 12:02 PM, Bernd Waterkamp wrote: Michael Torrie schrieb: For example, RHEL 6 is Red Hat's most current enterprise distribution and it does not yet even ship Python 2.7, to say nothing of Python 3. RHEL 7 has python 2.7 as the default system dependency, and currently does not

Re: [OT] Testing and credentials best practices?

2014-04-20 Thread Roy Smith
In article 267e12d3-ea01-4886-bfa7-5c7270adb...@googlegroups.com, Miki Tebeka miki.teb...@gmail.com wrote: Greetings, How do you deal with tests (both on dev machine and Jenkins) that need credentials (such as AWS keys)?. I know of the following methods: 1. Test user with known (stored

Re: Why Python 3?

2014-04-20 Thread Roy Smith
In article mailman.9383.1398012417.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Mon, Apr 21, 2014 at 2:22 AM, Ian Kelly ian.g.ke...@gmail.com wrote: When I'm writing a generic average function, I probably don't know whether it will ever be used to average complex

Re: Why Python 3?

2014-04-20 Thread Terry Reedy
On 4/20/2014 5:40 PM, Roy Smith wrote: In article mailman.9383.1398012417.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Mon, Apr 21, 2014 at 2:22 AM, Ian Kelly ian.g.ke...@gmail.com wrote: When I'm writing a generic average function, I probably don't know whether

Re: Why Python 3?

2014-04-20 Thread Richard Damon
On 4/20/14, 5:40 PM, Roy Smith wrote: In article mailman.9383.1398012417.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Mon, Apr 21, 2014 at 2:22 AM, Ian Kelly ian.g.ke...@gmail.com wrote: When I'm writing a generic average function, I probably don't know whether

how to string format when string have {

2014-04-20 Thread Mariano DAngelo
I have the following string: nginx_conf = ''' server { listen 80; server_name dev.{project_url}; location / { proxy_pass http://127.0.0.1:8080; include /etc/nginx/proxy.conf; } location /media { alias

Re: how to string format when string have {

2014-04-20 Thread Chris Angelico
On Mon, Apr 21, 2014 at 8:34 AM, Mariano DAngelo marianoa.dang...@gmail.com wrote: And I want to format like this: context = { project_name:project_name, project_url:project_url, } nginx_conf.format(**context) but since the string have { i can't. Is there a way to solve this? Are

Re: Why Python 3?

2014-04-20 Thread Gregory Ewing
Chris Angelico wrote: Truncating vs true is not the same as int vs float. If you mean to explicitly request float division, you call float() on one or both arguments. You're being explicit about something different. If you know you're dealing with either ints or floats, which is true in the

Re: Why Python 3?

2014-04-20 Thread Gregory Ewing
Terry Reedy wrote: On 4/19/2014 9:06 PM, Gregory Ewing wrote: Similarly, when you write // you're explicitly requesting integer division. One is requesting 'floor division' 3.0//2.0 1.0 In general that's true, but I'm talking about a context in which you have some expectations as to the

Re: Why Python 3?

2014-04-20 Thread Chris Angelico
On Mon, Apr 21, 2014 at 8:52 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Chris Angelico wrote: Truncating vs true is not the same as int vs float. If you mean to explicitly request float division, you call float() on one or both arguments. You're being explicit about something

Re: how to string format when string have {

2014-04-20 Thread Tim Chase
On 2014-04-20 15:34, Mariano DAngelo wrote: I have the following string: ... but since the string have { i can't. Is there a way to solve this? I second Chris Angelico's suggestion about using the older percent formatting: nginx_conf = ''' server { listen 80; server_name

Re: Integer and float division [was Re: Why Python 3?]

2014-04-20 Thread Gregory Ewing
On Sat, 19 Apr 2014 19:37:31 +1000, Chris Angelico wrote: In Python 3, you have to say Oh but I want my integer division to result in an integer: I don't see why that's such a big hardship. There are clear advantages to having an explicit way to request non-floor division. Whatever way is

Re: Why Python 3?

2014-04-20 Thread Walter Hurry
On Sat, 19 Apr 2014 20:25:32 -0700, Paul Rubin wrote: Terry Reedy tjre...@udel.edu writes: LibreOffice bundles 3.3. So anyone who does Python scripting in LibreOffice is using Python 3. Actually, I believe LO uses Python internally for some of its scripting. If so, everyone using LO is

Re: Why Python 3?

2014-04-20 Thread Gregory Ewing
Ian Kelly wrote: def average(values): return sum(values) / len(values) This works for decimals, it works for fractions, it works for complex numbers, it works for numpy types, and in Python 3 it works for ints. That depends on what you mean by works. I would actually find it rather

Re: Why Python 3?

2014-04-20 Thread Chris Angelico
On Mon, Apr 21, 2014 at 9:50 AM, Walter Hurry walterhu...@lavabit.com wrote: I would use Python 3 in a flash if only wxPython would support it. There seems to be a Project Phoenix (found it at the other end of a Google search) with that goal. I've no idea what its status is, but you could help

Re: Why Python 3?

2014-04-20 Thread Terry Reedy
On 4/20/2014 7:13 PM, Gregory Ewing wrote: Terry Reedy wrote: On 4/19/2014 9:06 PM, Gregory Ewing wrote: Similarly, when you write // you're explicitly requesting integer division. One is requesting 'floor division' 3.0//2.0 1.0 The name 'floor division' and the float result are

Re: Why Python 3?

2014-04-20 Thread Mark Lawrence
On 21/04/2014 00:50, Walter Hurry wrote: On Sat, 19 Apr 2014 20:25:32 -0700, Paul Rubin wrote: Terry Reedy tjre...@udel.edu writes: LibreOffice bundles 3.3. So anyone who does Python scripting in LibreOffice is using Python 3. Actually, I believe LO uses Python internally for some of its

Re: Why Python 3?

2014-04-20 Thread Gregory Ewing
Richard Damon wrote: If you thing of the Standard Deviation being the Root Mean Norm2 of the deviations, it has a very similar meaning as to over the reals, a measure of the spread of the values. NumPy appears to handle this: http://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html

Re: Why Python 3?

2014-04-20 Thread Ian Kelly
On Apr 20, 2014 8:01 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Ian Kelly wrote: def average(values): return sum(values) / len(values) This works for decimals, it works for fractions, it works for complex numbers, it works for numpy types, and in Python 3 it works for ints.

Re: Why Python 3?

2014-04-20 Thread Steven D'Aprano
On Sun, 20 Apr 2014 14:40:38 -0700, Roy Smith wrote: In article mailman.9383.1398012417.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Mon, Apr 21, 2014 at 2:22 AM, Ian Kelly ian.g.ke...@gmail.com wrote: When I'm writing a generic average function, I probably

Re: Why Python 3?

2014-04-20 Thread Steven D'Aprano
On Mon, 21 Apr 2014 09:24:09 +1000, Chris Angelico wrote: On Mon, Apr 21, 2014 at 8:52 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Chris Angelico wrote: Truncating vs true is not the same as int vs float. If you mean to explicitly request float division, you call float() on one or

Re: Why Python 3?

2014-04-20 Thread HoneyMonster
On Mon, 21 Apr 2014 10:00:01 +1000, Chris Angelico wrote: On Mon, Apr 21, 2014 at 9:50 AM, Walter Hurry walterhu...@lavabit.com wrote: I would use Python 3 in a flash if only wxPython would support it. There seems to be a Project Phoenix (found it at the other end of a Google search) with

Re: Why Python 3?

2014-04-20 Thread Chris Angelico
On Mon, Apr 21, 2014 at 1:43 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Explicitly choosing float division: x / float(y) But here you're not choosing an *operator*, you're choosing a *type*. With this model, how do I distinguish between floor division and true division

Re: Why Python 3?

2014-04-20 Thread Chris Angelico
On Mon, Apr 21, 2014 at 1:43 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Both explicit forms can be done cleanly without empowering the language with the magic of int/int-float. It's hardly magic, and I really am having difficult in working out exactly what your objection

[issue21314] Bizarre help

2014-04-20 Thread Vedran Čačić
New submission from Vedran Čačić: Please look at the output of help(object.__ge__). 1. What's that $ in front of self? lt and gt don't have it. 2. What's that / as a third argument? Many wrapper functions have it (for example, see help(tuple.__len__). 3. What's that -- as the first line of

[issue10614] ZipFile: add a filename_encoding argument

2014-04-20 Thread INADA Naoki
Changes by INADA Naoki songofaca...@gmail.com: -- nosy: +naoki ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10614 ___ ___ Python-bugs-list

[issue21314] Bizarre help

2014-04-20 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: docs@python - larry nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21314 ___

[issue21314] Bizarre help

2014-04-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: I don't know about the other bits, but that trailing '/' is how Argument Clinic (which makes full featured inspection available to built-in functions) notes that the parameters are positional only, and cannot be passed by keyword. See PEP436. --

[issue21314] Bizarre help

2014-04-20 Thread Zachary Ware
Zachary Ware added the comment: 1) This was due to a typo. The release of Python 3.4 saw the introduction of new introspection information on many C-implemented functions thanks to Argument Clinic (see PEP 436, I think it is). As part of that (still ongoing) transition, the default doctrings

[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-20 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: The added comment contains This workaround should be removed in 3.5.0.. Since default branch now contains Python 3.5, maybe it is time to remove workaround on default branch? -- nosy: +Arfrever

[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2014-04-20 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: Removed file: http://bugs.python.org/file34925/issue9291.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9291 ___

[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2014-04-20 Thread Tim Golden
Tim Golden added the comment: Another version of the patch: this one, in addition to removing the unnecessary encodes, also does the check for extensions before attempting to open the registry key, and narrows down the try-catch block to just the attempt to read the Content Type value. This

[issue8387] use universal newline mode in csv module examples

2014-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that 'U' is a no-op under Python 3, it's just there for compatibility reasons; i.e. 'rU' is the same as 'r'. Also, from a quick glance, the CSV parser in _csv.c looks newline-agnostic. @sfinnie: can you explain which problems you encountered running the

[issue21296] smtplib Sends Commands in Lower-Case

2014-04-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- priority: normal - low type: behavior - enhancement versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21296

[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-20 Thread Guido van Rossum
Guido van Rossum added the comment: IMO the comment is too aggressive. I want the workaround to stay in the codebase so CPython asyncio ans Tulip asyncio (== upstream) don't diverge. -- ___ Python tracker rep...@bugs.python.org

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-20 Thread Ezio Melotti
Ezio Melotti added the comment: Have you considered how this is going to change if/when PEP 462 will be implemented? AFAIU PEP 462 suggests that commits happen directly from the bug tracker (or something equivalent), so we will likely start to add the NEWS entry there as well. Assuming this

[issue21297] csv.skipinitialspace only skips spaces, not whitespace in general

2014-04-20 Thread Daniel Andersson
Daniel Andersson added the comment: No, multiple spaces are ignored as advertised (according to actual tests; not just reading the code), but only spaces (U+0020) and not e.g. tabs (U+0009), which are also included in the term whitespace, along with several other characters. In light of your

[issue21315] email._header_value_parser does not recognise in-line encoding changes

2014-04-20 Thread Merlijn van Deen
New submission from Merlijn van Deen: Bugzilla sends e-mail in a format where =?UTF-8 is not preceded by whitespace. This makes email.headerregistry.UnstructuredHeader (and email._header_value_parser on the background) not recognise the structure. import email.headerregistry, pprint x = {};

[issue21315] email._header_value_parser does not recognise in-line encoding changes

2014-04-20 Thread Merlijn van Deen
Changes by Merlijn van Deen valhall...@gmail.com: -- keywords: +patch type: - behavior Added file: http://bugs.python.org/file34985/unstructured_ew_without_whitespace.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21315

[issue8387] use universal newline mode in csv module examples

2014-04-20 Thread Jessica McKellar
Jessica McKellar added the comment: I realized that I typo'd 2 instead of 3 in http://bugs.python.org/issue8387#msg216888 which makes that message confusing. Here's a restatement of my findings: * All of the Python 3 csv examples work in Python 3 on all platforms. * The Python 2 binary-mode

[issue15002] urllib2 does not download 4 MB file completely using ftp

2014-04-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset bb71b71322a3 by Senthil Kumaran in branch '3.4': urllib.response object to use _TemporaryFileWrapper (and _TemporaryFileCloser) http://hg.python.org/cpython/rev/bb71b71322a3 New changeset 72fe23edfec6 by Senthil Kumaran in branch '3.4': NEWS entry

[issue15002] urllib2 does not download 4 MB file completely using ftp

2014-04-20 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is fixed in 3.4 and 3.5. I will backport to 2.7 ( I think, it is worth it). -- resolution: - fixed stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15002

[issue20760] test_compileall test getting failed on 3.4 RC

2014-04-20 Thread Aapo Rantalainen
Aapo Rantalainen added the comment: I got exactly same trace with Python-3.4.0. == CPython 3.4.0 (default, Apr 19 2014, 16:37:49) [GCC 4.2.1] == Linux-2.6.28.10-power52-armv7l-with-debian-testing-unstable little-endian Btw: My test-directory is writable. (This seems to be duplicate, but is

[issue21316] mark test_devpoll to be meaningfull only for Solaris

2014-04-20 Thread Aapo Rantalainen
New submission from Aapo Rantalainen: [ 96/389/2] test_devpoll Actual happened: test_devpoll skipped -- select.devpoll not defined Excepted: test works only on Solaris Took me a while until I read documentation: select.devpoll() - (Only supported on Solaris and derivatives.) Even

[issue20585] urllib2 unrelease KQUEUE on Mac OSX 10.9+

2014-04-20 Thread Lita Cho
Lita Cho added the comment: Going to try working on this. -- nosy: +Lita.Cho ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20585 ___ ___

[issue17552] socket.sendfile()

2014-04-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New patch in attachment. Changes: - docs - replaced select() / poll() with the new selectors module - file position is always updated both on return and on error; this means file.tell() is the designated way to know how many bytes were sent - replaced

[issue17552] socket.sendfile()

2014-04-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17552 ___ ___

[issue837046] pyport.h redeclares gethostname() if SOLARIS is defined

2014-04-20 Thread James Bostock
James Bostock added the comment: I have not compiled Python from source code for many years and no longer have access to Solaris machines so I cannot say whether or not this is still a problem. -- ___ Python tracker rep...@bugs.python.org

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: PEP 462 is months away from going anywhere, and I personally find the current NEWS handling a major barrier to feeling inclined to work on bug fixes. The status quo will *definitely* be PEP 462 incompatible, though, since it would typically prevent applying the

[issue20962] Rather modest chunk size in gzip.GzipFile

2014-04-20 Thread Ezio Melotti
Ezio Melotti added the comment: You should try with different chunk and file sizes and see what is the best compromise. Tagging as easy in case someone wants to put together a small script to benchmark this (maybe it could even be added to http://hg.python.org/benchmarks/), or even a patch.

[issue20969] Author of EPUB version of Python docs is set to Unknown instead of PSF

2014-04-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy nosy: +ezio.melotti stage: - needs patch versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20969 ___

[issue20977] pyflakes: undefined ctype in 2 except blocks in the email module

2014-04-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20977 ___

[issue20997] Wrong URL fragment identifier in search result

2014-04-20 Thread Ezio Melotti
Ezio Melotti added the comment: It might be a bug in the older Sphinx version used to build the 2.x docs. If this is the case, it's probably not worth fixing. Georg? -- nosy: +ezio.melotti, georg.brandl resolution: - wont fix status: open - pending

[issue21213] Memory bomb by incorrect custom serializer to json.dumps

2014-04-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, pitrou, rhettinger type: - behavior versions: +Python 3.4, Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21213

[issue21221] Minor struct_time documentation bug

2014-04-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21221 ___

[issue21231] Issue a python 3 warning when old style classes are defined.

2014-04-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Interpreter Core nosy: +ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21231 ___

[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-20 Thread Ezio Melotti
Ezio Melotti added the comment: I think that the general consensus is that changing the value of True and False is not supported, and the result of doing it is undefined, so I think Ned request is reasonable. -- nosy: +ezio.melotti ___ Python

[issue21278] Running the test suite with -v makes the test_ctypes and the test_zipimport erroneously reported as failed

2014-04-20 Thread Ezio Melotti
Ezio Melotti added the comment: Do you want to propose a patch? -- components: +Tests nosy: +ezio.melotti type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21278 ___

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-20 Thread R. David Murray
R. David Murray added the comment: Yes, after thinking about this this weekend, it is clear to me that in the future we will *need* a scheme where by the NEWS entry can be safely included in the patch in some form. I think the commit message is also going to be in the patch, which will be in

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: A file per news entry seems a bit much, but an optional file per developer would solve most of the problem for those who have a problem with the status quo. Add a directory named, for instance, news.3.4.1. Put in a template with the allowed section headings.

[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you want to backport, go ahead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21232 ___ ___

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is already not a rule because the devguide mentions inserting new items at random positions to avoid conflicts due to another commit. Really? New NEWS entries are customarily added at or near the top of their respective sections, so that entries

[issue21231] Issue a python 3 warning when old style classes are defined.

2014-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Your changes in ceval.c introduce a bug (missing braces). Besides, I'm not sure it's a good idea. What if you're extending a class provided by a third-party library? (just because it's an old-style class doesn't mean it won't work fine under 3.x) --

[issue20962] Rather modest chunk size in gzip.GzipFile

2014-04-20 Thread Skip Montanaro
Skip Montanaro added the comment: Here's a straightforward patch. I didn't want to change the public API of the module, so just defined the chunk size with a leading underscore. Gzip tests continue to pass. -- keywords: +patch stage: needs patch - patch review Added file:

[issue21317] Home page certificate troubles

2014-04-20 Thread Dolda2000
New submission from Dolda2000: This is misfiled under Documentation since it affects the documentation peripherally and I couldn't find any better component to file it under. To get to the point, the website seems to have certificate troubles for some URLs affecting the older versions of

[issue21317] Home page certificate troubles

2014-04-20 Thread Alex Gaynor
Alex Gaynor added the comment: The infra team is looking into this, and I believe it should be fixed by now. (None of the infra people really are on this issue tracker, so I'm closing this, sorry :-/) -- nosy: +alex resolution: - fixed status: open - closed

[issue21318] sdist fails with symbolic links do non-existing files

2014-04-20 Thread Jan Gosmann
New submission from Jan Gosmann: If there is a symbolic link to a non-existing file anywhere in the source tree python setup.py sdist fails with an output like the following: running sdist running check warning: check: missing required meta-data: url error: abc: No such file

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: On 4/20/2014 7:59 PM, Antoine Pitrou wrote: Antoine Pitrou added the comment: This is already not a rule because the devguide mentions inserting new items at random positions to avoid conflicts due to another commit. Really? New NEWS entries are

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: For the recommendation actually put in the devguide, change 'random position' to 'position near but not at the top'. https://docs.python.org/devguide/committing.html#news-entries ends with A nice trick to make Mercurial’s automatic file merge work more smoothly

[issue21231] Issue a python 3 warning when old style classes are defined.

2014-04-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: As I said on irc, I predict this will be extremely spammy not only on the stdlib but also on dependencies which people have no control over. -- ___ Python tracker rep...@bugs.python.org

[issue19771] runpy should check ImportError.name before wrapping it

2014-04-20 Thread Luiz Poleto
Luiz Poleto added the comment: The attached patch provide test cases to validate this error. As noted by R. David Murray in a discussion in the Core-Mentorship list, this error in fact happens then __init__.py throws an ImportError. -- keywords: +patch nosy: +poleto Added file:

[issue19771] runpy should check ImportError.name before wrapping it

2014-04-20 Thread Luiz Poleto
Luiz Poleto added the comment: As suggested by Nick, the fix is done be verifying the name attribute of the raised ImportError exception; the exception is then re-raised with the appropriate description. -- Added file: http://bugs.python.org/file34989/issue_19771.patch

[issue21319] WindowsRegistryFinder never added to sys.meta_path

2014-04-20 Thread Eric Snow
New submission from Eric Snow: For #14578 we added WindowsRegistryFinder to importlib and try adding it to sys.meta_path during bootstrap (see bd58c421057c). I happened to notice that in _install() in Lib/importlib/_bootstrap.py we check os.__name__. Shouldn't it be os.name? os.__name__ is

[issue21319] WindowsRegistryFinder never added to sys.meta_path

2014-04-20 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- versions: +Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21319 ___

[issue21314] Bizarre help

2014-04-20 Thread Yury Selivanov
Changes by Yury Selivanov yselivanov...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21314 ___ ___

[issue16801] Preserve original representation for integers / floats in docstrings

2014-04-20 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16801 ___ ___ Python-bugs-list

  1   2   >