[issue17605] mingw-meta: build interpeter core

2016-07-27 Thread Martin Panter

Changes by Martin Panter :


--
dependencies: +mingw: use main() to start execution

___
Python tracker 

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



[issue27626] Spelling fixes

2016-07-27 Thread Martin Panter

Martin Panter added the comment:

Thanks for the patch

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed
versions: +Python 2.7

___
Python tracker 

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



[issue27623] int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero

2016-07-27 Thread Martin Panter

Martin Panter added the comment:

I agree that the signed conversion cases should be an error.

However the unsigned case would break working code that I have written for 
bijective numeration. See _bytes_to_int() and _int_to_bytes() in Issue 20132, 
inc-codecs.diff, for example. Since non-zero unsigned conversions work by 
converting

N bytes  <->  0 <= value < 2^N

For N = 0, there is only one possible value, 0.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27637] int.to_bytes(-1, ...) should automatically choose required count of bytes

2016-07-27 Thread Martin Panter

Martin Panter added the comment:

I don’t like special values. A length of minus one makes no sense, so should 
trigger an exception, not some unexpected behaviour. A different data type like 
None would be a bit better.

But I’m not sure this would be widely used. If you really need it you could 
calculate the number of bytes needed via value.bit_length().

--
nosy: +martin.panter

___
Python tracker 

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



[issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders

2016-07-27 Thread Berker Peksag

Berker Peksag added the comment:

There is no need to go to python-ideas for this. Adding domain experts to nosy 
list is enough.

--
nosy: +berker.peksag, mark.dickinson, serhiy.storchaka

___
Python tracker 

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



[issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders

2016-07-27 Thread Martin Panter

Martin Panter added the comment:

I wouldn’t mind the “host” byte order, assuming it just means use 
sys.byteorder. I think I have done this a few times, both when I really wanted 
the native byte order, and when I didn’t care, but assumed the native order 
might be slightly more efficient (e.g. bitwise arithmetic on 512-byte blocks).

But I don’t understand the point of “net” byte order. Wouldn’t it be the same 
as “big”?

--
nosy: +martin.panter

___
Python tracker 

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



[issue18304] ElementTree -- provide a way to ignore namespace in tags and searches

2016-07-27 Thread Martin Panter

Changes by Martin Panter :


--
title: ElementTree -- provide a way to ignore namespace in tags and seaches -> 
ElementTree -- provide a way to ignore namespace in tags and searches

___
Python tracker 

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



[issue27490] Do not run pgen when it is not going to be used (cross-compiling)

2016-07-27 Thread Martin Panter

Martin Panter added the comment:

FWIW I suspect this technique could be expanded to prevent 
Programs/_freeze_importlib from being cross-compiled, if anyone was interested.

--
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



[issue23943] Misspellings in a few files

2016-07-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b0addbbc7671 by Martin Panter in branch '2.7':
Issue #23943: Fix typos. Patch by Piotr Kasprzyk.
https://hg.python.org/cpython/rev/b0addbbc7671

New changeset 48f074e2afcf by Martin Panter in branch '3.5':
Issue #23943: Restore extra fixes lost in merge 4fb2075952a4
https://hg.python.org/cpython/rev/48f074e2afcf

New changeset 0026d94d45e6 by Martin Panter in branch 'default':
Issue #23943: Merge spelling fixes from 3.5
https://hg.python.org/cpython/rev/0026d94d45e6

--

___
Python tracker 

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



[issue27626] Spelling fixes

2016-07-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c8c1ea94379a by Martin Panter in branch '2.7':
Issue #27626: Spelling fixes in docs, comments and internal names
https://hg.python.org/cpython/rev/c8c1ea94379a

--

___
Python tracker 

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



[issue27490] Do not run pgen when it is not going to be used (cross-compiling)

2016-07-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ec27886f675f by Martin Panter in branch '2.7':
Issue #27490: Do not build pgen when cross-compiling
https://hg.python.org/cpython/rev/ec27886f675f

--

___
Python tracker 

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



[issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders

2016-07-27 Thread Emanuel Barry

Emanuel Barry added the comment:

Since this is a new feature addition, this should first go through 
Python-ideas. However, I don't think that network-related features should go 
into builtin types, -1 from me.

--
nosy: +ebarry

___
Python tracker 

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



[issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders

2016-07-27 Thread Марк Коренберг

Changes by Марк Коренберг :


--
components: +Library (Lib)
type:  -> enhancement
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



[issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders

2016-07-27 Thread Марк Коренберг

New submission from Марк Коренберг:

int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte 
orders. I will provide a patch.

--
messages: 271490
nosy: mmarkk
priority: normal
severity: normal
status: open
title: int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte 
orders

___
Python tracker 

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



[issue27637] int.to_bytes(-1, ...) should automatically choose required count of bytes

2016-07-27 Thread Марк Коренберг

Марк Коренберг added the comment:

Oops.

def serialize(value: int, signed=True) -> bytes:
x = value.to_bytes(-1, 'big', signed=signed)
l = len(x).to_bytes(4, 'big', signed=False)
return l + x

assert len(serialize(0)) == 4 + 0 # see Issue27623
assert len(serialize(120)) == 4 + 1
assert len(serialize(130)) == 4 + 2
assert len(serialize(130), False) == 4 + 1

--

___
Python tracker 

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



[issue27637] int.to_bytes(-1, ...) should automatically choose required count of bytes

2016-07-27 Thread Марк Коренберг

New submission from Марк Коренберг:

It will be nice if `int.to_bytes` be able to automatically choose number of 
bytes to serialize. If so, I could write serialisation code:

def serialize(value: int, signed=True) -> bytes:
x = value.to_bytes(-1, 'big', signed=signed)
l = value.to_bytes(4, 'big', signed=False)
return l + x

assert len(serialize(0)) == 4 + 0 # see Issue27623
assert len(serialize(120)) == 4 + 1
assert len(serialize(130)) == 4 + 2
assert len(serialize(130), False) == 4 + 1

--
components: Library (Lib)
messages: 271488
nosy: mmarkk
priority: normal
severity: normal
status: open
title: int.to_bytes(-1, ...) should automatically choose required count of bytes
type: enhancement
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



[issue27623] int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero

2016-07-27 Thread Emanuel Barry

Emanuel Barry added the comment:

I don't use this feature enough to have a clear opinion, however it's 
specifically accounted for in the code and has a test for it. It might be a 
good idea to bring this up on Python-ideas. It's very likely to break some 
code, but I wonder if said code wasn't already broken to begin with :)

--

___
Python tracker 

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



[issue27636] Refactor IDLE htest

2016-07-27 Thread Terry J. Reedy

New submission from Terry J. Reedy:

idlelib.idle_test.htest
Extract a App(Tk) subclass from run function and nested function.  Pass that as 
master instead of bare root. Extract HTest(Toplevel) class with the common code 
in files with an htest function.  Attach HTest to App as an attribute so htest 
functions can instantiate or subclass.

--
assignee: terry.reedy
components: IDLE
messages: 271486
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Refactor IDLE htest
type: enhancement
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



[issue27623] int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero

2016-07-27 Thread Марк Коренберг

Марк Коренберг added the comment:

I think, we should deny:

* Passing `0` to `to_bytes` (even if integer is equal to zero)
* Passing empty string to `from_bytes`

I do not see any use cases for this to work. It was never guaranteed to work 
earlier. Everyone pass constant to `to_bytes` that is > 0. And passing empty 
buffer to `from_bytes` just indicate error in logic (i.e. something was not 
read correctly from file/socket e.t.c).

`struct.pack`/`unpack` does not support zero-byte types.

--

___
Python tracker 

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



[issue26942] android: test_ctypes crashes on armv7 and aarch64

2016-07-27 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen :


--
title: android: test_ctypes crashes on armv7 -> android: test_ctypes crashes on 
armv7 and aarch64

___
Python tracker 

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



[issue27623] int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero

2016-07-27 Thread Emanuel Barry

Emanuel Barry added the comment:

Here's a patch that fixes this.

--
components: +Interpreter Core -Library (Lib)
keywords: +patch
nosy: +ebarry
stage:  -> patch review
Added file: http://bugs.python.org/file43913/int_to_bytes_overflow_1.patch

___
Python tracker 

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



[issue27620] IDLE: Add keyboard equivalents for mouse actions.

2016-07-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e4a2d78aa6cc by Terry Jan Reedy in branch 'default':
Issue #27620: Make htest box respond to  and .
https://hg.python.org/cpython/rev/e4a2d78aa6cc

--

___
Python tracker 

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



[issue27621] Finish IDLE Query dialog appearance and behavior.

2016-07-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I meant to direct the focus ring fix here instead #27620.  To me, this issue is 
done, at least for now.

--

___
Python tracker 

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



[issue27621] Finish IDLE Query dialog appearance and behavior.

2016-07-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am not trying to re-invent the wheel.  I am trying to bring IDLE up to 
uniform standards.  In particular, make all dialogs usable from the keyboard.  
The config dialog is the worst. See #27620, the master issue.

For a two button messagebox, I went back to 3.5.2, which still uses the 
commondialog box.  It has the default button marked as such.   always 
does the default action.  always cancels.   moves the focus, but 
does not affect the above.   enters ' ' in text entry and 'clicks' 
buttons.  So this is at least 'a' Windows standard, as well as 'a' Mac standard.

The search dialogs act the same. The space behavior built-in to the TK widgets, 
at least on Windows. I presume this is a class binding.  The dialogs have no 
platform specific code, so they are also the defacto IDLE standard.

Serhiy, it is definitely a tk convention, and I presume more universal than 
that, that the 'default ring' always indicate what button/action is invoked by 
.  If the default moved with the focus, the default ring should move 
also.  I am not inclined to do that without a strong reason.

The button default ring is controlled by the 'default' option" 'active' = 
visible, 'normal' = possible, 'disabled' = not possible.  (From the tk docs.  
The NMT reference is useless here.) I will add "default='active'" for the Ok 
button.

(Mark: "default=1", suggested on http://www.tkdocs.com/widgets/button.html, is 
a nasty bug.  "_tkinter.TclError: bad default "1": must be normal, active, or 
disabled".)

--
title:  incorrectly works in IDLE Query dialogs -> Finish IDLE Query 
dialog appearance and behavior.

___
Python tracker 

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



[issue27620] IDLE: Add keyboard equivalents for mouse actions.

2016-07-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2468581846da by Terry Jan Reedy in branch 'default':
Issue #27620: Mark the default action button as the default.
https://hg.python.org/cpython/rev/2468581846da

--

___
Python tracker 

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



[issue27623] int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero

2016-07-27 Thread Anders Lorentsen

Anders Lorentsen added the comment:

Isn't it possible to just add a small line of code that checks if length is 
less than or equal to 0, and if it is, call the necessary c functions to have 
python raise a valueerror...? Sorry if this is giving a solution without 
actually submitting the patch - but this is all very new to me. I have never 
contributed to anything yet (fourth year CS-student), and I am as fresh to the 
process as can be. I registered here just now. This seems like an issue I could 
handle.. I just need to take the time to learn about the process of how things 
are done around here.

--

___
Python tracker 

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



[issue27626] Spelling fixes

2016-07-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6080d720cbf5 by Martin Panter in branch '3.5':
Issue #27626: Spelling fixes in docs, comments and internal names
https://hg.python.org/cpython/rev/6080d720cbf5

New changeset 3f337cce758c by Martin Panter in branch 'default':
Issue #27626: Merge spelling fixes from 3.5
https://hg.python.org/cpython/rev/3f337cce758c

New changeset e12dee34deae by Martin Panter in branch 'default':
Issue #27626: Further spelling fixes for 3.6
https://hg.python.org/cpython/rev/e12dee34deae

--
nosy: +python-dev

___
Python tracker 

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



[issue27490] Do not run pgen when it is not going to be used (cross-compiling)

2016-07-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c6476003e67f by Martin Panter in branch '3.5':
Issue #27490: Do not build pgen when cross-compiling
https://hg.python.org/cpython/rev/c6476003e67f

New changeset 98df00834c58 by Martin Panter in branch 'default':
Issue #27490: Merge pgen cross-compile logic from 3.5
https://hg.python.org/cpython/rev/98df00834c58

--
nosy: +python-dev

___
Python tracker 

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



[issue27623] int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero

2016-07-27 Thread Anders Lorentsen

Changes by Anders Lorentsen :


--
nosy: +Phaqui

___
Python tracker 

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



[issue27623] int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero

2016-07-27 Thread Lucas Morales

Lucas Morales added the comment:

This is actually a problem in Objects/longobject.c, in the _PyLong_AsByteArray 
function. It should have given an overflow error, because -1 cannot be encoded 
in 0 bytes.

--
nosy: +lucasem

___
Python tracker 

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



[issue18304] ElementTree -- provide a way to ignore namespace in tags and seaches

2016-07-27 Thread Martin Panter

Martin Panter added the comment:

Perhaps it would make more sense to use rpartition() or rstrip(). It seems 
possible to have a closing curly bracket in a namespace, but not in a element 
tag or attribute name.

My guess is the __all__ failure is just a sign to add the new function to the 
__all__ variable at the top of the module.

--

___
Python tracker 

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



[issue23085] update internal libffi copy to 3.2.1

2016-07-27 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +ned.deily

___
Python tracker 

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



[issue23085] update internal libffi copy to 3.2.1

2016-07-27 Thread Zachary Ware

Zachary Ware added the comment:

OSX and Windows are both exempt from this discussion.  Each has its own private 
copy of an ancient version of libffi: Modules/_ctypes/libffi_osx/ and 
Modules/_ctypes/libffy_msvc/.

I would be in favor of switching to --with-system-ffi by default for 3.6 and 
deprecating building with the bundled full copy of libffi 
(Modules/_ctypes/libffi/), to be removed in 3.7.  OSX would also default to 
--with-system-ffi, but would still fall back to its private copy when a system 
copy isn't available.

It seems like most Linux and BSD distributions would be better off with 
system-ffi.  I'm not sure how cross-builds would have to deal with things in 
3.7, but they already have to deal with dependencies like openssl, bz2, and 
lzma; adding libffi to that mix shouldn't be that big of a deal.

Adding Ned to confirm that building OSX installers wouldn't be affected as long 
as we don't touch Modules/_ctypes/libffi_osx/ and there's not a system copy of 
libffi available.

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-27 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

It looks like Ruby folks encountered the Morocco issue [1] before us.  They 
closed the issue on their bug tracker blaming glibc.  This tells us, I guess, 
that we should skip this transition on the affected systems.  Unfortunately, it 
is not just 32-bit time_t systems - I was able to reproduce the problem on 
64-bit Fedora 22.

If no one suggests a better way, I will just skip year 2037 transitions 
unconditionally.  


[1]: https://github.com/tzinfo/tzinfo-data/issues/10

--

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-27 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> rhettinger

___
Python tracker 

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



[issue18304] ElementTree -- provide a way to ignore namespace in tags and seaches

2016-07-27 Thread Stefan Behnel

Stefan Behnel added the comment:

On second thought, I think it should be supported (also?) in the parser. 
Otherwise, using it with an async parser would be different from (and more 
involved than) one-shot parsing. That seems wrong.

--

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-27 Thread Doug Hoskisson

Doug Hoskisson added the comment:

My suggestion was not to delete the "approximate" entirely. Just move it out of 
the first sentence to make it more consistent with the other documentation.

This is the model I'm seeing in empty() and full():

The first sentence is something simple and direct (without nebulous words that 
will make people wonder what it means), and then after that, comment on the 
race-condition stuff.

I think that documentation is good, and it would be good to follow the same 
model for qsize().

--

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-27 Thread R. David Murray

R. David Murray added the comment:

The subsequent text specifies the behavior.  You *could* delete the 
'approximately' from the qsize documentation to be parallel, but I think that 
would be a disservice to the reader.  You could also use the phrase "at the 
moment of the call" in all three, which might be acceptable.  Let's see what 
Raymond has to say, when he has time to respond.

--

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-27 Thread R. David Murray

R. David Murray added the comment:

The current wording is, IMO, better than the suggested wording, especially if 
you don't want to be "teaching stuff".  The current wording is a specification 
of the method's behavior.  I really don't know what you could replace 
"approximate" with that would improve it without having to get into a 
description of the behavior of a threaded program.

It seems like you are wanting us to document that the function will return an 
accurate size if the program is single threaded, but I don't think we want to 
do that, because that is not part of the specification of the method.

--

___
Python tracker 

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



[issue18304] ElementTree -- provide a way to ignore namespace in tags and seaches

2016-07-27 Thread Stefan Behnel

Stefan Behnel added the comment:

Here is a proposed patch for a new function "strip_namespaces(tree)" that 
discards all namespaces from tags and attributes in a (sub-)tree, so that 
subsequent processing does not have to deal with them.

The "__all__" test is failing (have to figure out how to fix that), and docs 
are missing (it's only a proposal for now). Comments welcome.

--
keywords: +patch
versions: +Python 3.6 -Python 3.4
Added file: http://bugs.python.org/file43912/etree_strip_namespaces.patch

___
Python tracker 

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



[issue24214] UTF-8 incremental decoder doesn't support surrogatepass correctly

2016-07-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
stage:  -> patch review
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue27635] pickle documentation says that unpickling may not call __new__

2016-07-27 Thread July Tikhonov

New submission from July Tikhonov:

A note just below object.__setstate__() documentation
https://docs.python.org/3.6/library/pickle.html#object.__setstate__
says that
"""
… the type should implement __getnewargs__() or __getnewargs_ex__() to 
establish such an invariant; otherwise, neither __new__() nor __init__() will 
be called.
"""

I believe that note about not calling __new__() was relevant in python2. I 
could not find case in python3 in which __new__() would not be called. And 
__init__() is not called anyway, as far as I understand (unless explicitly by 
__setstate__() or something).

Python 3.6.0a3+ (default:da9898e7e90d, Jul 27 2016, 19:51:12) 
[GCC 4.9.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class C:
...   def __getstate__(self): return {'foo' : self.foo}
...   def __setstate__(self, state): self.foo = state['foo']
...   def __new__(cls):
... print('__new__ is called'); return super().__new__(cls)
...   def __init__(self):
... print('__init__ is called'); self.foo = None; super().__init__()
... 
>>> c = C(); c.foo = 'bar'
__new__ is called
__init__ is called
>>> import pickle
>>> c2 = pickle.loads(pickle.dumps(c))
__new__ is called
>>> c2.foo
'bar'

--
assignee: docs@python
components: Documentation
messages: 271465
nosy: docs@python, july
priority: normal
severity: normal
status: open
title: pickle documentation says that unpickling may not call __new__
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue27621] incorrectly works in IDLE Query dialogs

2016-07-27 Thread Mark Roseman

Mark Roseman added the comment:

Side note that on Mac OS X, buttons normally don't get the focus, so that this 
isn't an issue. Well except that buttons are getting the focus here. :-)  

Also since we're reinventing the wheel, please note that alternative keyboard 
shortcuts (e.g. command-period) don't work, and there isn't a default button 
set for the dialog which there should be. 

Interestingly, you can change things in System Preferences -> Keyboard -> 
Shortcuts so that buttons can get the focus via tabbing through the interface. 
If this is enabled and you tab to the Cancel button and his Return, it should 
still be treated as if you hit the Okay button on Mac. Hitting space while 
focus is on the Cancel button does treat it as if you clicked on Cancel.

--
nosy: +markroseman

___
Python tracker 

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



[issue27634] selectors.SelectSelectors fails if select.select was patched

2016-07-27 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the patch, Przemyslaw, but I'm going to close this.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue27634] selectors.SelectSelectors fails if select.select was patched

2016-07-27 Thread Brett Cannon

Brett Cannon added the comment:

I agree with Victor: monkeypatching is the wrong way to deal with this. Since 
SelectSelector is a class you are better off exposing something in the 
constructor or some method that can be overridden if this kind of flexibility 
is really necessary.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue24214] UTF-8 incremental decoder doesn't support surrogatepass correctly

2016-07-27 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Exception with utf-8, surrogatepass and incremental decoding -> UTF-8 
incremental decoder doesn't support surrogatepass correctly

___
Python tracker 

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



[issue24214] Exception with utf-8, surrogatepass and incremental decoding

2016-07-27 Thread STINNER Victor

STINNER Victor added the comment:

Attached patch fixes the UTF-8 decoder to support correctly incremental decoder 
using surrogatepass error handler.

The bug occurs when b'\xed\xa4\x80' is decoded in two parts: the first two 
bytes (b'\xed\xa4'), and then the last byte (b'\x80').

It works as expected if we decode the first byte (b'\xed') and then the two 
last bytes (b'\xa4\x80').

My patch tries to keep best performances for the UTF-8/strict decoder.

@Serhiy: Would you mind to review my patch since you helped to design the fast 
UTF-8 decoder?

--
keywords: +patch
Added file: http://bugs.python.org/file43911/surrogatepass.patch

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-27 Thread Doug Hoskisson

Doug Hoskisson added the comment:

More explicit is ok, if that's what people want, but just not in the first 
sentence, because that stuff has nothing to do with what is being documented 
specifically (as evidenced by referencing a wikipedia article that doesn't even 
mention python).

I don't think more explicit is necessary, but if that's what others want, it's 
not bad.

How much of the python documentation should be dedicated to teaching people 
stuff that has nothing to do with python specifically?

--

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-27 Thread STINNER Victor

STINNER Victor added the comment:

"""
Return the number of items in the queue. Note, in multi-threading this mostly 
just serves as an approximation, and information from this doesn’t guarantee 
that a subsequent get() or put() will not block.
"""

I dislike this description. If I understand correctly, the issue is that 
someone must not rely on the size to check if the queue is empty or not. If I'm 
right, the doc must be more explicit. Something like:

"The size must not be used to check if get() or put() will block. Use 
get_nowait() and put_nowait(), or get() and put() in non-blocking mode 
(block=False)."

There is even a Wikipedia article on the bug :-)

https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use

(I'm not sure that it's exactly the same class of bug.)

--
nosy: +haypo

___
Python tracker 

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



[issue11048] "import ctypes" causes segfault on read-only filesystem

2016-07-27 Thread Emanuel Barry

Changes by Emanuel Barry :


--
stage: test needed -> resolved

___
Python tracker 

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



[issue11048] "import ctypes" causes segfault on read-only filesystem

2016-07-27 Thread STINNER Victor

STINNER Victor added the comment:

Sorry, I'm unable to reproduce the crash using the read-only filesystem. But an 
assertion confirmed me that the restype is not initialized which is an obvious 
bug.


ctypes-erofs-crash.diff: LGTM. By the way, the flags field is not initialized 
neither, but it's probably less important (at least for the destructor).


Alexander Belopolsky: "It would be nice to add a unit test to this patch."

I tried to write a short unit test triggering the bug, but it really depends on 
low-level implementation details for a very specific corner case. I would 
prefer to avoid such complex unit test and just fix the bug. We waited for an 
unit test the last 5 years, it's too late now :-)


"A nit-pick: it would be easier to verify that all CThunkObject fields are 
initialized if initialization was done in the same order as declaration:"

Right, I rewrote the patch as you suggested. I noticed that flags is not 
initialized neither (also fixed in my patch).


I pushed a fix.


Thanks marcin.bachry for the initial patch! Thanks Pavel Labushev for your bug 
report! ... but sorry for the very long delay :-( It looks like nobody 
reproduced the bug recently, maybe it was fixed in libffi in the meanwhile?

--
nosy: +haypo
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue11048] "import ctypes" causes segfault on read-only filesystem

2016-07-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ab4975520c7d by Victor Stinner in branch '3.5':
ctypes: fix CThunkObject_new()
https://hg.python.org/cpython/rev/ab4975520c7d

New changeset da9898e7e90d by Victor Stinner in branch 'default':
Merge 3.5 (issue #11048)
https://hg.python.org/cpython/rev/da9898e7e90d

New changeset 7d692840c152 by Victor Stinner in branch '2.7':
ctypes: fix CThunkObject_new()
https://hg.python.org/cpython/rev/7d692840c152

--
nosy: +python-dev

___
Python tracker 

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



[issue1521950] shlex.split() does not tokenize like the shell

2016-07-27 Thread Vinay Sajip

Changes by Vinay Sajip :


--
assignee:  -> vinay.sajip

___
Python tracker 

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



[issue1521950] shlex.split() does not tokenize like the shell

2016-07-27 Thread Vinay Sajip

Vinay Sajip added the comment:

Okay, I've updated with a new patch addressing SilentGhost's comments, and 
addressed the comments on that patch. If I don't hear any objections by Friday, 
I plan to commit this change.

--

___
Python tracker 

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



[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-07-27 Thread STINNER Victor

STINNER Victor added the comment:

The change introducing the != SOCK_STREAM check (change a00842b783cf) was made 
in 2013. It looks like the case was not tested since at least 3 years...

> This will need a test in Lib/test/test_ssl.py to check for this particular 
> case.

Yes, this new test is mandatory to make sure that the feature is not broken 
again (check for regression).

The workaround is to pass an existing socket...

--
nosy: +haypo

___
Python tracker 

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



[issue27626] Spelling fixes

2016-07-27 Thread R. David Murray

R. David Murray added the comment:

LGTM as well.

--

___
Python tracker 

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



[issue23085] update internal libffi copy to 3.2.1

2016-07-27 Thread R. David Murray

R. David Murray added the comment:

See msg243261, I think.  On linux and freebsd we could theoretically leave that 
to the distros, but on OSX we have to deal with it ourselves.

--
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



[issue27634] selectors.SelectSelectors fails if select.select was patched

2016-07-27 Thread STINNER Victor

STINNER Victor added the comment:

Monkey-patching is a bad programming practice. I don't think that Python should 
promote this...

*But* selectors.diff LGTM.

I will wait one or two weeks to let others review the patch and give their 
opinion.

--
nosy: +haypo

___
Python tracker 

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



[issue27630] Generator._encoded_EMTPY misspelling in email package

2016-07-27 Thread R. David Murray

R. David Murray added the comment:

The former is kept (IIRC) for backward compatibility, the latter should be 
investigated.  Since I wrote that code I'll have to add this to my todo list.

--

___
Python tracker 

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



[issue17599] mingw: detect REPARSE_DATA_BUFFER

2016-07-27 Thread Steve Dower

Steve Dower added the comment:

Worth checking if the headers in VC14 have the structure now, as it may 
simplify the whole thing.

If not, I'd add a leading underscore to the name so nobody confuses it for 
public API in the future.

--

___
Python tracker 

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



[issue17602] mingw: default sys.path calculations for windows platforms

2016-07-27 Thread Steve Dower

Steve Dower added the comment:

Can MinGW build against Modules/getpath.c? I'd rather just use the posix 
implementation than scatter ifdefs throughout the non-posix one.

--

___
Python tracker 

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



[issue18304] ElementTree -- provide a way to ignore namespace in tags and seaches

2016-07-27 Thread jonathan miller

jonathan miller added the comment:

A flexible and pretty simple way opf loosening up handling namespaces would be 
to OPTIONALLY change what is done at parse time:

1.  Don't handle xmlns declarations specially.  Leave them as normal 
attributes, and the Element.attrib would have a normal entry for each.

2. Leave the abbreviation colon-separated prefix in front of the element
tags as they come in.

If the using code wants, it can walk the ElementTree contents making 
dictionaries of the active namespace declarations, tucking a dict reference 
into each Element.  Maybe put in an ElementTree method that does this, why not?

I'm interested in this topic because I wish to handle xml from a variety of 
different tools, some of which had their XML elements defined without 
namespaces.  They can use element names which are really common - like 
'project' - and have no namespace definitions.  Worse:   if you put one in, the 
tool that originally used the element breaks.

Doing things as suggested gives the user the opportunity to look for matches 
using the colonized names, to shift namespace abbrevs easily, and to write out 
nicely namespaced code with abbrevs on the elements easily.

This would be OPTIONAL:  the way etree does it now, full prefixing of URI, is 
the safe way and should be retained as the default.

--
nosy: +jjmiller50

___
Python tracker 

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



[issue27634] selectors.SelectSelectors fails if select.select was patched

2016-07-27 Thread Przemyslaw Wegrzyn

Przemyslaw Wegrzyn added the comment:

Possible workaround in the patch attached.

--
keywords: +patch
Added file: http://bugs.python.org/file43910/selectors.diff

___
Python tracker 

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



[issue27634] selectors.SelectSelectors fails if select.select was patched

2016-07-27 Thread Przemyslaw Wegrzyn

New submission from Przemyslaw Wegrzyn:

The SelectSelector makes a local copy of select.select() built-in and calls it 
via self._select later on. It no longer works if select.select() built-in is 
replaced with function (something gevent's monkey patching does).

Currently gevent employs a workaround - it overwrites SelectSelector._select. 
It wouldn't be necessary if SelectSelector could cope with select.select() 
being a regular function.

Attached is a file reproducing the issue.

--
components: Library (Lib)
files: t_s.py
messages: 271446
nosy: Przemyslaw Wegrzyn
priority: normal
severity: normal
status: open
title: selectors.SelectSelectors fails if select.select was patched
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file43909/t_s.py

___
Python tracker 

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



[issue27633] Doc: Add missing version info to email.parser

2016-07-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3f2e37e705d3 by Berker Peksag in branch '3.5':
Issue #27633: Fix usage of versionchanged directive in email.parser.rst
https://hg.python.org/cpython/rev/3f2e37e705d3

New changeset 8224ad99842e by Berker Peksag in branch 'default':
Issue #27633: Merge from 3.5
https://hg.python.org/cpython/rev/8224ad99842e

--
nosy: +python-dev

___
Python tracker 

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



[issue27633] Doc: Add missing version info to email.parser

2016-07-27 Thread Berker Peksag

Berker Peksag added the comment:

Good catch, thanks!

--
nosy: +berker.peksag
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed
type: enhancement -> behavior
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue27633] Doc: Add missing version info to email.parser

2016-07-27 Thread SilentGhost

SilentGhost added the comment:

LGTM

--
assignee:  -> docs@python
components: +Documentation
nosy: +SilentGhost, docs@python
stage:  -> commit review

___
Python tracker 

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



[issue27633] Doc: Add missing version info to email.parser

2016-07-27 Thread Florian Preinstorfer

New submission from Florian Preinstorfer:

The versionchanged field has no version info for message_from_string().

--
files: email-parser-add_version_info.patch
keywords: patch
messages: 271442
nosy: notizblock
priority: normal
severity: normal
status: open
title: Doc: Add missing version info to email.parser
type: enhancement
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43908/email-parser-add_version_info.patch

___
Python tracker 

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



[issue17602] mingw: default sys.path calculations for windows platforms

2016-07-27 Thread Martin Panter

Martin Panter added the comment:

I wonder if the PYTHONPATH preprocessor definition can just be moved from 
PC/pyconfig.h. It is a shame to duplicate it, and it only seems to be used in 
PC/getpathp.c (if you ignore Modules/getpath.c which is unused on Windows).

--
components: +Windows
nosy: +martin.panter, paul.moore, steve.dower, tim.golden, zach.ware
stage:  -> patch review

___
Python tracker 

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



[issue27632] build on AIX fails when builddir != srcdir, more than bad path to ld_so_aix

2016-07-27 Thread Michael Felt

New submission from Michael Felt:

Note: - Only examined on Python 2.7, but expect the same issue (from Python 
3.4.X, 3.5.X and 3.6.X based on earlier attempts to use a separate builddir

SUMMARY:
* when builddir==srcdir build completes normally, (see DETAILS2:)
* when builddir!=srcdir ...
** "configure" completes, no error messages
** "make" completes: some warnings, and I am surprised that make does not stop 
when message
 "unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory"
 appears
 The ./python executable can be executed (no other tests done yet)
 root@x064:[/data/prj/aixtools/python/Python-2.7.12]./python
 Python 2.7.12 (default, Jul 27 2016, 07:26:36) [C] on aix5
 Type "help", "copyright", "credits" or "license" for more information.
 >>> 
* make install DESTDIR=/some/where/for/packaging - FAILS
* in DETAILS3: I show that 'helping' by setting a symbolic link (messages 
continue), then a hard-link (ld_so_aix messages go away) also fails
 
COMMENTS:
* the Bitfield messages are 'known' and occur in all versions of Python (2.7.X, 
3.3.X, 3.4.X, 3.5.X and 3.6.X - 3.2.X, (3.1.X and 3.0.X never tried))
* I hae no idea what all the "Skipping" is about, leaving in details as FYI

DETAILS (verbatum): 

root@x064:[/data/prj/aixtools/python/Python-2.7.12]buildaix 
--without-computed-gotos
VRMF 2.7.12.0
xlc is /usr/vacpp/bin/xlc
+ [[ 0 -eq 0 ]]
+ CC=xlc_r
+ export CC
+ CC=xlc_r CPPFLAGS="-I/opt/include -I/opt/buildaix/include" 
CFLAGS="-I/opt/include -O2 -qmaxmem=-1 -I/opt/buildaix/includes"\
../src/Python-2.7.12/configure\
--prefix=/opt \
--sysconfdir=/var/Python/etc\
--sharedstatedir=/var/Python/com\
--localstatedir=/var/Python\
--mandir=/usr/share/man\
--infodir=/opt/share/info/Python --without-computed-gotos\
> .buildaix/configure.out
+ make > .buildaix/make.out
"../src/Python-2.7.12/Objects/typeobject.c", line 6243.26: 1506-068 (W) 
Operation between types "void*" and "struct _object*(*)(struct _object*)" is 
not allowed.
"../src/Python-2.7.12/Objects/typeobject.c", line 6290.22: 1506-068 (W) 
Operation between types "void*" and "long(*)(struct _object*)" is not allowed.
"../src/Python-2.7.12/Objects/typeobject.c", line 6490.18: 1506-068 (W) 
Operation between types "void*" and "long(*)(struct _object*)" is not allowed.
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
"/data/prj/aixtools/python/src/Python-2.7.12/Modules/_ctypes/_ctypes_test.c", 
line 382.5: 1506-159 (E) Bit field type specified for M is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/src/Python-2.7.12/Modules/_ctypes/_ctypes_test.c", 
line 382.5: 1506-159 (E) Bit field type specified for N is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/src/Python-2.7.12/Modules/_ctypes/_ctypes_test.c", 
line 382.5: 1506-159 (E) Bit field type specified for O is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/src/Python-2.7.12/Modules/_ctypes/_ctypes_test.c", 
line 382.5: 1506-159 (E) Bit field type specified for P is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/src/Python-2.7.12/Modules/_ctypes/_ctypes_test.c", 
line 382.5: 1506-159 (E) Bit field type specified for Q is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/src/Python-2.7.12/Modules/_ctypes/_ctypes_test.c", 
line 382.5: 1506-159 (E) Bit field type specified for R is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/src/Python-2.7.12/Modules/_ctypes/_ctypes_test.c", 
line 382.5: 1506-159 (E) Bit field type specified for S is not valid. Type 
unsigned assumed.
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute '../src/Python-2.7.12/Modules/ld_so_aix': No such file or 
directory
unable to execute 

[issue16353] add function to os module for getting path to default shell

2016-07-27 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> After several years there is still no consenus, so make it simple - the popen 
> and subprocess shell is one of /bin/sh, cmd.exe, or some other "hard-coded" 
> shell.

I agree, the last patch that is being reviewed in issue 16255 attempts to do 
that.

--

___
Python tracker 

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



[issue27631] .exe is appended to python executable based on filesystem case insensitivity

2016-07-27 Thread Eryk Sun

Changes by Eryk Sun :


--
stage:  -> resolved

___
Python tracker 

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



[issue17594] mingw: preset configure defaults

2016-07-27 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue27631] .exe is appended to python executable based on filesystem case insensitivity

2016-07-27 Thread Ammar Askar

Ammar Askar added the comment:

Aah, you're completely correct. Renaming it to python and doing ./python causes 
it to confuse it with the directory. Sorry.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue27631] .exe is appended to python executable based on filesystem case insensitivity

2016-07-27 Thread Martin Panter

Martin Panter added the comment:

My guess is it was to avoid a conflict between the “Python/” source directory, 
and the “./python” executable that may be built in the same directory. Wouldn’t 
that be a problem in your case too?

--
nosy: +martin.panter

___
Python tracker 

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



[issue27631] .exe is appended to python executable based on filesystem case insensitivity

2016-07-27 Thread Ammar Askar

New submission from Ammar Askar:

I encountered some odd behavior today, I compiled python inside VirtualBox, 
however, I compiled it inside a shared folder. The OS outside of VirtualBox is 
Windows, so the shared folder naturally is case-insensitive. The actual virtual 
OS is Debian Linux. Upon running make, I found that oddly enough the executable 
created was called `python.exe`. Running `make install` still installs it to 
the correct python name.

I did some digging around and from what I can tell this is the change that 
makes the built python executable have an exe extension or not depending on 
file system case insensitivity. 

https://hg.python.org/cpython/rev/d64dfbdc5f8c

It's from way long ago from 2001 and I can't figure out why exactly this change 
was made. The commit message hints that it has something to do with Mac's file 
system. I asked a friend who used MacOS back then and he reports that it had no 
file extensions back then either. As far as I know, the only OS that really 
requires file extension is windows, and besides, this exact situation is what 
the https://www.gnu.org/software/automake/manual/html_node/EXEEXT.html variable 
is for, which is used in the configure.ac file already.

It seems a little odd that whether or not to put .exe in the build executable 
is based on file system case insensitivity.

--
components: Build
messages: 271436
nosy: ammar2
priority: normal
severity: normal
status: open
title: .exe is appended to python executable based on filesystem case 
insensitivity
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue18500] mingw: detect winsock2 and setup _socket module

2016-07-27 Thread Martin Panter

Martin Panter added the comment:

The patch extends Misc/config_mingw, which is added by another patch in Issue 
17594.

--
dependencies: +mingw: preset configure defaults
nosy: +martin.panter

___
Python tracker 

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



[issue17594] mingw: preset configure defaults

2016-07-27 Thread Martin Panter

Changes by Martin Panter :


--
stage:  -> patch review

___
Python tracker 

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



[issue17594] mingw: preset configure defaults

2016-07-27 Thread Martin Panter

Martin Panter added the comment:

Interesting approach. Why two separate files, for cross-compiling and native 
compiling? Why not merge them together?

Some of the other Min GW patches add stuff like the following to the 
configure.ac checks. Would it make more sense to add e.g. 
ac_cv_struct_addrinfo=yes to the config, and avoid the compile check?

 AC_CACHE_VAL(ac_cv_struct_addrinfo,
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct addrinfo 
a]])],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_WS2TCPIP_H
+#  include 
+#else
+#  include 
+#endif]],
+[[struct addrinfo a]])],
   [ac_cv_struct_addrinfo=yes],
   [ac_cv_struct_addrinfo=no]))

--
nosy: +martin.panter

___
Python tracker 

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