[issue25509] PyImport_ImportModule inaccurately described

2015-10-29 Thread Memeplex
New submission from Memeplex: The documentation (for 3.5) states that "[PyImport_ImportModule] is a simplified interface to PyImport_ImportModuleEx()" but the current implementation calls PyImport_Import instead, which is a higher level interface that takes into account import hooks. Older

[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-10-29 Thread Ryosuke Ito
New submission from Ryosuke Ito: In Python3, fileinput.FileInput.readline() always returns str object at the end, even if in 'rb' mode. Here's a test code. import fileinput fi = fileinput.input('test_fileinput.py', mode='rb') while True: line = fi.readline() assert isinstance(line,

Re: Most space-efficient way to store log entries

2015-10-29 Thread Marc Aymerich
On Thu, Oct 29, 2015 at 11:52 AM, Chris Angelico wrote: > On Thu, Oct 29, 2015 at 9:35 PM, Marc Aymerich wrote: >> 1) Each node on the cluster needs to keep track of *all* the changes >> that ever ocurred. So far, each node is storing each change as >>

[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-10-29 Thread Ryosuke Ito
Changes by Ryosuke Ito : -- type: -> behavior ___ Python tracker ___ ___

[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-10-29 Thread Ryosuke Ito
Changes by Ryosuke Ito : -- components: +Library (Lib) versions: +Python 3.5 ___ Python tracker ___

[issue25498] Python 3.4.3 core dump with simple sample code

2015-10-29 Thread Stefan Krah
Stefan Krah added the comment: We should ultimately do something like I suggested in msg235256. Everything else is a hack (N.B.: the issues that 1da9630e9b7f tried to fix were also hacks, so it isn't really the fault of that commit). -- nosy: +skrah

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2015-10-29 Thread Mark Roseman
Mark Roseman added the comment: This (restructuring/refactoring to minimize the subprocess imports) does definitely sound like the right approach. There will be other benefits to breaking up PyShell a bit too.. -- ___ Python tracker

[issue25508] LogRecord attributes are not tuple, when logging only dict

2015-10-29 Thread R. David Murray
R. David Murray added the comment: I believe this is due to the way % formatting works, and so is a doc bug. Vinay will know for sure, of course :) -- nosy: +r.david.murray, vinay.sajip ___ Python tracker

[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would be nice to add a test in Lib/test/test_fileinput.py. -- nosy: +serhiy.storchaka stage: -> test needed ___ Python tracker

[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-10-29 Thread R. David Murray
R. David Murray added the comment: We need to think carefully about backward compatibility here. -- nosy: +r.david.murray ___ Python tracker ___

[issue25482] signal.set_wakeup_fd() doesn't work if the signal don't have handler

2015-10-29 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: > Benjamin Peterson added the comment: > > The OP probably wants something like the Linux-specific signalfd() syscall. Yes. Long explanation: I have an console text editor written in Python/curses(http://kaaedit.github.io/). This editor didn't work with

[issue25511] multiprocessing pool blocks SIGTERM from being handled

2015-10-29 Thread David Jones
New submission from David Jones: This is probably related to #21913, but more specifically concerns the documentation. I have a sub process of a larger program that handles a SIGTERM sent by the main process for a clean shutdown. However, if I launch a parallel task in the sub process, via

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-29 Thread Mark Roseman
Mark Roseman added the comment: Better, but alas still not quite. On further investigation, the issue is that a new instance of idleConf is instantiated in the subprocess, which then calls mkdtemp() returning a different name. You can see this by doing 'restart shell' and noting that it will

Re: python.exe is not a valid win32 executable

2015-10-29 Thread Laura Creighton
In a message of Fri, 30 Oct 2015 03:36:36 +1100, Chris Angelico writes: >I don't know what you mean by "natively", but I play a number of >DirectX games on my Debian Linux. Give it a try! You might find that >it all works perfectly. Or, if you develop games, you might not

[issue25509] PyImport_ImportModule inaccurately described

2015-10-29 Thread Brett Cannon
Brett Cannon added the comment: Semantic change was probably because of the lack of import hook support which is required since Python 3.3. So the docs just need to be fixed rather than the semantics. -- ___ Python tracker

Re: python.exe is not a valid win32 executable

2015-10-29 Thread Mark Lawrence
On 29/10/2015 17:28, Tim Golden wrote: On 29/10/2015 16:14, Steffen Herzfeldt wrote: I just wanted to let you know that your program just doesn't work on WinXP. I guess you just think "Linux is better anyway" to which i agree until it comes to games requiring directx, but that doesn't change

Re: How to implement an async message bus

2015-10-29 Thread Nagy László Zsolt
try: return await waiter finally: # TODO: Use a context manager to add and remove the keys. for key in keys: self._waiters[key].discard(waiter) if handle: handle.cancel() def

[issue25489] sys.exit() caught in exception handler

2015-10-29 Thread Brian Sutherland
Brian Sutherland added the comment: On Wed, Oct 28, 2015 at 02:49:55PM +, R. David Murray wrote: > > R. David Murray added the comment: > > Using sys.exit means you are depending on garbage collection to clean > up all of your program's resources. In the general case this is a bad > idea.

Re: python.exe is not a valid win32 executable

2015-10-29 Thread Chris Angelico
On Fri, Oct 30, 2015 at 3:14 AM, Steffen Herzfeldt wrote: > Hi, > today i downloaded python3.5.0 x86 (win32) installer. > after the programm installed the files into its standard directory without > asking me if i wanted it in a different position, i tried running a program >

Re: python.exe is not a valid win32 executable

2015-10-29 Thread Tim Golden
On 29/10/2015 16:14, Steffen Herzfeldt wrote: I just wanted to let you know that your program just doesn't work on WinXP. I guess you just think "Linux is better anyway" to which i agree until it comes to games requiring directx, but that doesn't change the fact that the installer was labeled as

[issue25501] Use async/await through asyncio docs

2015-10-29 Thread Brett Cannon
Brett Cannon added the comment: Once 3.4.4 launches the need to keep the docs synced with a version that doesn't support async/await goes away. And worrying about 3.3 isn't necessary since asyncio was added in 3.4. So once 3.4.4 is released and we close the 3.4 branch to bugfixes can we

[issue17006] Add advice on best practices for hashing secrets

2015-10-29 Thread Joshua Bronson
Changes by Joshua Bronson : -- nosy: +jab ___ Python tracker ___ ___ Python-bugs-list

[issue25469] multiprocessing .Condition.notify(_all) function has O(N) time complexity where N is the number of wait() calls with a timeout since the last notify(_all) call

2015-10-29 Thread Vilnis Termanis
Vilnis Termanis added the comment: I realise that having type bug type of "performance" means it's less likely to be looked at than if I had marked is as "behaviour" or "resource usage" (which would not be completely unfair, I think). Also, the patch should be applicable to 2.7 and 3.2

python.exe is not a valid win32 executable

2015-10-29 Thread Steffen Herzfeldt
Hi, today i downloaded python3.5.0 x86 (win32) installer. after the programm installed the files into its standard directory without asking me if i wanted it in a different position, i tried running a program that was written for python 3.3.x the response of my system was an error message

Re: python.exe is not a valid win32 executable

2015-10-29 Thread Laura Creighton
In a message of Thu, 29 Oct 2015 17:14:25 +0100, "Steffen Herzfeldt" writes: >Hi, >today i downloaded python3.5.0 x86 (win32) installer. >after the programm installed the files into its standard directory without >asking me if i wanted it in a different position, i tried running a program >that

[issue25509] PyImport_ImportModule inaccurately described

2015-10-29 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue25513] collections.abc.Iterable don't implement __bool__

2015-10-29 Thread yoch
New submission from yoch: collections.abc.Iterable don't implement the __bool__ method. This may seriously degrade performance in case __len__ is not efficient. I suggest to implement it as : class Iterable: ... def __bool__(self): try: next(iter(self))

[issue25513] collections.abc.Iterable don't implement __bool__

2015-10-29 Thread R. David Murray
R. David Murray added the comment: This is as designed. The only method needed for something to qualify as an Iterable is __iter__, thus this is the only method defined on the ABC. If you want your Iterable to be usable in a boolean test, add the __bool__ method to your concrete class. In

[issue25512] apparent memory leak using ctypes

2015-10-29 Thread Martin Smith
New submission from Martin Smith: Attached file demonstrates a memory leak arising in ctypes (I think). Leak occurs in both 2.7 and 3.5, though at different rates. Humble apologies if I've screwed up somewhere. Very nervous about submitting this. -- components: ctypes files:

[issue24778] mailcap.findmatch: document shell command Injection danger in filename parameter

2015-10-29 Thread Bernd Dietzel
Bernd Dietzel added the comment: My patch for mailcap.py. Please check and apply my patch please. 1) I have removed the os.system() calls for security reasons. 2) New "findmtach_list()" function witch returns the commandline as a [list] witch can be passed to subprocess instead of passing it

Re: python.exe is not a valid win32 executable

2015-10-29 Thread Gisle Vanem
Mark Lawrence wrote: CPython's Windows support now follows this lifecycle. A new feature release X.Y.0 will support all Windows releases whose extended support phase is not yet expired. Subsequent bug fix releases will support the same Windows releases as the original feature release (even if

Re: python.exe is not a valid win32 executable

2015-10-29 Thread Laura Creighton
In a message of Thu, 29 Oct 2015 19:21:14 +0100, Gisle Vanem writes: >Wouldn't it be more elegant of Python (and it's installer) >to put a '-subsystem:console,5.02' in the link flags? >And then detect Win-XP later on and refuse a further install? > >-- >--gv >--

[issue25514] better startup error messages in IDLE when stdlib modules shadowed

2015-10-29 Thread Laura Creighton
Laura Creighton added the comment: Note that the full path name of the file that is doing the shadow is of important interest to teachers. We get machines will all sorts of garbage written on them -- the amount of hell caused by a misnamed turtle.py is hard to measure -- and anything as helps

[issue25501] Use async/await through asyncio docs

2015-10-29 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___

[issue25514] better startup error messages in IDLE when stdlib modules shadowed

2015-10-29 Thread Mark Roseman
New submission from Mark Roseman: When we create e.g. string.py that shadows a stdlib module needed by IDLE, it would be nice if a better error message could be shown, pointing to that cause. Original message: lac at smartwheels:~/junk$ echo "print ('hello there')" >string.py lac at

[issue25501] Use async/await through asyncio docs

2015-10-29 Thread Guido van Rossum
Guido van Rossum added the comment: Honestly I think it's better if most people keep using coroutine/yield-from instead of async/await for a few more releases; their code will be more portable, since it takes forever to update old datacenters. We put in async/await with an eye towards the

[issue25514] better startup error messages in IDLE when stdlib modules shadowed

2015-10-29 Thread Laura Creighton
Laura Creighton added the comment: s/machines will/machines with/ (I was tired.) -- ___ Python tracker ___

[issue25041] document AF_PACKET socket address format

2015-10-29 Thread Camilla Montonen
Camilla Montonen added the comment: Provided patch provides documentation for the AF_PACKET address_family. -- keywords: +patch nosy: +Winterflower Added file: http://bugs.python.org/file40898/af_packet_doc.patch ___ Python tracker

Re: Most space-efficient way to store log entries

2015-10-29 Thread Laura Creighton
In a message of Fri, 30 Oct 2015 08:28:07 +1100, Cameron Simpson writes: >On 29Oct2015 09:15, Laura Creighton wrote: >>Did the OP say he wanted to keep his compressed logfiles on a >>local disk? What if he wants to send them across the internet >>to some other machine and would

[issue25515] Always use os.urandom for generating uuid4s

2015-10-29 Thread Alex Gaynor
Alex Gaynor added the comment: (Note that the speed difference would be even bigger on a recent python, 2.7.3 was before the file descriptor was cached for os.urandom) -- ___ Python tracker

[issue25515] Always use os.urandom for generating uuid4s

2015-10-29 Thread Alex Gaynor
New submission from Alex Gaynor: Right now uuid4 can be implemented one of 3 ways: - If there's a libuuid (and it's not OS X's) it uses that. - Fallback to os.urandom - If that raises an exception, fall back to the random module I propose to simplify this to _just_ use os.urandom always.

Re: Most space-efficient way to store log entries

2015-10-29 Thread Cameron Simpson
On 29Oct2015 09:15, Laura Creighton wrote: Did the OP say he wanted to keep his compressed logfiles on a local disk? What if he wants to send them across the internet to some other machine and would like the transfer to happen as quickly as possible? Then he's still better

Re: Most space-efficient way to store log entries

2015-10-29 Thread Laura Creighton
In a message of Fri, 30 Oct 2015 09:47:42 +1100, Cameron Simpson writes: >Another post suggests that the OP is transferring log info in UDP packets and >hopes to keep the state within a maximum packet size, hence his desire for >compact representation. I suspect that personally I'd be going for

[issue25515] Always use os.urandom for generating uuid4s

2015-10-29 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Oct 29, 2015, at 10:30 PM, Alex Gaynor wrote: >Right now uuid4 can be implemented one of 3 ways: If you're hacking on the uuid module, keep in mind issue22807 -- nosy: +barry ___ Python tracker

[issue25515] Always use os.urandom for generating uuid4s

2015-10-29 Thread John Mark Vandenberg
Changes by John Mark Vandenberg : -- nosy: +John.Mark.Vandenberg ___ Python tracker ___ ___

[issue25516] threading.Condition._is_owned() is wrong when using threading.Lock

2015-10-29 Thread Nir Soffer
New submission from Nir Soffer: When using threading.Lock, threading.Condition._is_owned is assuming that the calling thread is owning the condition lock if the lock cannot be acquired. This check is completely wrong if another thread owns the lock. >>> cond =

Re: python.exe is not a valid win32 executable

2015-10-29 Thread Terry Reedy
On 10/29/2015 1:14 PM, Laura Creighton wrote: Alas, it is a 'won't fix' for python.org. Maybe Activestate or Continuum.io will support XP with their 3.5 packages, It would be an unpleasant task at best. CPython does not work with xp because is uses shiny new system features that first

[issue25514] better startup error messages in IDLE when stdlib modules shadowed

2015-10-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Laura, I did not understand from your python-list post that you were complaining about shadowing disabling IDLE itself, as opposed to user code. That is partly because you followed up on Peter Otten complaining because IDLE tries to run user code the same

Re: Most space-efficient way to store log entries

2015-10-29 Thread Cameron Simpson
On 29Oct2015 23:16, Laura Creighton wrote: In a message of Fri, 30 Oct 2015 08:28:07 +1100, Cameron Simpson writes: On 29Oct2015 09:15, Laura Creighton wrote: Did the OP say he wanted to keep his compressed logfiles on a local disk? What if he wants to send

Re: Most space-efficient way to store log entries

2015-10-29 Thread Marc Aymerich
On Thu, Oct 29, 2015 at 11:57 PM, Laura Creighton wrote: > In a message of Fri, 30 Oct 2015 09:47:42 +1100, Cameron Simpson writes: >>Another post suggests that the OP is transferring log info in UDP packets and >>hopes to keep the state within a maximum packet size, hence his

[issue25498] Python 3.4.3 core dump with simple sample code

2015-10-29 Thread Martin Panter
Martin Panter added the comment: Before the Issue 22896 changes, PyObject_AsWriteBuffer() was used, which requests a buffer with the PyBUF_WRITABLE flag. Currently we use “w*” argument parsing format, which also uses PyBUF_WRITABLE. (Incidentally, I suspect the C-contiguity check is redundant

[issue11796] Comprehensions in a class definition mostly cannot access class variable

2015-10-29 Thread Anne Rosa Wangnick
Anne Rosa Wangnick added the comment: With https://bugs.python.org/issue13557 closed, this one should be reopened to amend 6.2.8 Generator expressions: "[However, the leftmost for clause is immediately evaluated] (in the local context)[, so that an error produced by it can be seen ...]"

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-10-29 Thread desbma
desbma added the comment: I played a bit with Unix domain sockets, and it appears you can not open them like a file with open(). So they do no work with the current implementation of shutil.copyfile anyway. -- ___ Python tracker

[issue25482] signal.set_wakeup_fd() doesn't work if the signal don't have handler

2015-10-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: The OP probably wants something like the Linux-specific signalfd() syscall. -- ___ Python tracker ___

Re: system error - api-ms-win-crt-runtime-l1-1-0.dll

2015-10-29 Thread Terry Reedy
On 10/29/2015 1:02 AM, Nagu Koppula wrote: Hi Could you help me to resolve below error in my windows 7 laptop? I had tried re-installing / repair, still error persists. Error - screenshot Copy the relevant parts into your text message. Ever heard of a search bar? Google? This error

[issue25506] test_pprint reuses test_user_dict

2015-10-29 Thread John Mark Vandenberg
New submission from John Mark Vandenberg: test_pprint defined test_user_dict twice, once for UserDict, and the second for UserList. -- components: Library (Lib), Tests files: test_pprint-fix.diff keywords: patch messages: 253663 nosy: John.Mark.Vandenberg, serhiy.storchaka priority:

[issue25505] undefined name 'window' in Tools/scripts/fixdiv.py

2015-10-29 Thread John Mark Vandenberg
Changes by John Mark Vandenberg : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue25498] Python 3.4.3 core dump with simple sample code

2015-10-29 Thread eryksun
Changes by eryksun : Added file: http://bugs.python.org/file40890/ctypes_from_buffer_2.patch ___ Python tracker ___

[issue25498] Python 3.4.3 core dump with simple sample code

2015-10-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka priority: normal -> high stage: needs patch -> patch review ___ Python tracker

Re: UNABLE TO GET IDLE TO RUN

2015-10-29 Thread Laura Creighton
I think that it would be useful if IDLE spit out a warning: Warning: local file /u/lac/junk/string.py shadows module named string in the Standard Library Laura -- https://mail.python.org/mailman/listinfo/python-list

[issue25506] test_pprint reuses test_user_dict

2015-10-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0e0f3f5195f8 by Serhiy Storchaka in branch '3.5': Issue25506: Fixed a copy-pasting error in test_pprint. https://hg.python.org/cpython/rev/0e0f3f5195f8 New changeset 30b6c3bbefc7 by Serhiy Storchaka in branch 'default': Issue25506: Fixed a

[issue25506] test_pprint reuses test_user_dict

2015-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you John. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue24765] Move .idlerc to %APPDATA%\IDLE on Windows

2015-10-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I do not consider the presence of .idlec in $HOME on Windows to be a problem in itself. There are numerous applications, unix-derived and otherwise, that do the same with config files. Very few, if any, have the issue of sharing between multiple

[issue25504] undefined name 'modules' in Tools/freeze/checkextensions_win32.py

2015-10-29 Thread John Mark Vandenberg
New submission from John Mark Vandenberg: All versions of Tools/freeze/checkextensions_win32.py have had an error due to accessing 'modules.sourceFiles' instead of 'module.sourceFiles'. https://hg.python.org/cpython/diff/8e9d5e5103f5/Tools/freeze/checkextensions_win32.py#l1.96 Presumably

system error - api-ms-win-crt-runtime-l1-1-0.dll

2015-10-29 Thread Nagu Koppula
Hi Could you help me to resolve below error in my windows 7 laptop? I had tried re-installing / repair, still error persists. Error - screenshot Regards, Nagu -- https://mail.python.org/mailman/listinfo/python-list

Re: Most space-efficient way to store log entries

2015-10-29 Thread Martin A. Brown
Hello Marc, I think you have gotten quite a few answers already, but I'll add my voice. > I'm writting an application that saves historical state in a log > file. If I were in your shoes, I'd probably use the logging module rather than saving state in my own log file. That allows the

[issue25502] unnecessary re-imports

2015-10-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset dec0a26d0b4d by Benjamin Peterson in branch '3.5': remove duplicated imports (closes #25502) https://hg.python.org/cpython/rev/dec0a26d0b4d New changeset 695c50c8cc92 by Benjamin Peterson in branch 'default': merge 3.5 (#25502)

[issue25503] inspect.getdoc does find inherited property __doc__

2015-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you John for your report and your patch. Committed tests are slightly changed because "contradiction" was originally purposed to test properties. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: -> resolved status: open ->

[issue25505] undefined name 'window' in Tools/scripts/fixdiv.py

2015-10-29 Thread John Mark Vandenberg
Changes by John Mark Vandenberg : Added file: http://bugs.python.org/file40889/fixdiv-remove-truncate.diff ___ Python tracker ___

[issue25505] undefined name 'window' in Tools/scripts/fixdiv.py

2015-10-29 Thread John Mark Vandenberg
New submission from John Mark Vandenberg: Tools/scripts/fixdiv.py 's `FileContext.truncate` has used `window` since it was created, when it is supposed to use self.window. https://hg.python.org/cpython/annotate/60f290a7eae8/Tools/scripts/fixdiv.py#l195 `truncate` is unused, so an alternative

[issue13828] Further improve casefold documentation

2015-10-29 Thread Mark Summerfield
Mark Summerfield added the comment: I think the str.casefold() docs are fine as far as they go, rightly covering what it _does_ rather than _how_, yet providing a reference for the details. But what they lack is more complete information. For example I discovered this: >>> x = "files and

Re: Most space-efficient way to store log entries

2015-10-29 Thread Laura Creighton
Did the OP say he wanted to keep his compressed logfiles on a local disk? What if he wants to send them across the internet to some other machine and would like the transfer to happen as quickly as possible? Laura -- https://mail.python.org/mailman/listinfo/python-list

[issue25503] inspect.getdoc does find inherited property __doc__

2015-10-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset bbf00faf25ff by Serhiy Storchaka in branch '3.5': Issue #25503: Fixed inspect.getdoc() for inherited docstrings of properties. https://hg.python.org/cpython/rev/bbf00faf25ff New changeset e80d1e9737d4 by Serhiy Storchaka in branch 'default': Issue

[issue25506] test_pprint reuses test_user_dict

2015-10-29 Thread John Mark Vandenberg
John Mark Vandenberg added the comment: Sorry; the first patch includes unrelated fixes. -- Added file: http://bugs.python.org/file40892/test_pprint-fix.diff ___ Python tracker

RE: system error - api-ms-win-crt-runtime-l1-1-0.dll

2015-10-29 Thread Nagu Koppula
Hi Laura, Thanks for your quick response and help! It is windows 7 and it is working after I downloaded the Microsoft's Universal CRT. Regards, Nagu -Original Message- From: Laura Creighton [mailto:l...@openend.se] Sent: Thursday, October 29, 2015 4:34 PM To: Nagu Koppula

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: OK: call GetUserCfgDir once on creation of idleConf instance and set .userdir attribute. Replace repeated calls in PyShell and Editor with attributes accesses. I tested that, with patch, IDLE starts and rewrites both breakpoints.lst and recent-files.lst as

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-10-29 Thread desbma
desbma added the comment: Thanks for the comment. > Also, the os.sendfile() doc suggests that some platforms only support writing > to sockets, so I definitely think a backup plan is needed. You are right, the man page clearly says: > Applications may wish to fall back to read(2)/write(2) in

Re: system error - api-ms-win-crt-runtime-l1-1-0.dll

2015-10-29 Thread Laura Creighton
1. If you are running XP, you cannot run Python 3.5. XP is not supported. You need to get a newer OS. 2. Otherwise, the api-ms-win-crt-runtime-l1-1-0-dll is Microsofts Universal CRT. You don't have one. You need to install it. Get it here:

RE: Problem working with subprocess.check_call

2015-10-29 Thread David Aldrich
> Try this > subprocess.check_call(["bash", "-O", "extglob", "-c", cmd]) That worked. Thanks very much! David -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem working with subprocess.check_call

2015-10-29 Thread Laura Creighton
In a message of Thu, 29 Oct 2015 09:52:56 +, David Aldrich writes: >Hi > >I am working on Linux with Python 3.4. > >I want to do a bash diff on two text files and show just the first 20 lines of >diff's output. So I tried: > cmd = 'head -20 <(diff ' + file1 + ' ' + file2 + ')'

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2015-10-29 Thread Terry J. Reedy
New submission from Terry J. Reedy: In python, 'import tkinter; tkinter.font' fails with AttributeError. In IDLE, it does not, which is a bug, This lead to a Stackoverflow question 'Why does my code run in IDLE but not with Python'? The issue is that importing modules in a package has the

[issue25508] LogRecord attributes are not tuple, when logging only dict

2015-10-29 Thread Ondrej Sejvl
New submission from Ondrej Sejvl: Hi, in doc https://docs.python.org/3.4/library/logging.html#logrecord-attributes there is argsYou shouldn’t need to format this yourself. The tuple of arguments merged into msg to produce message. But when I log message with 1 arg - a dict - in

Re: UNABLE TO GET IDLE TO RUN

2015-10-29 Thread Terry Reedy
On 10/29/2015 3:53 AM, Laura Creighton wrote: I think that it would be useful if IDLE spit out a warning: User code is compiled and executed by builtin compile and exec, so it would have to be python (exec) that emit a warning. Warning: local file /u/lac/junk/string.py shadows module named

Re: Most space-efficient way to store log entries

2015-10-29 Thread Marc Aymerich
On Wed, Oct 28, 2015 at 11:30 PM, Marc Aymerich wrote: > Hi, > I'm writting an application that saves historical state in a log file. > I want to be really efficient in terms of used bytes. > > What I'm doing now is: > > 1) First use zlib.compress > 2) And then remove all new

Re: Most space-efficient way to store log entries

2015-10-29 Thread Chris Angelico
On Thu, Oct 29, 2015 at 9:35 PM, Marc Aymerich wrote: > 1) Each node on the cluster needs to keep track of *all* the changes > that ever ocurred. So far, each node is storing each change as > individual lines on a file (the "historical state log" I was referring > to, the

Problem working with subprocess.check_call

2015-10-29 Thread David Aldrich
Hi I am working on Linux with Python 3.4. I want to do a bash diff on two text files and show just the first 20 lines of diff's output. So I tried: >>> cmd = 'head -20 <(diff ' + file1 + ' ' + file2 + ')' >>> subprocess.check_call(cmd, shell=True) The command contained in cmd works ok from

[issue24765] Move .idlerc to %APPDATA%\IDLE on Windows

2015-10-29 Thread eryksun
eryksun added the comment: On Windows, how about creating a junction (_winapi.CreateJunction in 3.5, or the shell's mklink /j) from ~\.idlerc to %APPDATA%\idle? If ~\.idlerc already exists, it could be moved to %APPDATA%\idle before creating the junction. New code would directly use

Re: Problem working with subprocess.check_call

2015-10-29 Thread INADA Naoki
On Thu, Oct 29, 2015 at 6:52 PM, David Aldrich wrote: > Hi > > > > I am working on Linux with Python 3.4. > > > > I want to do a bash diff on two text files and show just the first 20 > lines of diff’s output. So I tried: > > > > >>> cmd = 'head -20 <(diff ' + file1

Re: Problem working with subprocess.check_call

2015-10-29 Thread Pete Dowdell
On 29/10/15 16:52, David Aldrich wrote: Hi I am working on Linux with Python 3.4. I want to do a bash diff on two text files and show just the first 20 lines of diff’s output. So I tried: >>> cmd = 'head -20 <(diff ' + file1 + ' ' + file2 + ')' >>> subprocess.check_call(cmd, shell=True)

Re: Problem working with subprocess.check_call

2015-10-29 Thread Peter Otten
David Aldrich wrote: > I am working on Linux with Python 3.4. > > I want to do a bash diff on two text files and show just the first 20 > lines of diff's output. So I tried: > cmd = 'head -20 <(diff ' + file1 + ' ' + file2 + ')' subprocess.check_call(cmd, shell=True) > > The command

Re: Problem working with subprocess.check_call

2015-10-29 Thread Laura Creighton
In a message of Thu, 29 Oct 2015 11:11:17 +0100, Laura Creighton writes: >In a message of Thu, 29 Oct 2015 09:52:56 +, David Aldrich writes: >>Hi >> >>I am working on Linux with Python 3.4. >> >>I want to do a bash diff on two text files and show just the first 20 lines >>of diff's output.

[issue25444] Py Launch Icon

2015-10-29 Thread Nils Lindemann
Nils Lindemann added the comment: i see now what you mean. I have this icon too (py 3.5.0 idle icon.png). Something is misconfigured with the icons in the python 3.5.0 windows installer, also python files in explorer have no icons. Thanks for your hint with the python ideas list, i will post

RE: Problem working with subprocess.check_call

2015-10-29 Thread David Aldrich
Thanks for all your answers. David -- https://mail.python.org/mailman/listinfo/python-list

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I cannot currently think of any reason why the subprocess *needs* to access idleConf, so I want to put this on hold while investigating whether the accesses can be eliminated as part of #25507. -- dependencies: +IDLE: user code 'import tkinter;

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2015-10-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: #8231 will benefit if indirect imports of configHandler and idleConf into the user process can be eliminated. I do not currently believe it is needed. Not importing PyShell will go part way. AutoComplete imports idleConf to get the popup delay. run imports

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Without being able to make my homedir read-only, I don't, of course, see the messages. Since run does not use idleConf (I am now sure), you should have been able to proceed after clicking away the admittedly obnoxious repeat messages. The old extraneous

Re: Most space-efficient way to store log entries

2015-10-29 Thread Cameron Simpson
On 30Oct2015 00:35, Marc Aymerich wrote: Usually I use my home router (which has an attached HDD) for downloading movies and stuff (big files) from the WAN... it has a 800Mhz mips cpu... anyway my experience with it is that: rsync tops at ~400Kbps Rsync is not a

[issue25482] signal.set_wakeup_fd() doesn't work if the signal don't have handler

2015-10-29 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Thank you for good sample. This should be written in PEP 475. But installing new signal handler can cause different behavior. As in my previous example, if other 3rd party libraries(ncurses in my case) need to handle the signal, signal is consumed by Python

[issue25482] signal.set_wakeup_fd() doesn't work if the signal don't have handler

2015-10-29 Thread STINNER Victor
STINNER Victor added the comment: It's very easy to get the same behaviour on Python 3.4 (without PEP 475) and Python 3.5 (with PEP 475). Just add the following code at the top of your example: import signal def sighandler(signum, frame): raise InterruptedError

Re: Windows 10 pip2.7.exe uninstall fails

2015-10-29 Thread Mark Lawrence
On 28/10/2015 12:22, Robin Becker wrote: A message box is displayed:- "This app can't run on your PC To find a version for your PC, check with the software publisher". Close the message box and:- "Access is denied." Searching hasn't thrown up a single reference to uninstall errors

  1   2   >