[issue31863] Inconsistent returncode/exitcode for terminated child processes on Windows

2017-10-26 Thread Akos Kiss

Akos Kiss  added the comment:

And I thought that my analysis was thorough... Exit code 1 is the way to go, I 
agree now.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Compression of random binary data

2017-10-26 Thread Marko Rauhamaa
Ben Bacarisse :

>> In this context, "random data" really means "uniformly distributed
>> data", i.e. any bit sequence is equally likely to be presented as
>> input. *That's* what information theory says can't be compressed.
>
> But that has to be about the process that gives rise to the data, not
> the data themselves.  No finite collection of bits has the property you
> describe.

Correct. Randomness is meaningful only in reference to future events.
Once the events take place, they cease to be random.

A finite, randomly generated collection of bits can be tested against a
probabilistic hypothesis using statistical methods.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Let's talk about debuggers!

2017-10-26 Thread Paul Rubin
Terry Reedy  writes:
> On Windows, [IDLE] uses native widgets when possible...
> In summary, I think debugger should rate at least 'good' rather than
> fail' when it comes to showing you the next line.

I actually like how the Tk widgets look.  I've done some semi-industrial
applications with tkinter and they have a nice factory-floor vibe.

I generally just use pdb for debugging.  The feature I miss most is the
ability to trap to the debugger if the program throws an unhandled
exception.  I think some other Python debuggers do support that.  I've
found it invaluable in other languages.

-- 
https://mail.python.org/mailman/listinfo/python-list


How to plot

2017-10-26 Thread Andrew Z
Hello,
 i'd like to create a graph/plot based a DB table's data, but not sure
where to start. I

 also would like to have the following functionality:
 a. i'd like to have it in the separate window ( xwindow to be precise).
 b. and i'd like to have the graph updating with every record added to the
table.

The workflow:
 a. main code is running and occasionally adding records to the table
 b. graph gets updated "automagically" and is shown in a separate from the
main terminal window.

Main program does not have GUI, nor is Web based, just runs in the terminal
on Xwindows.

i don't' really care about cross-platform compability and only want to run
that on linux xwindows.

Thank you for your advise.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31053] Unnecessary argument in command example

2017-10-26 Thread Berker Peksag

Berker Peksag  added the comment:

Thank you!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31053] Unnecessary argument in command example

2017-10-26 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 37d1d967eed4018ef397dd9d1515683e5b6b55e7 by Berker Peksag (Miss 
Islington (bot)) in branch '3.6':
bpo-31053: Remove redundant 'venv' argument in venv example (GH-2907)
https://github.com/python/cpython/commit/37d1d967eed4018ef397dd9d1515683e5b6b55e7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31053] Unnecessary argument in command example

2017-10-26 Thread Roundup Robot

Change by Roundup Robot :


--
keywords: +patch
pull_requests: +4110
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31053] Unnecessary argument in command example

2017-10-26 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset d609b0c24ebdb748cabcc6c062dfc86f9000e6c4 by Berker Peksag 
(cocoatomo) in branch 'master':
bpo-31053: Remove redundant 'venv' argument in venv example (GH-2907)
https://github.com/python/cpython/commit/d609b0c24ebdb748cabcc6c062dfc86f9000e6c4


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31863] Inconsistent returncode/exitcode for terminated child processes on Windows

2017-10-26 Thread Eryk Sun

Eryk Sun  added the comment:

A C/C++ program returns EXIT_FAILURE for a generic failure. Microsoft defines 
this macro value as 1. Most tools that a user might use to forcibly terminate a 
process don't allow specifying the reason; they just use the generic value of 
1. This includes Task Manager, taskkill.exe /f, the WDK's kill.exe -f, and 
Sysinternals pskill.exe and Process Explorer. subprocess and multiprocessing 
should also use 1 to be consistent.

The system itself doesn't distinguish a forced termination from a normal exit. 
Ultimately every thread and process gets terminated by the system calls 
NtTerminateThread and NtTerminateProcess (or the equivalent Process Manager 
private functions PspTerminateThreadByPointer, PspTerminateProcess, etc). 
Windows API TerminateThread and TerminateProcess are light wrappers around the 
corresponding system calls.

ExitThread and ExitProcess (actually implemented as RtlExitUserThread and 
RtlExitUserProcess in ntdll.dll) are within-process calls that integrate with 
the loader's LdrShutdownThread and LdrShutdownProcess routines. This allows the 
loader to call the entry points for loaded DLLs with DLL_THREAD_DETACH or 
DLL_PROCESS_DETACH, respectively. ExitThread also handles deallocating the 
thread's stack. Beyond that, the bulk of the work is handled by 
NtTerminateThread and NtTerminateProcess. For ExitProcess, NtTerminateProcess 
is actually called twice -- the first time it's called with a NULL process 
handle to kill the other threads in the current process. After 
LdrShutdownProcess returns, NtTerminateProcess is called again to truly 
terminate the process.

> PowerShell and .NET ... `System.Diagnostics.Process.Kill()` ... 
> `TerminateProcess` is called with -1

.NET is in its own (cross-platform) managed-code universe. I don't know why the 
developers decided to make Kill() use -1 (0x) as the exit code. I can 
guess that they negated the conventional EXIT_FAILURE value to indicate a 
signal-like kill. I think it's an odd decision, and I'm not inclined to favor 
it over behaviors that predate the existence of .NET. 

Making the ExitCode property a signed integer in .NET is easy to understand, 
and not a cause for concern since it's only a matter of interpretation. Note 
that the return value from wmain() or wWinMain() is a signed integer. Also, the 
two fundamental status result types in Windows -- NTSTATUS [1] and HRESULT [2] 
-- are 32-bit signed integers (warnings and errors are negative). Internally, 
the NT Process object's EPROCESS structure defines ExitStatus as an NTSTATUS 
value. You can see in a kernel debugger that it's a 32-bit signed integer 
(Int4B):

lkd> dt nt!_eprocess ExitStatus
   +0x624 ExitStatus : Int4B

Python also wants the exit code to be a signed value. If we try to exit with an 
unsigned value that exceeds 0x7FFF_, it instead uses a default code of -1 
(0x_). For example:

>>> hex(subprocess.call('python -c "raise SystemExit(0x8000_)"'))
'0x'

Using the corresponding signed integer works fine:

>>> 0x8000_ - 2**32
-2147483648
>>> hex(subprocess.call('python -c "raise SystemExit(-2_147_483_648)"'))
'0x8000'

[1]: https://msdn.microsoft.com/en-us/library/cc231200
[2]: https://msdn.microsoft.com/en-us/library/cc231198


> termination by a signal "terminates the calling program with 
> exit code 3"

MS C raise() defaults to calling exit(3). I don't know why it uses the value 3; 
it's a legacy value from the MS-DOS era. Python doesn't directly expose C 
raise(), so this exit code only occurs in rare circumstances.

Note that SIGINT and SIGBREAK are based on console control events, and in this 
case the default behavior (i.e. SIG_DFL) is not to call exit(3) but rather to 
continue to the next registered console control handler. This is normally the 
Windows default handler (i.e. kernelbase!DefaultHandler), which calls 
ExitProcess with STATUS_CONTROL_C_EXIT. When closing the console itself (i.e. 
CTRL_CLOSE_EVENT), if a control handler in a console client returns TRUE, the 
default handler doesn't get called, but (starting with NT 6.0) the process 
still has to be terminated. In this case the session server, csrss.exe, calls 
NtTerminateProcess with STATUS_CONTROL_C_EXIT.

The exit code also isn't normally 3 for SIGABRT when abort() (i.e. os.abort in 
Python) gets called. In a release build, abort() defaults to using the 
__fastfail intrinsic (i.e. INT 0x29 on x64 systems) with the code 
FAST_FAIL_FATAL_APP_EXIT. This terminates the process with a 
STATUS_STACK_BUFFER_OVERRUN exception. By design, a __fastfail exception cannot 
be handled. An attached debugger only sees it as a second-chance exception. 
(Ideally they should have split this functionality into multiple status codes, 
since a __fastfail isn't necessarily due to a stack buffer overrun.) The 
error-reporting dialog may change the exit status to 255 in this case, but you 
can 

[issue31860] IDLE: Make font sample editable

2017-10-26 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Thanks for the patch.  Adding the feature is somehow easier than I expected.  
After moving the sample text to module level, which I considered doing before, 
saving edits for the duration of an IDLE session turned out to also be easy.  

With 11 point Lucida Console, there is room for 5 more lines, without erasing 
anything, before anything scrolls off the top.

I expect that saving changes across IDLE sessions would be much harder and 
likely not worth the effort.  I think that exploring font choices is likely 
rare enough that there is little need to do so.

--
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31881] subprocess.returncode not set depending on arguments to subprocess.run

2017-10-26 Thread Nick

Nick  added the comment:

I have verified that

$ mpirun -np 4 myexe.x moreargs; echo $?
1

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python noob having a little trouble with strings

2017-10-26 Thread randyliu17
On Thursday, October 26, 2017 at 7:41:10 PM UTC-7, boB Stepp wrote:
> On Thu, Oct 26, 2017 at 9:25 PM,   wrote:
> > If s1 = "Welcome students", what is the output when you print the following:
> >
> > 1. s4 = 3 * s1
> >
> > 2. s1[3 : 6]
> >
> > 3. 'W' in s1
> >
> > 4. S1[-1]
> >
> > 5. S1[:-1]
> >
> > Any help would be great, thanks!
> 
> Why not find out for yourself and print these in the Python
> interpreter?  For instance:
> 
> > py
> Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:57:36) [MSC v.1900 64
> bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> py3: s1 = "Welcome students"
> py3: s4 = 3 * s1
> py3: print(s4)
> Welcome studentsWelcome studentsWelcome students
> 
> 
> 
> -- 
> boB

Hi Bob, thanks for responding. I'm not sure where to do so, my professor had us 
download Pycharm for mac's which uses python 2.6
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Compression of random binary data

2017-10-26 Thread danceswithnumbers
Shouldn't that be?

py> 16 * (-7/16 * math.log2(7/16) - 6/16 * math.log2(6/16)) =
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python noob having a little trouble with strings

2017-10-26 Thread boB Stepp
On Thu, Oct 26, 2017 at 9:25 PM,   wrote:
> If s1 = "Welcome students", what is the output when you print the following:
>
> 1. s4 = 3 * s1
>
> 2. s1[3 : 6]
>
> 3. 'W' in s1
>
> 4. S1[-1]
>
> 5. S1[:-1]
>
> Any help would be great, thanks!

Why not find out for yourself and print these in the Python
interpreter?  For instance:

> py
Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:57:36) [MSC v.1900 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
py3: s1 = "Welcome students"
py3: s4 = 3 * s1
py3: print(s4)
Welcome studentsWelcome studentsWelcome students



-- 
boB
-- 
https://mail.python.org/mailman/listinfo/python-list


Python noob having a little trouble with strings

2017-10-26 Thread randyliu17
If s1 = "Welcome students", what is the output when you print the following:

1. s4 = 3 * s1

2. s1[3 : 6]

3. 'W' in s1

4. S1[-1]

5. S1[:-1]

Any help would be great, thanks!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Compression of random binary data

2017-10-26 Thread danceswithnumbers
It looks like that averages my two examples. H by the way that equation is 
really coolwhy does it return a high bit count when compared to >>>dec to 
bin?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: IDLE doesn't recognise installed packages

2017-10-26 Thread Daniel Tangemann
hi,
I had tried typing: "path-to-binary -m pip  Terry Reedy  hat am 26. Oktober 2017 um 21:35 geschrieben:
>
>
> On 10/26/2017 12:37 AM, Daniel Tangemann wrote:
> > ok, I did that. I noticed that this path: 
> > 'C:\\Users\\Daniel86\\AppData\\Local\\Programs\\Python\\Python36\\Lib\\idlelib'
> >  is missing when I run the python.exe without IDLE. how do I fix this?
>
> Having idlelib on the path or not should not make any difference for
> anything installed by pip. It is not even needed by IDLE, since IDLE
> imports its modules via Lib.
>
>
> > also I get a syntax error when I try that:
>
> What you try what? Post the entire traceback.
>
> > "To make sure you are running pip with the same binary
> > as IDLE, enter path-to-binary -m pip 
> Your path-to-binary appears to be
>
> C:\Users\Daniel86\AppData\Local\Programs\Python\Python36\python.exe
>
> You should be able to replace that with
>
> py -3.6
>
> but try
>
> py -3.6 -c "import sys; sys.executable"
>
> to be sure.
>
> >> Terry Reedy  hat am 24. Oktober 2017 um 08:36 
> >> geschrieben:
> >>
> >>
> >> On 10/23/2017 10:23 AM, Daniel Tangemann wrote:
> >>> I've recently downloaded and installed python 3.6. (I had already also 
> >>> 2.7 and 3.2 on my computer) Initially pip was looking in the wrong 
> >>> directory to install to, so I changed that. then it had trouble 
> >>> installing matplotlib, so I decided to get rid of the older versions of 
> >>> python, which srewed things up even more. now scrips that I had written 
> >>> (in 3.6), that were running without errors before, aren't working 
> >>> anymore. I tried reinstalling python, and I tried the repair option 
> >>> multiple times as well. when I look into the python folder, I can see the 
> >>> modules that I have installed (and that I import into those scripts), but 
> >>> the IDLE doesn't see them! what's even more weird, is that "pip list" 
> >>> doesn't bring up anything but pip itself, while typing "pip install 
> >>> matplotlib" returns a message
> > that
> >>> it's already installed. how do I fix this?
> >>> cheers
> >>
> >> Recognition of installed packages is done by the python running IDLE and
> >> executing your import statements, by not IDLE. The only effect IDLE
> >> could have is any manipulation of sys.path.
> >>
> >> You can find the executable running IDLE with
> >>
> > import sys; sys.executable
> >> 'C:\\Programs\\Python37\\pythonw.exe'
> >>
> >> Find the sys.path being used with
> > sys.path
> >>
> >> If you run the same binary (minus the 'w' if present), you can find the
> >> sys.path used without IDLE. You can also test imports without IDLE in use.
> >>
> >> It is possible that you have more than one binary around, but I cannot
> >> tell from here. To make sure you are running pip with the same binary
> >> as IDLE, enter path-to-binary -m pip  >> instance, on windows, given the above
> >>
> >> path> C:\Programs\Python37\python.exe -m pip list
> >>
> >> --
> >> Terry Jan Reedy
> >>
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list
>
>
> --
> Terry Jan Reedy
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Compression of random binary data

2017-10-26 Thread Ian Kelly
On Thu, Oct 26, 2017 at 2:38 PM,   wrote:
>
> Thomas Jollans
>
> On 2017-10-25 23:22, danceswi...@gmail.com wrote:
>> With every transform the entropy changes,
>
> That's only true if the "transform" loses or adds information.
>
> If it loses information, that's lossy compression, which is only useful
> in very specific (but also extremely common) circumstances.
>
> If it adds information, that's poetry, not compression.
>
>
>
> Not true! You can transform a stream lossless, and change its entropy without 
> adding to or taking away. These two streams 16 bits are the same but one is 
> reversed.
>
> 10101011
> This equals
> 61611
> This can be represented using
> 0-6 log2(7)*5= 14.0367746103 bits
>
>
> 11010101
> This equals
> 54543
> This can be represented using
> 0-5 log2(6)*5= 12.9248125036 bits
>
> In reality you can express 54543 with 10 bits.

I don't know what you're calculating here but it isn't Shannon
entropy. Shannon entropy is correctly calculated for a data source,
not an individual message, but if we assume the two numbers above to
be the result of a Bernoulli process with probabilities matching the
frequencies of the bits in the numbers, then the total entropy of 16
events is:

py> 16 * (-9/16 * math.log2(9/16) - 7/16 * math.log2(7/16))
15.81919053261596

Approximately 15.8 bits. This is the same no matter what order the
events occur in.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31858] IDLE: cleanup use of sys.ps1 and never set it.

2017-10-26 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +4109
stage: commit review -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31881] subprocess.returncode not set depending on arguments to subprocess.run

2017-10-26 Thread R. David Murray

R. David Murray  added the comment:

If you run

  mpirun -np 4 myexe.x moreargs; echo $?

in /bin/sh, what do you see?  You also might try to make sure it is the same 
mpirun and the same myexe.x that is being called in both cases (it is the 
mpirun return code you are seeing).

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31858] IDLE: cleanup use of sys.ps1 and never set it.

2017-10-26 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I put the new shell variables into PyShell itself.  There is usually only one 
instance created in a session.

I tested the patch manually in both shell and editor with both the default 
prompt and with sys.ps1 set before importing idlelib.idle.  Beginning to 
automate tests for editor and shell is a project in itself.

--
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31858] IDLE: cleanup use of sys.ps1 and never set it.

2017-10-26 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
keywords: +patch, patch
pull_requests: +4107, 4108
stage: test needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31858] IDLE: cleanup use of sys.ps1 and never set it.

2017-10-26 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +4107
stage: test needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31881] subprocess.returncode not set depending on arguments to subprocess.run

2017-10-26 Thread Nick

New submission from Nick :

If subprocess.run is called with a single string, say:

completed_ps = subprocess.run('mpirun -np 4 myexe.x moreargs', shell=True)

and 'myexe.x moreargs' fails with a returncode of 1, then 
'completed_ps.returncode' is None. However, if we split the args with shlex, we 
obtain the desired result, which is a returncode of 1:

import shlex
args = shlex.split('mpirun -np 4 myexe.x moreargs')
completed_ps = subprocess.run(args)
# now completed_ps.returncode = 1 if myexe.x moreargs fails.

Reproduced on Mac, Ubuntu 17.04, Python 3.6.1 and Python 3.6.3.

--
messages: 305094
nosy: nthompson
priority: normal
severity: normal
status: open
title: subprocess.returncode not set depending on arguments to subprocess.run
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31415] Add -X option to show import time

2017-10-26 Thread INADA Naoki

INADA Naoki  added the comment:

Does it worth enough?
I didn't think it's worth enough because import will be much slower than one 
dict lookup.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Sequence MIDI events from python. (Posting On Python-List Prohibited)

2017-10-26 Thread Tobiah

On 10/26/2017 4:30 PM, Lawrence D’Oliveiro wrote:

On Friday, October 27, 2017 at 12:02:40 PM UTC+13, Tobiah wrote:


I know that there are a few good MIDI libraries out there.
The examples that I've seen for real-time triggering
of events rely on a sleep function to realize the timing.
This is not accurate or precise enough for musical applications.


Why not look at the source code of the “good” ones?



No get.  zample plez.
--
https://mail.python.org/mailman/listinfo/python-list


Sequence MIDI events from python.

2017-10-26 Thread Tobiah

I know that there are a few good MIDI libraries out there.
The examples that I've seen for real-time triggering
of events rely on a sleep function to realize the timing.
This is not accurate or precise enough for musical applications.

What options do I have if I want to write a MIDI sequencer
in python?  I imagine I'd have to sync to an audio device
to get the timing right.

Thank for any help.


Tobiah



--
https://mail.python.org/mailman/listinfo/python-list


Re: Compression of random binary data

2017-10-26 Thread Ben Bacarisse
Gregory Ewing  writes:

> Ben Bacarisse wrote:
>> The trouble is a pedagogic one.  Saying "you can't compress random data"
>> inevitably leads (though, again, this is just my experience) to endless
>> attempts to define random data.
>
> It's more about using terms without making sure everyone agrees
> on the definitions being used.
>
> In this context, "random data" really means "uniformly distributed
> data", i.e. any bit sequence is equally likely to be presented as
> input. *That's* what information theory says can't be compressed.

But that has to be about the process that gives rise to the data, not
the data themselves.  No finite collection of bits has the property you
describe.

If I say: "here is some random data..." you can't tell if it is or is
not from a random source.  I can, as a parlour trick, compress and
recover this "random data" because I chose it.

A source of random can be defined but "random data" is much more
illusive.

>> I think "arbitrary data" (thereby including the results of compression
>> by said algorithm) is the best way to make progress.
>
> I'm not sure that's much better, because it doesn't home in
> on the most important thing, which is the probability
> distribution.

I think the argument that you can't compress arbitrary data is simpler
to make.  You don't have to define it (except in the very simplest
terms) and it's obvious that it includes the results of previous
compressions.

-- 
Ben.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24459] Mention PYTHONFAULTHANDLER in the man page

2017-10-26 Thread Berker Peksag

Change by Berker Peksag :


--
versions:  -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24459] Mention PYTHONFAULTHANDLER in the man page

2017-10-26 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests: +4106

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30989] Sort only when needed in TimedRotatingFileHandler's getFilesToDelete

2017-10-26 Thread Berker Peksag

Change by Berker Peksag :


--
nosy: +vinay.sajip

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28936] test_global_err_then_warn in test_syntax is no longer valid

2017-10-26 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your patch Ivan.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28936] test_global_err_then_warn in test_syntax is no longer valid

2017-10-26 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 8c83c23fa32405aa9212f028d234f4129d105a23 by Serhiy Storchaka 
(Ivan Levkivskyi) in branch 'master':
bpo-28936: Detect lexically first syntax error first (#4097)
https://github.com/python/cpython/commit/8c83c23fa32405aa9212f028d234f4129d105a23


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25729] update pure python datetime.timedelta creation

2017-10-26 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Brian, is this still relevant?  If so, cab you submit a pull request?

--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Compression of random binary data

2017-10-26 Thread danceswithnumbers

Thomas Jollans

On 2017-10-25 23:22, danceswi...@gmail.com wrote: 
> With every transform the entropy changes, 

That's only true if the "transform" loses or adds information. 

If it loses information, that's lossy compression, which is only useful 
in very specific (but also extremely common) circumstances. 

If it adds information, that's poetry, not compression. 



Not true! You can transform a stream lossless, and change its entropy without 
adding to or taking away. These two streams 16 bits are the same but one is 
reversed.

10101011
This equals
61611
This can be represented using
0-6 log2(7)*5= 14.0367746103 bits


11010101
This equals 
54543
This can be represented using
0-5 log2(6)*5= 12.9248125036 bits

In reality you can express 54543 with 10 bits.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue28936] test_global_err_then_warn in test_syntax is no longer valid

2017-10-26 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

> Is it correct that the parameter can be annotated in the function body?

I agree with Guido, this is rather a task for type checkers.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31803] time.clock() should emit a DeprecationWarning

2017-10-26 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

On 26.10.2017 13:46, Serhiy Storchaka wrote:
> 
> It is very bad, that the function with such attractive name has different 
> meaning on Windows and Unix. I'm sure that virtually all uses of clock() are 
> broken because its behavior on other platform than used by the author of the 
> code.

Not really, no. People who write cross-platform code are well
aware of the differences of time.clock() and people who just
write for one platform know how the libc function of the same
function works on their platform.

Unix: http://man7.org/linux/man-pages/man3/clock.3.html
Windows: https://msdn.microsoft.com/en-us/library/4e2ess30.aspx

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31430] [Windows][2.7] Python 2.7 compilation fails on mt.exe crashing with error code C0000005

2017-10-26 Thread David Bolen

David Bolen  added the comment:

Sure, I can certainly do that.

Does "basically a requirement" mean it should have been there all along (with 
the VC9 installation), or just that trying to use VC9 on a recent system like 
Win 10 safely requires it installed separately?  I guess Win 8 was the first 
version to default to only having 4+ already installed.

Oh, any preference between using the OS component setup (windows features) to 
install vs. downloading an installer?  I was thinking of using the features 
approach since it's easy to document as a requirement for anyone else.  I doubt 
there's much difference in the end result.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2017-10-26 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests: +4105

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28936] test_global_err_then_warn in test_syntax is no longer valid

2017-10-26 Thread Guido van Rossum

Guido van Rossum  added the comment:

Those seem things that the type checker should complain about, but I don't 
think Python should.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: IDLE doesn't recognise installed packages

2017-10-26 Thread Terry Reedy

On 10/26/2017 12:37 AM, Daniel Tangemann wrote:

ok, I did that. I noticed that this path: 
'C:\\Users\\Daniel86\\AppData\\Local\\Programs\\Python\\Python36\\Lib\\idlelib' 
is missing when I run the python.exe without IDLE. how do I fix this?


Having idlelib on the path or not should not make any difference for 
anything installed by pip.  It is not even needed by IDLE, since IDLE 
imports its modules via Lib.




also I get a syntax error when I try that:


What you try what?  Post the entire traceback.


"To make sure you are running pip with the same binary
as IDLE, enter path-to-binary -m pip  hat am 24. Oktober 2017 um 08:36 geschrieben:


On 10/23/2017 10:23 AM, Daniel Tangemann wrote:

I've recently downloaded and installed python 3.6. (I had already also 2.7 and 3.2 on my computer) 
Initially pip was looking in the wrong directory to install to, so I changed that. then it had 
trouble installing matplotlib, so I decided to get rid of the older versions of python, which 
srewed things up even more. now scrips that I had written (in 3.6), that were running without 
errors before, aren't working anymore. I tried reinstalling python, and I tried the repair option 
multiple times as well. when I look into the python folder, I can see the modules that I have 
installed (and that I import into those scripts), but the IDLE doesn't see them! what's even more 
weird, is that "pip list" doesn't bring up anything but pip itself, while typing 
"pip install matplotlib" returns a message

  that

it's already installed. how do I fix this?
cheers


Recognition of installed packages is done by the python running IDLE and
executing your import statements, by not IDLE. The only effect IDLE
could have is any manipulation of sys.path.

You can find the executable running IDLE with


import sys; sys.executable

'C:\\Programs\\Python37\\pythonw.exe'

Find the sys.path being used with

sys.path


If you run the same binary (minus the 'w' if present), you can find the
sys.path used without IDLE. You can also test imports without IDLE in use.

It is possible that you have more than one binary around, but I cannot
tell from here. To make sure you are running pip with the same binary
as IDLE, enter path-to-binary -m pip  C:\Programs\Python37\python.exe -m pip list

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list



--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


[issue28281] Remove year limits from calendar

2017-10-26 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:


New changeset 66c88ce30ca2b23daa37038e1a3c0de98f241f50 by Alexander Belopolsky 
in branch 'master':
Closes bpo-28281: Remove year (1-) limits on the weekday() function. (#4109)
https://github.com/python/cpython/commit/66c88ce30ca2b23daa37038e1a3c0de98f241f50


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Uh, sorry for the noise. I see now that shutil was already patched by Victor 
and you in #26801, so that it already works with IDLE started from an icon.  So 
now I don't understand your last comment, "Patching shutil will help for 
pandas."

--
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I think it is better to open a new issue for a new feature. The bug reported in 
this issue two years ago already is fixed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I am preparing a PR for shutil.get_window_size.  Pyplot should probably call 
that instead of the os version.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30553] Add HTTP Response code 421

2017-10-26 Thread Berker Peksag

Berker Peksag  added the comment:

Thank you Julien (for the report) and Vitor (for the patch)

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.7 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30553] Add HTTP Response code 421

2017-10-26 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 52ad72dd0a5a56414cc29b7c9b03259169825f35 by Berker Peksag (Vitor 
Pereira) in branch 'master':
bpo-30553: Add status code 421 to http.HTTPStatus (GH-2589)
https://github.com/python/cpython/commit/52ad72dd0a5a56414cc29b7c9b03259169825f35


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Patching shutil will help for pandas.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31810] Travis CI, buildbots: run "make smelly" to check if CPython leaks symbols

2017-10-26 Thread Zachary Ware

Change by Zachary Ware :


--
pull_requests:  -4103

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

What do you want to do Terry?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31811] async and await missing from keyword list in lexical analysis doc

2017-10-26 Thread Tom Floyer

Tom Floyer  added the comment:

I've added those keywords to documentation master branch.

--
nosy: +tomfloyer
pull_requests: +4104

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Test Bank for Entrepreneurship The Practice and Mindset 1st Edition by Neck

2017-10-26 Thread salaboud
On Saturday, July 1, 2017 at 1:36:10 PM UTC-4, Test Banks wrote:
> Greetings, 
> 
> You can get Test Bank for " Entrepreneurship The Practice and Mindset 1st 
> Edition by Neck " at very reasonable price. Our team is available 24/7 and 
> 365 days / year to respond your requests. Send us an email at 
> pro.fast(@)hotmail(dot)com 
> 
> Place your order at PRO.FAST(@)HOTMAIL(DOT)COM 
> 
> ISBN Numbers for this book (ISBN-10: 1483383520 and ISBN-13: 9781483383521) 
> 
> ENTREPRENEURSHIP THE PRACTICE AND MINDSET 1ST EDITION BY NECK TEST BANK 
> 
> You can also email for other Entrepreneurship books Solutions and Test Bank 
> at low prices and our team will try to get all resources you need. 
> 
> Do not post your reply here. Simply send us an email at 
> PRO.FAST(AT)HOTMAIL(DOT)COM 
> 
> CHEERS,

i want the test bank when could i get it 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31810] Travis CI, buildbots: run "make smelly" to check if CPython leaks symbols

2017-10-26 Thread Tom Floyer

Change by Tom Floyer :


--
pull_requests: +4103

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

If one starts IDLE from a command-line console (python -m idlelib) or Python 
console (import idlelib.idle), sys.__stdout__ is the TextIOWraper for that 
console and .fileno() returns 1.  .get_terminal_size() will then return the 
console size.  The exception occurs when IDLE is  started from an icon.

Implementing David's suggestion for shutil will be easy: insert just before the 
fileno call
if not sys.__stdout__: raise ValueError()
This is what os.get_terminal_size() raises on IDLE.  Comments in the code in 
posixpath.c make it clear that this is intended guis and the low_level os 
function.

This came up today on Stackoverflow when someone tried to use 
matplotlib.pyplot, which calls os.get_terminal_size, on IDLE.
https://stackoverflow.com/questions/46921087/pyplot-with-idle
(Patching shutil will not help for the os call.)

--
resolution: out of date -> 
stage: resolved -> test needed
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2017-10-26 Thread xoviat

xoviat  added the comment:

Unfortunately, this issue has taken on a much lower importance for me, and
as such, I won't be able to address it. Sorry about that.

2017-10-26 0:01 GMT-05:00 Berker Peksag :

>
> Berker Peksag  added the comment:
>
> xoviat, would you like to send your patch as a pull request on GitHub? It
> would be nice to add a simple test that the new Close() works correctly. I
> can do that if you don't have time, thank you!
>
> Steve, can we apply this to bugfix branches?
>
> --
> versions:  -Python 3.5
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16135] Removal of OS/2 support

2017-10-26 Thread Erik Bray

Change by Erik Bray :


--
pull_requests: +4102

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31430] [Windows][2.7] Python 2.7 compilation fails on mt.exe crashing with error code C0000005

2017-10-26 Thread Steve Dower

Steve Dower  added the comment:

Are you able to install .NET 3.5 on the Windows 10 machine? This is basically a 
requirement for the VC9 toolset (it's compatible with .NET 2.0 so should fulfil 
that requirement).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31880] subprocess process interaction with IDLEX GUI causes pygnuplot silent failures

2017-10-26 Thread John Brearley

New submission from John Brearley :

There is an interesting interaction between the IDLEX GUI and subprocess module 
that causes pygnuplot silent failures. The example.py script below works fine 
when run from the WinPython Command Prompt.exe terminal window. The script will 
popup a new window from gnuplot with the desired graph, and in the same 
directory save the generated raw data as example.out and the generated graph as 
example.pdf. If you erase the generated files and then run the same script via 
the IDLEX GUI, there is no graph window created and only the raw data 
example.out file is created. There are no error messages.

The PyGnuplot module sets up a subprocess.Popen pipe as persistant connection 
to the gnuplot.exe utility. This allows the top level script to send multiple 
commands to gnuplot to compose the desired graph, and then finally save the 
file to disk. This all works fine when run from the WinPython Command 
Prompt.exe terminal window. However something subtle is breaking when the same 
script is run from the IDLEX GUI environment. It is not at all obvious if the 
subprocess module is not as forgiving as it needs to be of the IDLEX GUI input 
or if the IDLEX GUI is breaking the rules somewhere. I will start by asking the 
subprocess module team to comment.

I did try adding some trace code to the PyGnuplot.py module. In particular I 
turned on stdout=subprocess.PIPE  and stderr=subprocess.PIPE. I did proc.poll() 
before/after the command is sent to gnuplot. Interestingly, when I did 
proc.communicate(timeout=0) to do an immediate read for any stdout/err data, 
this seems to cause the
 subsequent write to the pipe.stdin to fail, saying the file is already closed. 
In another learning exercise script for subprocess, the communicate() method 
does not seem to interfere with the pipe behavior.

This issue is quite repeatable on demand. I set up a second PC and reproduced 
the issue on demand on the second PC. I am using WinPython 3.6.1 on Windows 7 
with gnuplot 5.2.0 on both PC.

Here are the links to the various components needed to setup the environment to 
reproduce this issue:
1) gnuplot 5.2.0   https://sourceforge.net/projects/gnuplot/files/gnuplot/5.2.0/
2) pygnuplot 0.10.0  https://pypi.python.org/pypi/PyGnuplot/0.10.0
3) There is a one-line fix to PyGnuplot.py needed   
https://github.com/benschneider/PyGnuplot/blob/master/PyGnuplot.py
4) example.py script  
https://github.com/benschneider/PyGnuplot/blob/master/example.py

WinPython 3.6.1 installer comes with subprocess.py as part of the package, no 
version info that I can find.

When installing gnuplot there is an advanced option to check on that will 
automatically update your PATH variable. If you dont do this, then you must 
manully add "C:\gnuplot\bin" (or whatever the directory is)
 to your PATH variable. To check if gnuplot is correctly installed, from a DOS 
prompt terminal window, type "gnuplot -V". You should get a one line response 
"gnuplot 5.2 patchlevel 0".

--
components: Interpreter Core, Windows
messages: 305073
nosy: jbrearley, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: subprocess process interaction with IDLEX GUI causes pygnuplot silent 
failures
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30904] Python 3 logging HTTPHandler sends duplicate Host header

2017-10-26 Thread Vinay Sajip

Change by Vinay Sajip :


--
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31879] Launcher fails on custom command starting with "python"

2017-10-26 Thread Robert

New submission from Robert :

In the "py.ini" file it is possible to specifiy customized commands (see 
https://www.python.org/dev/peps/pep-0397/#customized-commands).

Unfortunately it is not possible to specify custom commands beginning with  one 
of the buildin names (i.e. "python" or "/usr/bin/python"). 

This means that if I want to provide a virtual command like "python-xyz" I get 
an error message "Invalid version specification: '-xyz'" instead of running the 
executable assigned to python-xyz.

I would provide a Pullrequest if you accept this change in behaviour.

--
components: Windows
messages: 305072
nosy: mrh1997, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Launcher fails on custom command starting with "python"
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: read_table € symbol

2017-10-26 Thread Michael Torrie
On 10/26/2017 09:04 AM, Davide Dalmasso wrote:
> Dear all,
> I'm trying to read a txt file with read_table but in the file there are some 
> string that contain the € symbol and the procedure returns me an error.
> I tried with encoding='utf-8' but the problem is still there:
> pd.read_table('filename.txt', sep=';', encoding='utf-8')
> Anyone can help me?
> Many thanks in advance

What error?  Please post the entire traceback.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31415] Add -X option to show import time

2017-10-26 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The importtime option is cached only if it is set. If it is not set (the common 
case), it is not cached.

PR 4138 makes it be cached in the common case and improves errors handling.

--
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31415] Add -X option to show import time

2017-10-26 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4101

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23990] Callable builtin doesn't respect descriptors

2017-10-26 Thread Ionel Cristian Mărieș

Ionel Cristian Mărieș  added the comment:

Alright, now it makes sense. Thank you for writing a thoughtful response.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23990] Callable builtin doesn't respect descriptors

2017-10-26 Thread R. David Murray

R. David Murray  added the comment:

Ionel please give commenters the benefit of the doubt.  In this case, Raymond 
is merely articulating our policy: if something is in pre-PEP stage we don't 
generally keep issues open in the tracker.  We open issues for PEPs when they 
get to the implementation stage.

So, if you want to pursue this, the best forum is the python-ideas mailing 
list, followed eventually by the python-dev mailing list.  That is the best way 
to get visibility, not through a bug tracker with thousands of open issues.

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31873] Inconsistent capitalization of proper noun - Unicode.

2017-10-26 Thread R. David Murray

R. David Murray  added the comment:

In this case I think the cost of editing for consistency may be higher than the 
value, especially since as you say there are ambiguous cases.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31877] Build fails on Cython since issue28180

2017-10-26 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
assignee:  -> ncoghlan
components: +Interpreter Core, Windows
nosy: +paul.moore, steve.dower, tim.golden

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22898] segfault during shutdown attempting to log ResourceWarning

2017-10-26 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Fixed by issue 30697.

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31828] Support Py_tss_NEEDS_INIT outside of static initialisation

2017-10-26 Thread Erik Bray

Change by Erik Bray :


--
nosy: +erik.bray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30697] segfault in PyErr_NormalizeException() after memory exhaustion

2017-10-26 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30697] segfault in PyErr_NormalizeException() after memory exhaustion

2017-10-26 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset 4b27d51222be751125e6800453a39360a2dec11d by xdegaye in branch 
'3.6':
[3.6] bpo-30697: Fix PyErr_NormalizeException() when no memory (GH-2327). 
(#4135)
https://github.com/python/cpython/commit/4b27d51222be751125e6800453a39360a2dec11d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31878] Cygwin: _socket module does not compile due to missing ioctl declaration

2017-10-26 Thread Erik Bray

Change by Erik Bray :


--
keywords: +patch
pull_requests: +4100
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31878] Cygwin: _socket module does not compile due to missing ioctl declaration

2017-10-26 Thread Erik Bray

New submission from Erik Bray :

On Cygwin, ioctl() is found in sys/ioctl.h (as on Darwin).  Without adding 
something to the effect of

#ifdef __CYGWIN__
# include 
#endif

the _socket module cannot compile on Cygwin.  A fix was this was included in 
the (rejected) https://bugs.python.org/issue29718; this issue is just as a 
reminder that it remains an issue and to have a bug report to attach a more 
focused PR to.

--
messages: 305065
nosy: erik.bray
priority: normal
severity: normal
status: open
title: Cygwin: _socket module does not compile due to missing ioctl declaration
type: compile error

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2445] Use The CygwinCCompiler Under Cygwin

2017-10-26 Thread Erik Bray

Change by Erik Bray :


--
pull_requests: +4099
stage: commit review -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: read_table € symbol

2017-10-26 Thread Thomas Jollans
On 2017-10-26 17:04, Davide Dalmasso wrote:
> Dear all,
> I'm trying to read a txt file with read_table but in the file there are some 
> string that contain the € symbol and the procedure returns me an error.
> I tried with encoding='utf-8' but the problem is still there:
> pd.read_table('filename.txt', sep=';', encoding='utf-8')
> Anyone can help me?
> Many thanks in advance
> 
> Davide

What error?
Are you sure the file is UTF-8 encoded? (and not ISO-8859-15, or
Windows-1252, or something?)



-- 
Thomas Jollans
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23990] Callable builtin doesn't respect descriptors

2017-10-26 Thread Ionel Cristian Mărieș

Ionel Cristian Mărieș  added the comment:

It should be open for getting some visibility, as I need some help here -  
Raymond, I hope you can find a way to be hospitable here and stop with the 
kindergarten behavior.

--
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31877] Build fails on Cython since issue28180

2017-10-26 Thread STINNER Victor

Change by STINNER Victor :


--
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30697] segfault in PyErr_NormalizeException() after memory exhaustion

2017-10-26 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
keywords: +patch
pull_requests: +4098
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23990] Callable builtin doesn't respect descriptors

2017-10-26 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Marking as closed.  This can be reopened if a PEP is submitted and is favorably 
received.

--
assignee: rhettinger -> 
status: open -> closed
versions: +Python 3.7 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



read_table € symbol

2017-10-26 Thread Davide Dalmasso
Dear all,
I'm trying to read a txt file with read_table but in the file there are some 
string that contain the € symbol and the procedure returns me an error.
I tried with encoding='utf-8' but the problem is still there:
pd.read_table('filename.txt', sep=';', encoding='utf-8')
Anyone can help me?
Many thanks in advance

Davide
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31877] Build fails on Cython since issue28180

2017-10-26 Thread Zachary Ware

Change by Zachary Ware :


--
nosy: +haypo, ncoghlan, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31873] Inconsistent capitalization of proper noun - Unicode.

2017-10-26 Thread David Antonini

David Antonini  added the comment:

Does the Unicode documentation currently conform to that convention, or does it 
require editing? 

It appears to me that a lot of cases where reference to "Unicode object" is 
currently capitalised (most of them, in fact) may need to be modified. 
However, it would seem that there is a grey area in making a distinction 
between reference to the unicode type as implemented in Python and reference to 
the standard as a descriptor of the format of an object? The way I read there a 
lot of the cases are in essence a reference to both.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31877] Build fails on Cython since issue28180

2017-10-26 Thread Erik Bray

Change by Erik Bray :


--
keywords: +patch
pull_requests: +4097
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31877] Build fails on Cython since issue28180

2017-10-26 Thread Erik Bray

New submission from Erik Bray :

I'm trying once again to get the test suite up to snuff on Cygwin so I can 
start running a buildbot (particularly now that PEP 539 is done).  However, as 
of issue28180 the build fails with:

gcc-o python.exe Programs/python.o libpython3.7m.dll.a -lintl -ldl-lm
Programs/python.o: In function `main':
./Programs/python.c:81: undefined reference to `_Py_LegacyLocaleDetected'
./Programs/python.c:81:(.text.startup+0x86): relocation truncated to fit: 
R_X86_64_PC32 against undefined symbol `_Py_LegacyLocaleDetected'
./Programs/python.c:82: undefined reference to `_Py_CoerceLegacyLocale'
./Programs/python.c:82:(.text.startup+0x19f): relocation truncated to fit: 
R_X86_64_PC32 against undefined symbol `_Py_CoerceLegacyLocale'
collect2: error: ld returned 1 exit status

It seems _Py_LegacyLocaleDetected and _PyCoerceLegacyLocale are missing the 
necessary PyAPI_FUNC declarations in pylifecycle.h.

--
messages: 305061
nosy: erik.bray
priority: normal
severity: normal
status: open
title: Build fails on Cython since issue28180
type: compile error

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-10-26 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The current code OBVIOUSLY is wrong. Bytes are erased if q == oldq && nbytes < 
original_nbytes. But q == oldq only if realloc() returns the new address 
2*sizeof(size_t) bytes larger than its argument. This is virtually never happen 
on other platforms because _PyMem_DebugRawRealloc() usually used with blocks 
larger than 2*sizeof(size_t) bytes and the system realloc() don't shrink the 
block at left (this is implementation detail). Thus this code is virtually dead 
on other platforms. It doesn't detect shrinking memory block in-place.

After fixing *this* bug, we have encountered with *other* bug, related to 
overwriting the freed memory.

I don't see reasons of keeping an obviously wrong code. When fix the first bug 
we will need to fix the other bug.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Windows alternative: multiprocessing.connection.wait on Pipe, Tkinter File Handlers

2017-10-26 Thread Stephan Houben
Op 2017-10-23, Thomas Jollans schreef :
> You might wait in a thread
> and somehow (no idea what the best way to do this is in tkinter) pass a
> message to the GUI thread when it's done.

AFAIK, this is a real problem in Tkinter on Windows.
On Posix you can use the self-pipe trick.
But on Windows, Tkinter cannot wait on a pipe.

I see two solutions (well, three, really):

1. Use a different toolkit, e.g. PyQt has explicit support for notifying
   the GUI thread from another thread.

2. Use Cygwin-based Python. If this is an option, the Cygwin people did 
   already all the heavy lifting for providing Posix-like select()
   semantics.

3. Regular polling. This has been rejected by the OP, but in my
   experience can produce reasonable results when done "properly",
   i.e. use the Tkinter "after" method with a reasonable time interval
   (in the past I have used a strategy of starting with 10 ms and then,
   on no event, slowly back off to polling every 200ms).

   It is by far the simplest solution, and AFAIK the only one which will
   work with the standard Python distribution + Tkinter.

Stephan
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31876] python363.chm includes gibberish

2017-10-26 Thread Hery

New submission from Hery :

Just Open https://www.python.org/ftp/python/3.6.3/python363.chm 

And click the first page, it says "What抯 New in Python". And most of pages the 
chm file include some gibberish.

--
assignee: docs@python
components: Documentation
messages: 305059
nosy: Nim, docs@python
priority: normal
severity: normal
status: open
title: python363.chm includes gibberish
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31875] Error 0x80070642: Failed to install MSI package.

2017-10-26 Thread Gareth Moger

Change by Gareth Moger :


Added file: https://bugs.python.org/file47241/Python 3.6.1 
(32-bit)_20171026151143.log

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31875] Error 0x80070642: Failed to install MSI package.

2017-10-26 Thread Gareth Moger

New submission from Gareth Moger :

I had my work computer re-imaged this week but Python 3.6.1 is gone and I am 
unable to install.

I have tried to completely remove it with CCleaner and any other references I 
found but it still will not install.  I am installing the same version as 
before.

Following the advice from another post, I installed on another machine and then 
copied the folder onto my work machine but was unable to uninstall/repair as 
described.

Attached is the log file.

--
components: Installation
files: Python 3.6.1 (32-bit)_20171026151143.log
messages: 305058
nosy: Gareth Moger
priority: normal
severity: normal
status: open
title: Error 0x80070642: Failed to install MSI package.
versions: Python 3.6
Added file: https://bugs.python.org/file47240/Python 3.6.1 
(32-bit)_20171026151143.log

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31874] [feature] runpy.run_module should mimic script launch behavior for sys.path

2017-10-26 Thread Jason R. Coombs

Change by Jason R. Coombs :


--
components: +Library (Lib)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31874] [feature] runpy.run_module should mimic script launch behavior for sys.path

2017-10-26 Thread Jason R. Coombs

Change by Jason R. Coombs :


--
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31874] [feature] runpy.run_module should mimic script launch behavior for sys.path

2017-10-26 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

At first, I didn't understand why one wouldn't simply omit sys.path[0], similar 
to what scripts do, but then I realized that Nick was aware of a common 
use-case that I was overlooking - that `python -m` may be used to launch 
behavior in a local package - in which case it's relevant and important that 
sys.path[0] == ''.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23990] Callable builtin doesn't respect descriptors

2017-10-26 Thread Ionel Cristian Mărieș

Ionel Cristian Mărieș  added the comment:

Hello everyone,

Is anyone still interested in fixing this bug and help with whatever PEP 
drafting was needed for convincing people?

I would sketch up a draft but for me at least it's not clear what are the 
disadvantages of not fixing this, so I could use some help making a unbiased 
document that won't attract tons of negativity and contempt (yet again).

--
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16737] Different behaviours in script run directly and via runpy.run_module

2017-10-26 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I've filed a separate request here for the sys.path[0] aspect: 
https://bugs.python.org/issue31874

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31874] [feature] runpy.run_module should mimic script launch behavior for sys.path

2017-10-26 Thread Jason R. Coombs

New submission from Jason R. Coombs :

In [this comment](https://bugs.python.org/issue16737#msg282872) I describe an 
issue whereby launching an application via runpy.run_module (aka python -m) 
produces different and unexpected behavior than running the same app via an 
entry script.

In [this followup comment](https://bugs.python.org/issue16737#msg304662), I 
provide more detail on why a user might expect for run_module to mimic the 
behavior of launching a script.

[Nick suggests](https://bugs.python.org/issue16737#msg304707):

> Update sys.path[0] based on __main__.__spec__.origin after [resolving] 
> __main__.__spec__. That way it will only stay as the current directory if the 
> module being executed is in a subdirectory of the current directory, and will 
> otherwise be updated appropriately for wherever we actually found the main 
> module.

--
messages: 305054
nosy: jason.coombs
priority: normal
severity: normal
status: open
title: [feature] runpy.run_module should mimic script launch behavior for 
sys.path
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31873] Inconsistent capitalization of proper noun - Unicode.

2017-10-26 Thread R. David Murray

R. David Murray  added the comment:

It may be a proper noun, but it is conventionally spelled with a lowercase 
letter when referring to the type/object.  It would be spelled with an upper 
case letter when referring to the *standard*.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16737] Different behaviours in script run directly and via runpy.run_module

2017-10-26 Thread Isaiah Peng

Isaiah Peng  added the comment:

Not sure if it's stated before, this difference of behavior also has other 
effects, e.g.

$ python -m test.test_traceback

# Ran 61 tests in 0.449s
# FAILED (failures=5)

This is because the loader associated with the module get confused, it loaded 
the original module as the proper module and then the module changed name to 
__main__ but the loader is still associated with the old module name, so call 
to `get_source` fails.

$ cat > test_m.py
print(__loader__.get_source(__name__))

$ python -m test_m

# ImportError: loader for test_m cannot handle __main__

--
nosy: +isaiah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31873] Inconsistent capitalization of proper noun - Unicode.

2017-10-26 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I agree that the inconsistency should be fixed. But I'm not sure that we should 
use the words "an Unicode object" in Python 3.

In many similar cases ("a bytes object", "a type object", "a module object") 
the name of Python type is used. "unicode" was a name of Python type in Python 
2. In Python 3 it is "str". The term "Unicode string" also is widely used. 
Should not we use "a str object", "a string object", "a Unicode string" or "a 
Unicode string object" in the C API documentation?

--
components: +Unicode
nosy: +benjamin.peterson, ezio.melotti, haypo, lemburg, martin.panter, 
r.david.murray, serhiy.storchaka
stage:  -> patch review
versions: +Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31873] Inconsistent capitalization of proper noun - Unicode.

2017-10-26 Thread David Antonini

New submission from David Antonini :

Make 'unicode'/'Unicode' capitalization consistent.
'Unicode' is a proper noun, and as such should be capitalized. 

I submitted a pull request correcting the inconsistent capitalization in the 
Unicode page of the Documentation - Doc/c-api/unicode.rst - capitalizing 12 
errant instances to reflect the correct capitalization in most of the document. 
I was then requested to open an issue here for discussion.

--
assignee: docs@python
components: Documentation
messages: 305050
nosy: docs@python, toonarmycaptain
priority: normal
pull_requests: 4096
severity: normal
status: open
title: Inconsistent capitalization of proper noun - Unicode.
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31811] async and await missing from keyword list in lexical analysis doc

2017-10-26 Thread Tom Floyer

Change by Tom Floyer :


--
keywords: +patch
pull_requests: +4095
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >