[issue25581] Python -U raises error during site import

2015-11-08 Thread SilentGhost
SilentGhost added the comment: > Interesting, I didn't even know (remember?) about the -U flag, and it isn't > documented. https://docs.python.org/2/using/cmdline.html#cmdoption-U It isn't clear when this broken or why, but I think existing documentation could be adjusted to have a bigger

Re: Question about math.pi is mutable

2015-11-08 Thread Steven D'Aprano
On Sun, 8 Nov 2015 08:44 pm, Marko Rauhamaa wrote: > Steven D'Aprano : > >> On Sun, 8 Nov 2015 01:23 am, Marko Rauhamaa wrote: >>> Correct. That's not Python's fault, however. Python should not try to >>> placate the performance computing people. (Alas, it is now trying to

Re: Question about math.pi is mutable

2015-11-08 Thread BartC
On 08/11/2015 11:50, Marko Rauhamaa wrote: BartC : On 08/11/2015 11:02, Marko Rauhamaa wrote: That elegant dynamism comes at a cost: method lookup is not a constant memory offset. Rather, it is a dictionary lookup. I've never understood why this seems to be necessary in

[issue25570] urllib.request > Request.add_header("abcd", "efgh") fails with character ":" in first parameter string

2015-11-08 Thread Christian Rickert
Christian Rickert added the comment: >>Ah, I think I see where you are coming from. I guess you aren’t intimately >>familiar with the HTTP protocol. Exactly. :) >>If you can given a specific comment line to add to a specific example, that >>might be useful. Even if you aren’t 100% sure of

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread Daniel Plachotich
New submission from Daniel Plachotich: Since Windows 7 (or even Vista), Windows gives permission error(5, ERROR_ACCESS_DENIED if you try to create a directory in a drive root with the same name as a drive itself, even if you have administrative permissions. This behavior is not mentioned in

[issue22499] [SSL: BAD_WRITE_RETRY] bad write retry in _ssl.c:1636

2015-11-08 Thread Nikolaus Rath
Nikolaus Rath added the comment: This just happened again to someone else, also using Python 3.4: https://bitbucket.org/nikratio/s3ql/issues/87 Is there anything the affected people can do to help debugging this? -- ___ Python tracker

RE: Script to extract text from PDF files

2015-11-08 Thread Dan Strohl
Its possible (likely) that I came into this in the middle, so sorry if this was already thrown out... but have you looked at any of the following suggestions? https://pypi.python.org/pypi?%3Aaction=search=pdf+convert=search http://stackoverflow.com/questions/6413441/python-pdf-library

Python 3.5.0: python.exe is not a valid Windows 32 application

2015-11-08 Thread Tomáš Beňák
Hi, I have downloaded the Python 3.5.0 installer for x86 ( https://www.python.org/ftp/python/3.5.0/python-3.5.0.exe) and have installed it on my Windows XP SP3. The installer run to a successful end, but when I try to run python.exe, it ends with an error saying that python.exe is not a valid

Re: Puzzled

2015-11-08 Thread Michael Torrie
On 11/06/2015 02:36 PM, Robinson, Wendy wrote: > Ah, ok I get it now. > Thanks both! Glad you got it! Thanks for letting us know, too. -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there an archive of the gohlke python binaries on windows

2015-11-08 Thread Chris Warrick
On 8 November 2015 at 06:55, Sayth Renshaw wrote: > Just wondering if there is an archive mirror for these binaries available. i > was looking for lxml 3.4.1 and the current version is the latest on the page > at 3.4.4 being on windows I cannot build it. > >

Re: Question about math.pi is mutable

2015-11-08 Thread Marko Rauhamaa
Steven D'Aprano : > On Sun, 8 Nov 2015 01:23 am, Marko Rauhamaa wrote: >> Correct. That's not Python's fault, however. Python should not try to >> placate the performance computing people. (Alas, it is now trying to >> do just that with the introduction of static typing

Re: Question about math.pi is mutable

2015-11-08 Thread BartC
On 08/11/2015 12:43, Marko Rauhamaa wrote: BartC : On 08/11/2015 11:50, Marko Rauhamaa wrote: import shutil class Source: def __init__(self): self.remaining = "hello world" def

how to copy PyObject * memory data to another memory address?

2015-11-08 Thread yueyoum
I'm working on a C program that has Python embedded. The host program is multi processes, which communicate via shared memory (mmap). I create a Python object (e.g., PyDict_New) in one process. How can I copy this data to shared memory so that the other process can obtain this data and convert

Re: Python 3.5.0: python.exe is not a valid Windows 32 application

2015-11-08 Thread Chris Angelico
On Sun, Nov 8, 2015 at 11:34 PM, Tomáš Beňák wrote: > I have downloaded the Python 3.5.0 installer for x86 ( > https://www.python.org/ftp/python/3.5.0/python-3.5.0.exe) and have > installed it on my Windows XP SP3. The installer run to a successful end, > but when I try to

Re: Question about math.pi is mutable

2015-11-08 Thread Marko Rauhamaa
Paul Rubin : > Marko Rauhamaa writes: >> Point is, the consequences of "proper" use of const are so annoying even >> standard library functions would rather grossly abuse it than tolerate >> compiler warnings everywhere. > > I'm not sure what the C

Re: [Ubuntu] PyQt5

2015-11-08 Thread Laura Creighton
In a message of Sun, 08 Nov 2015 06:36:26 +0100, Vincent Vande Vyvre writes: >Le 08/11/2015 04:13, Andrew Diamond a écrit : >> Hi! >> >> I'm fairly new to Python, and installed pyqt5 and began working through the >> examples at http://zetcode.com/gui/pyqt5/menustoolbars/ However, whenever I >>

Re: Question about math.pi is mutable

2015-11-08 Thread Marko Rauhamaa
Steven D'Aprano : > So... you have no need for Python to be fast, and even less need for > Python code to be correct... Correct. If I didn't think so, I'd still be using Java instead of Python. > Or perhaps you mean that you don't need help writing correct code, > because

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset a13d9656f954 by Martin Panter in branch '3.5': Issue #24802: Update test case for ValueError in 3.5 https://hg.python.org/cpython/rev/a13d9656f954 New changeset 96cdd2532034 by Martin Panter in branch 'default': Issue #24802: Merge ValueError test

[issue25582] Fixed memory leaks in test_ctypes

2015-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry. Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file40979/ctypes_test_leak.patch ___ Python tracker

Re: Question about math.pi is mutable

2015-11-08 Thread Marko Rauhamaa
BartC : > On 08/11/2015 11:50, Marko Rauhamaa wrote: >> >> import shutil >> >> class Source: >> def __init__(self): >> self.remaining = "hello world" >> >> def read(self, count): >>

[ANN] MicroPython 1.5

2015-11-08 Thread Paul Sokolovsky
Hello, MicroPython is a lean and efficient Python implementation for microcontrollers, embedded, and mobile systems (which also runs just as fine on desktops of course). https://github.com/micropython/micropython Recent 1.5 release is an important milestone for the project, major changes

Re: how to copy PyObject * memory data to another memory address?

2015-11-08 Thread Chris Angelico
On Sun, Nov 8, 2015 at 12:23 AM, yueyoum wrote: > I'm working on a C program that has Python embedded. The host program is > multi processes, which communicate via shared memory (mmap). I create a > Python object (e.g., PyDict_New) in one process. How can I copy this data to

Re: how to copy PyObject * memory data to another memory address?

2015-11-08 Thread Laura Creighton
In a message of Sat, 07 Nov 2015 21:23:51 +0800, yueyoum writes: >I'm working on a C program that has Python embedded. The host program is multi >processes, which communicate via shared memory (mmap). I create a Python >object (e.g., PyDict_New) in one process. How can I copy this data to shared

[issue25580] async and await missing from token list

2015-11-08 Thread Martin Panter
Martin Panter added the comment: I wonder if the new tokens need a “versionadded” notice. They were added in revision eeeb666a5365 for 3.5. -- nosy: +martin.panter, yselivanov ___ Python tracker

Re: Question about math.pi is mutable

2015-11-08 Thread Chris Angelico
On Sun, Nov 8, 2015 at 10:19 PM, BartC wrote: > I've never understood why this seems to be necessary in Python. Why do names > have to be looked up? (I'm assuming this is searching by name in some sort > of table.) Yes, if by "searching" you include hash-table lookup. A CPython

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread Daniel Plachotich
Daniel Plachotich added the comment: Probably better solution: if not (exist_ok and path.isdir(name) and e.errno in (errno.EEXIST, errno.EACCES)): -- ___ Python tracker

Re: Question about math.pi is mutable

2015-11-08 Thread Michael Torrie
On 11/08/2015 04:19 AM, BartC wrote: >> That elegant dynamism comes at a cost: method lookup is not a constant >> memory offset. Rather, it is a dictionary lookup. > > I've never understood why this seems to be necessary in Python. Why do > names have to be looked up? (I'm assuming this is

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2015-11-08 Thread anon
anon added the comment: Any update on this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24203] Depreciate threading.Thread.isDaemon etc

2015-11-08 Thread anon
anon added the comment: Any consensus? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25581] Python -U raises error during site import

2015-11-08 Thread STINNER Victor
STINNER Victor added the comment: Reminder: use Python 3 to get an excellent Unicode support everywhere. -- ___ Python tracker ___

Re: Question about math.pi is mutable

2015-11-08 Thread Steven D'Aprano
On Sun, 8 Nov 2015 09:40 pm, Bartc wrote: > On 08/11/2015 02:59, Steven D'Aprano wrote: >> On Sun, 8 Nov 2015 02:01 am, Bartc wrote: >> >>> Neither have the simplicity of concept of Pascal's 'const', which is >>> just a named value. Not a variable that won't change once initialised, >>> not a

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-08 Thread Martin Panter
Martin Panter added the comment: Thanks for picking that up Serhiy -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-11-08 Thread Stefan Krah
Stefan Krah added the comment: > It looks to me that all issues are related to floating points. You need to compile with "-fp-model strict" or the Windows equivalent (I think "-fp-model precise"). -- ___ Python tracker

RE: Puzzled

2015-11-08 Thread Robinson, Wendy
Ah, ok I get it now. Thanks both! Wendy Robinson Audit Analyst -Original Message- From: Chris Gonnerman [mailto:ch...@gonnerman.org] Sent: Friday, November 06, 2015 5:40 AM To: python-list@python.org Cc: Robinson, Wendy Subject: Re: Puzzled Wendy said: > I installed Python 3.5.0

Re: [Ubuntu] PyQt5

2015-11-08 Thread Andrew Diamond
On Saturday, November 7, 2015 at 10:13:25 PM UTC-5, Andrew Diamond wrote: > Hi! > > I'm fairly new to Python, and installed pyqt5 and began working through the > examples at http://zetcode.com/gui/pyqt5/menustoolbars/ However, whenever I > click one of the buttons or menus in the example apps

Re: Is there an archive of the gohlke python binaries on windows

2015-11-08 Thread Sayth Renshaw
On Sunday, 8 November 2015 20:44:02 UTC+11, Chris Warrick wrote: > On 8 November 2015 at 06:55, Sayth Renshaw wrote: > > Just wondering if there is an archive mirror for these binaries available. > > i was looking for lxml 3.4.1 and the current version is the latest on

Re: Question about math.pi is mutable

2015-11-08 Thread BartC
On 08/11/2015 11:30, Steven D'Aprano wrote: On Sun, 8 Nov 2015 09:40 pm, Bartc wrote: This is what I mean about people not understanding it! I'm pretty sure I understand what *I* mean by constant, and what Pascal means by it, and why the Pascal meaning doesn't quite match what Python can

Re: Question about math.pi is mutable

2015-11-08 Thread Marko Rauhamaa
BartC : >>> On 08/11/2015 11:50, Marko Rauhamaa wrote: import shutil class Source: def __init__(self): self.remaining = "hello world" def

Re: Question about math.pi is mutable

2015-11-08 Thread Chris Angelico
On Mon, Nov 9, 2015 at 12:42 AM, BartC wrote: > Sorry, you'll have to assume I'm very stupid. > > What exactly is being looked up, and in what? > > From what I can understand in your example: > > * You are calling shutil.copyfileobj with two arguments, which happen to be >

[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-11-08 Thread Stefan Krah
Stefan Krah added the comment: If anyone worries that "-fp-model strict" will slow things down: In the Python context these settings have no measurable impact: A while ago I tested setting/restoring the control word *for every operation*, and even that did not have any impact. --

New Berkeley DB bindings release: 6.1.1

2015-11-08 Thread Jesus Cea
This module provides a nearly complete wrapping of the Oracle/Sleepycat C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and Transaction objects, and each of these is exposed as a Python type in the bsddb3.db module. The database objects can use various access methods:

[ANN] MicroPython 1.5

2015-11-08 Thread Paul Sokolovsky
Hello, MicroPython is a lean and efficient Python implementation for microcontrollers, embedded, and mobile systems (which also runs just as fine on desktops of course). https://github.com/micropython/micropython Recent 1.5 release is an important milestone for the project, major changes

Re: Python 3.5.0: python.exe is not a valid Windows 32 application

2015-11-08 Thread Laura Creighton
In a message of Sun, 08 Nov 2015 13:34:22 +0100, Tomáš Beňák writes: >Hi, > >I have downloaded the Python 3.5.0 installer for x86 ( >https://www.python.org/ftp/python/3.5.0/python-3.5.0.exe) and have >installed it on my Windows XP SP3. The installer run to a successful end, >but when I try to run

Re: [Ubuntu] PyQt5

2015-11-08 Thread Andrew Diamond
On Sunday, November 8, 2015 at 11:22:30 AM UTC-5, Chris Angelico wrote: > On Mon, Nov 9, 2015 at 3:03 AM, Andrew Diamond wrote: > > On Saturday, November 7, 2015 at 10:13:25 PM UTC-5, Andrew Diamond wrote: > >> Hi! > >> > >> I'm fairly new to Python, and installed pyqt5

Re: Question about math.pi is mutable

2015-11-08 Thread Marko Rauhamaa
Bartc : > (In the case of Python, the main obstacle is that a constant name from > inside an imported module is not visible when this module is compiled > to byte-code. So it has to assume it can be anything.) Which it can. Optimizing for naive floating-point constants could be

Re: Is there an archive of the gohlke python binaries on windows

2015-11-08 Thread Laura Creighton
In a message of Sat, 07 Nov 2015 21:55:32 -0800, Sayth Renshaw writes: >Just wondering if there is an archive mirror for these binaries available. i >was looking for lxml 3.4.1 and the current version is the latest on the page >at 3.4.4 being on windows I cannot build it. >

Re: Question about math.pi is mutable

2015-11-08 Thread Bartc
On 08/11/2015 02:59, Steven D'Aprano wrote: On Sun, 8 Nov 2015 02:01 am, Bartc wrote: Neither have the simplicity of concept of Pascal's 'const', which is just a named value. Not a variable that won't change once initialised, not a parameter that won't be changed nor any addressable location.)

Re: Question about math.pi is mutable

2015-11-08 Thread BartC
On 08/11/2015 03:50, Steven D'Aprano wrote: On Sun, 8 Nov 2015 01:23 am, Marko Rauhamaa wrote: Your point of view is really down-to-earth. It's slightly analogous to protesting against Unicode because you only ever need ASCII. I don't think so, but in any case, Bart is *way* oversimplifying

Re: time module

2015-11-08 Thread Marko Rauhamaa
input/ldompel...@casema.nl: > Yes, I would like seconds since start of program. > Can I not doing something like time()=0 only this gives an error. Here: class MyReckoning: def __init__(self): self.the_beginning = time.time() def time(self): return

Re: Question about math.pi is mutable

2015-11-08 Thread Marko Rauhamaa
BartC : > On 08/11/2015 11:02, Marko Rauhamaa wrote: >> That elegant dynamism comes at a cost: method lookup is not a constant >> memory offset. Rather, it is a dictionary lookup. > > I've never understood why this seems to be necessary in Python. Why do > names have to be looked

[issue19883] Integer overflow in zipimport.c

2015-11-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file40981/zipimport_int_overflow_2.patch ___ Python tracker ___

[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I already don't remember if it was a deliberate design, or just implementation detail. In any case it is not documented. > I believe this behavior matches the documentation: No, it is not related. It is that './**/' will list only directories, not regular

Re: [ANN] MicroPython 1.5

2015-11-08 Thread Paul Rubin
Paul Sokolovsky writes: > Recent 1.5 release is an important milestone for the project, major > changes including: Thanks for posting this. We don't hear enough about MicroPython on this newsgroup so it's good to get these announcements. Is the language still Python 3.4?

Re: [ANN] MicroPython 1.5

2015-11-08 Thread Paul Sokolovsky
Hello, On Sun, 08 Nov 2015 10:28:24 -0800 Paul Rubin wrote: > Paul Sokolovsky writes: > > Recent 1.5 release is an important milestone for the project, major > > changes including: > > Thanks for posting this. We don't hear enough about MicroPython

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread Jakub Stasiak
New submission from Jakub Stasiak: It is my understanding that socket.sendall effectively calls the underlying socket.send's implementation in a retry loop, possibly multiple times. It is also my understanding that each one of those low level send calls can timeout on its own if a socket

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread Daniel Plachotich
Daniel Plachotich added the comment: Of course in examples I create '.' by hand, but in real code such things are mostly automatic. Assume, for example, that you have a function for downloading files: def download_file(url, save_as): ... # Before saving, you must ensure that path exists:

[issue19883] Integer overflow in zipimport.c

2015-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is revised patch. It addresses Gregory's comments, uses properly integer types and converters for all values, and adds additional checks for integer overflows and ZIP file validity. As a side effect the performance can be increased due to less memory

[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-08 Thread Laura Creighton
New submission from Laura Creighton: Somebody reported this today: File "C:/Python27/kivyhello.py", line 4, in from kivy.app import App File "C:/Python27\kivy\app.py", line 316, in from kivy.base import runTouchApp, stopTouchApp File "C:/Python27\kivy\base.py", line 30, in

[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-08 Thread R. David Murray
R. David Murray added the comment: I'm guessing that's the error we got from the OS. Maybe there's additional info we could add, though, I don't know. It would be interesting to know if it does the same thing in python3...and unfortunately it isn't as easy to change things in the python2

Re: Question about math.pi is mutable

2015-11-08 Thread Chris Angelico
On Mon, Nov 9, 2015 at 4:54 AM, BartC wrote: > That would be true for locals as well. But as far as I can tell from the > CPython source code, byte-codes uses an index to represent a local, which > represents an entry into a linear table. > > I can't quite see why that can't be

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread Daniel Plachotich
Daniel Plachotich added the comment: I meant x1.3 times faster on Linux :) -- ___ Python tracker ___ ___

Re: Question about math.pi is mutable

2015-11-08 Thread Ben Finney
BartC writes: > I've never understood why this seems to be necessary in Python. Why do > names have to be looked up? (I'm assuming this is searching by name in > some sort of table.) No, it is literally looking the name up as a key in a namespace dictionary — which is just like

Re: Question about math.pi is mutable

2015-11-08 Thread BartC
On 08/11/2015 21:00, Ben Finney wrote: BartC writes: I've never understood why this seems to be necessary in Python. Why do names have to be looked up? (I'm assuming this is searching by name in some sort of table.) No, it is literally looking the name up as a key in a

[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-08 Thread R. David Murray
R. David Murray added the comment: I believe this behavior matches the documentation: "If the pattern is followed by an os.sep, only directories and subdirectories match." ('the pattern' being '**') I wonder if '***.pacnew' would work. -- nosy: +pitrou, r.david.murray

[issue19883] Integer overflow in zipimport.c

2015-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, the patch contained parts of the advanced patch that will be submitted in separate issue. -- Added file: http://bugs.python.org/file40982/zipimport_int_overflow_2.patch ___ Python tracker

Re: [ANN] MicroPython 1.5

2015-11-08 Thread paul . hermeneutic
What is the possibility that MicroPython could be another build from the base python.org sources? Python already gets built for a variety of architectures. Could a MicroPython be another one? In that way, it would always be up to date on language changes. On Sun, Nov 8, 2015 at 11:28 AM, Paul

Re: Question about math.pi is mutable

2015-11-08 Thread Ian Kelly
On Nov 8, 2015 12:01 PM, "BartC" wrote: > > But then, you say that additional attributes, potentially millions of different ones, can be invented at runtime. Although I don't see how it can remove names that are part of the source code: if "A.B" is in the file, then surely "A"

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread Martin Panter
Martin Panter added the comment: I don’t like the sound of improvement 2. I think it would break existing use cases, e.g. HTTPConnection(timeout=...), urlopen(timeout=...). If you want a HTTP request to abort if it takes a long time, how is that behaviour broken? Regarding improvement 1, I

[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-08 Thread SilentGhost
Changes by SilentGhost : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

Re: Question about math.pi is mutable

2015-11-08 Thread BartC
On 08/11/2015 15:59, Michael Torrie wrote: On 11/08/2015 04:19 AM, BartC wrote: That elegant dynamism comes at a cost: method lookup is not a constant memory offset. Rather, it is a dictionary lookup. I've never understood why this seems to be necessary in Python. Why do names have to be

Re: Question about math.pi is mutable

2015-11-08 Thread BartC
On 08/11/2015 18:01, Chris Angelico wrote: On Mon, Nov 9, 2015 at 4:54 AM, BartC wrote: That would be true for locals as well. But as far as I can tell from the CPython source code, byte-codes uses an index to represent a local, which represents an entry into a linear table.

Re: python PEP suggestion

2015-11-08 Thread André Roberge
On Sunday, 8 November 2015 11:35:32 UTC-4, Dan Strohl wrote: > All, > > I wanted to run the following thought past the list as a possible PEP > enhancement suggestion to see if it feels like something that is worth > proposing. I know it is not in the PEP format at this point, I can, and >

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread STINNER Victor
STINNER Victor added the comment: FYI the behaviour of socket.socket.sendall() regarding timeout has been modified in Python 3.5: https://docs.python.org/dev/library/socket.html#socket.socket.sendall "Changed in version 3.5: The socket timeout is no more reset each time data is sent

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread Daniel Plachotich
Daniel Plachotich added the comment: Of course, exist_ok must be taken into account: if not (exist_ok and path.isdir(name)): mkdir(name, mode) -- ___ Python tracker

Re: python PEP suggestion

2015-11-08 Thread Terry Reedy
On 11/6/2015 1:21 PM, Dan Strohl wrote: All, I wanted to run the following thought past the list as a possible PEP enhancement suggestion to see if it feels like something that is worth proposing. I know it is not in the PEP format at this point, I can, and will, clean it up if needed, I am

[issue19883] Integer overflow in zipimport.c

2015-11-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file40981/zipimport_int_overflow_2.patch ___ Python tracker ___

[issue19883] Integer overflow in zipimport.c

2015-11-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file40980/zipimport_int_overflow_2.patch ___ Python tracker ___

[issue25576] Remove “Content-Type: application/x-www-form-urlencoded; charset” advice

2015-11-08 Thread R. David Murray
R. David Murray added the comment: OK, I'll accept that as authoritative :) One very minor comment in the review, otherwise looks good to me. -- ___ Python tracker

[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-08 Thread R. David Murray
R. David Murray added the comment: If you are trying to create a directory named '.' your code will not do anything useful, you might as well skip the call. What's the use case? That said, the fix looks reasonable. -- nosy: +r.david.murray ___

Re: [ANN] MicroPython 1.5

2015-11-08 Thread Paul Sokolovsky
Hello, On Sun, 8 Nov 2015 12:08:20 -0700 paul.hermeneu...@gmail.com wrote: > What is the possibility that MicroPython could be another build from > the base python.org sources? Python already gets built for a variety > of architectures. Could a MicroPython be another one? In that way, it > would

Re: [ANN] MicroPython 1.5

2015-11-08 Thread Chris Angelico
On Mon, Nov 9, 2015 at 7:53 AM, Paul Sokolovsky wrote: > On Sun, 8 Nov 2015 12:08:20 -0700 > paul.hermeneu...@gmail.com wrote: > >> What is the possibility that MicroPython could be another build from >> the base python.org sources? Python already gets built for a variety >> of

Re: Question about math.pi is mutable

2015-11-08 Thread BartC
On 09/11/2015 00:00, Ben Finney wrote: BartC writes: Is this typical Python code? Creating global objects in other modules (or writing all over essential data structures in a library module). Not “creating global objects”, but changing the referent of a name in some other

Re: Is there an archive of the gohlke python binaries on windows

2015-11-08 Thread Sayth Renshaw
On Sunday, 8 November 2015 21:30:59 UTC+11, Laura Creighton wrote: > In a message of Sat, 07 Nov 2015 21:55:32 -0800, Sayth Renshaw writes: > >Just wondering if there is an archive mirror for these binaries available. i > >was looking for lxml 3.4.1 and the current version is the latest on the

Re: Python version of Ruby devkit - Advice On library compilation

2015-11-08 Thread Chris Angelico
On Mon, Nov 9, 2015 at 11:33 AM, Sayth Renshaw wrote: > I was wondering if there is a reason that we on windows with python do not > have a version of Ruby devkit for python. > Many of us here don't use Ruby. Can you elaborate on what "devkit" does, please? ChrisA --

Re: Question about math.pi is mutable

2015-11-08 Thread Steven D'Aprano
On Sun, 8 Nov 2015 11:28 pm, Chris Angelico wrote: > On Sun, Nov 8, 2015 at 10:19 PM, BartC wrote: >> I've never understood why this seems to be necessary in Python. Why do >> names have to be looked up? (I'm assuming this is searching by name in >> some sort of table.) > >

[issue25570] urllib.request > Request.add_header("abcd", "efgh") fails with character ":" in first parameter string

2015-11-08 Thread Martin Panter
Martin Panter added the comment: Hmm, I wonder if that OpenerDirector example is a bit obscure. Normally you would use the default urlopen() to set User-Agent, without resorting to a custom OpenerDirector. In my patch: * Included “User-Agent header _value_” in the “headers” parameter

Re: Question about math.pi is mutable

2015-11-08 Thread Steven D'Aprano
On Sun, 8 Nov 2015 11:39 pm, BartC wrote: >> shutil.copyfileobj(Source(), Dest()) >> > > OK, so here, it is necessary to resolve "copyfileobj" by seeing if > "shutil" is something that contains a name "copyfileobj" that

Re: Question about math.pi is mutable

2015-11-08 Thread Ben Finney
Chris Angelico writes: > Hmm, then I was misunderstanding what BartC was advocating. I didn't > think it would *fail* in the presence of dynamic attributes, but > merely *perform suboptimally* (and presumably worse than current > CPython). There isn't a way for the compiler to

Re: [Ubuntu] PyQt5

2015-11-08 Thread Laura Creighton
In a message of Sun, 08 Nov 2015 18:05:32 -0500, Terry Reedy writes: >On 11/8/2015 11:03 AM, Andrew Diamond wrote: >> On Saturday, November 7, 2015 at 10:13:25 PM UTC-5, Andrew Diamond >> wrote: >>> Hi! >>> >>> I'm fairly new to Python, and installed pyqt5 and began working >>> through the

Re: Question about math.pi is mutable

2015-11-08 Thread Ben Finney
Chris Angelico writes: > Testing/mocking is a completely separate consideration (eg you can > inject a shadow for a built-in name) Not for the purpose of making compiler optimisations, as BartC is advocating. The compiler definitely should not treat “is this code part of a

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: Martin: While I'd consider timeout in HTTPConnection(timeout=...) or urlopen(timeout=...) to be the timeout for the entire operation, just just for the data sending part and HTTPConnection/urlopen can achieve the timeout behavior using just send I concede

Re: Question about math.pi is mutable

2015-11-08 Thread Ben Finney
BartC writes: > Is this typical Python code? Creating global objects in other modules > (or writing all over essential data structures in a library module). Not “creating global objects”, but changing the referent of a name in some other module. Yes, that's quite a common

Re: Question about math.pi is mutable

2015-11-08 Thread Chris Angelico
On Mon, Nov 9, 2015 at 11:00 AM, Ben Finney wrote: > BartC writes: > >> Is this typical Python code? Creating global objects in other modules >> (or writing all over essential data structures in a library module). > > Not “creating global objects”,

Re: Question about math.pi is mutable

2015-11-08 Thread Ben Finney
Chris Angelico writes: > On Mon, Nov 9, 2015 at 11:26 AM, Ben Finney > wrote: > > Chris Angelico writes: > > > >> Testing/mocking is a completely separate consideration (eg you can > >> inject a shadow for a built-in name) > > >

Re: Question about math.pi is mutable

2015-11-08 Thread Chris Angelico
On Mon, Nov 9, 2015 at 11:50 AM, Ben Finney wrote: > You misunderstand me. I'm not saying the optimisations would be > crippled. I am saying that, in order to achieve those optimisations, the > *test code* would be crippled. > > I am pointing out that the assumption

[issue25586] socket.sendall broken when a socket has a timeout

2015-11-08 Thread Martin Panter
Martin Panter added the comment: Maybe it would be reasonable to expand on that “On error” sentence. I imagine the main errors that would cause this situation are a timeout as you say, and also a blocking exception. Also, you could point out that if you have lost record of how much has

Re: Question about math.pi is mutable

2015-11-08 Thread Steven D'Aprano
On Mon, 9 Nov 2015 09:35 am, BartC wrote: > Suppose this is the python program: > > import m > a=10 > b=20 > c=30 > m.f() > > The set of global names the compiler knows will be ("m","a","b","c"). Wrong. Up to the line "c=30", the set of names the compiler can infer are m, a, b and c. Once the

Re: [Ubuntu] PyQt5

2015-11-08 Thread Terry Reedy
On 11/8/2015 11:03 AM, Andrew Diamond wrote: On Saturday, November 7, 2015 at 10:13:25 PM UTC-5, Andrew Diamond wrote: Hi! I'm fairly new to Python, and installed pyqt5 and began working through the examples at http://zetcode.com/gui/pyqt5/menustoolbars/ However, whenever I click one of the

[issue25576] Remove “Content-Type: application/x-www-form-urlencoded; charset” advice

2015-11-08 Thread Martin Panter
Martin Panter added the comment: The second version of the patch changes some more examples in the how-to to data.encode("ascii"). I’ll leave this open for a bit in case Senthil is around and wants to comment (seeing as he added the text I am removing). -- Added file:

Re: Question about math.pi is mutable

2015-11-08 Thread Chris Angelico
On Mon, Nov 9, 2015 at 11:26 AM, Ben Finney wrote: > Chris Angelico writes: > >> Testing/mocking is a completely separate consideration (eg you can >> inject a shadow for a built-in name) > > Not for the purpose of making compiler optimisations, as

  1   2   >