[issue27659] Check for the existence of crypt()

2016-07-31 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

On Android the crypt() function is missing, causing ugly linking errors when 
compiling the _crypt module. This patch handles it elegantly.

A question: should I include changes to configure and pyconfig.h.in in the 
patch?

--
components: Cross-Build
files: check-crypt.patch
keywords: patch
messages: 271727
nosy: Alex.Willmer, Chi Hsuan Yen, xdegaye
priority: normal
severity: normal
status: open
title: Check for the existence of crypt()
type: compile error
versions: Python 3.6
Added file: http://bugs.python.org/file43954/check-crypt.patch

___
Python tracker 

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



[issue27659] Check for the existence of crypt()

2016-07-31 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Version 2: correct the name added to `missing`

--
Added file: http://bugs.python.org/file43955/check-crypt.patch

___
Python tracker 

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



[issue27659] Check for the existence of crypt()

2016-07-31 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Some references for crypt():

POSIX standard: 
http://pubs.opengroup.org/onlinepubs/9699919799/functions/crypt.html
Linux man page: http://man7.org/linux/man-pages/man3/crypt.3.html
FreeBSD man page: https://www.freebsd.org/cgi/man.cgi?crypt(3)
Mac OS X man page: 
https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man3/crypt.3.html

All requires .

--

___
Python tracker 

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



[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-07-31 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue27659] Check for the existence of crypt()

2016-07-31 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> A question: should I include changes to configure and pyconfig.h.in in the 
> patch?

You just need to mention that one should run autoreconf.

--

___
Python tracker 

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



[issue26865] Meta-issue: support of the android platform

2016-07-31 Thread Xavier de Gaye

Xavier de Gaye added the comment:

issue #27659: Check for the existence of crypt()

--
dependencies: +Check for the existence of crypt()

___
Python tracker 

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



[issue27659] Check for the existence of crypt()

2016-07-31 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Thanks, added to the patch description

--

___
Python tracker 

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



[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2016-07-31 Thread Xiang Zhang

Xiang Zhang added the comment:

There seems to be some difference behaviours between C version and pure Python 
version when it comes to subclass. Except popitem, the constructor also goes 
different code path. There may be more. Should these differences be eliminated 
or they are accepted?

--

___
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-31 Thread koobs

koobs added the comment:

Thank you Alexander, consider me satisfied :)

--

___
Python tracker 

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



[issue23746] sysconfg.is_python_build() is buggy

2016-07-31 Thread Berker Peksag

Changes by Berker Peksag :


--
components:  -Library (Lib)
keywords: +easy
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-31 Thread Xiang Zhang

Xiang Zhang added the comment:

Martin, I upload a patch to fix another possible overflow in listextend.

--
Added file: http://bugs.python.org/file43956/overflow_fix_in_listextend.patch

___
Python tracker 

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



[issue27035] Cannot set exit code in atexit callback

2016-07-31 Thread George King

George King added the comment:

The documentation for atexit.register clearly states that a SystemExit raised 
inside of the registered function is a special case:

'''
If an exception is raised during execution of the exit handlers, a traceback is 
printed (unless SystemExit is raised) and the exception information is saved. 
After all exit handlers have had a chance to run the last exception to be 
raised is re-raised.
'''

Python 2.7.11 behaves as described; Python 3.5.2 does not.

I believe there is a clear argument for allowing atexit functions to set an 
exit status code: Ultimately, it is the responsibility of the application 
programmer to return an appropriate code for all execution paths, and it is up 
to the programmer to decide what is appropriate. I can easily imagine cases 
where the atexit function encounters a critical error and the appropriate 
behavior is to return an error status to the parent process.

In many large systems, returning the correct code is the most critical behavior 
of a process, and so if atexit prevents the programmer from doing so then its 
utility is greatly diminished.

I disagree that calling _exit is "equally broken". Calling _exit completely 
breaks the atexit unwinding contract, and if an error code is necessary, then 
this is exactly what I am forced to do!

In my mind the correct behavior would be that the process exit code is 
determined from the last exception that occurs in the exit process.
- If the program begins exiting with 0, and then an atexit handler raises 
SystemExit(1), then code 1 should be returned.
- If the program begins exiting with 1, and then an atexit handler raises 
SystemExit(0), then code 0 should be returned (this may seem strange, but 
handlers can do all manner of strange things!).
- If successive handlers raise multiple exceptions, the last one determines the 
code.
- If the program is exiting with any code, and an exception other than 
SystemExit is raised, then we should return the code that would result from 
raising that exception in normal execution (usually 1).

I expect this last case to be most contentious, because it changes behavior for 
both python2 and python3. However I think it is desirable because it gives the 
handlers precise capabilities (and responsibilities) regarding process status. 
The point of atexit is to allow modules to execute code in a deferred manner; 
the design already specifies a 'last exception wins' policy, and the problem is 
that we are unnecessarily suppressing the exit code that would result from that 
last exception.

--
nosy: +George.King

___
Python tracker 

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



[issue27641] Do not build Programs/_freeze_importlib when cross-compiling

2016-07-31 Thread Thomas Perl

Thomas Perl added the comment:

+1 on comment-out-regen.patch, makes things much cleaner and removes the shell 
"if" in the rule body.

Just a small bikeshed issue: Instead of COMMENT_REGEN, maybe call it 
"CROSS_COMPILE_COMMENT" or "GENERATED_COMMENT" or "COMMENT_IF_CROSS" or 
somesuch? This way, might be easier to read/understand the makefile rules 
("COMMENT_IF_CROSS" -> "a comment character will be inserted here if 
cross-compiling")?

--

___
Python tracker 

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



[issue27657] urlparse fails if the path is numeric

2016-07-31 Thread R. David Murray

R. David Murray added the comment:

I hate to say it, but this may require a python-dev discussion.  We probably 
ought to be parsing valid urls correctly as our top priority, but if that 
breaks our parsing of "reasonable" non-valid URLs (that existing code is 
depending on), it's going to be a backward compatibility problem.

--

___
Python tracker 

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



[issue27657] urlparse fails if the path is numeric

2016-07-31 Thread R. David Murray

R. David Murray added the comment:

On second thought, what are the chances that special casing something that 
looks like an IP address in the scheme position would maintain backward 
compatibility?

--

___
Python tracker 

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



[issue27035] Cannot set exit code in atexit callback

2016-07-31 Thread R. David Murray

R. David Murray added the comment:

Well, changing something like this in 2.7 is off the table in any case.  This 
would be a "feature release only" type of change if there is agreement that it 
is a good idea.

--
components: +Interpreter Core
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue27035] Cannot set exit code in atexit callback

2016-07-31 Thread R. David Murray

Changes by R. David Murray :


--
type: behavior -> enhancement

___
Python tracker 

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



[issue27435] ctypes and AIX - also for 2.7.X (and later)

2016-07-31 Thread Michael Felt

Michael Felt added the comment:

> FYI: I tried to pip install Mercurial - but got an error message from an 
> include file so the last bit did not compile. Problem for a later date - 
> could be a user error on my part, or an AIX version dependency. (during 
> discussion issue26439)

I have mercurial "installed", but not (yet) any idea on how to use it to submit 
a patch.

Again: going back to comments in issue26439 - and my 'new' responses as far as 
the patch submitted (but not yet using Mercurial)

> Here is a summary of what I would be comfortable adding to Python:

> 1. Add ctypes.RTLD_MEMBER constant (new API, so 3.6+ only)

Not included. RTLD_MEMBER is a well documented constant needed for AIX dlopen. 
It is hard-coded in __init__.py

> 2. Basic ctypes.util.find_library("crypto") implementation for AIX. But cases 
> like find_library("libintl.so") should fail. I think your earlier patches 
> were closer to this implementation than the later ones.

Months further, I understand that is a variant behavior, and has been removed. 
find_library("c"), find_library("crypto") are supported, an argument suchas 
find_library("libintl.so") will return None (or something like 
/usr/lib/liblibintl.so will need to exist).

> I am a bit hesitant about the automatic behaviour of 
> CDLL("libcrypto.a(libcrypto.so.1.0.0)") using RTLD_MEMBER. IMO it may be 
> better to let the caller specify RTLD_MEMBER explicitly. If a shared library 
> file literally called “/usr/lib/libcrypto.a(libcrypto.so.1.0.0)” existed, 
> i.e. not inside an archive, would dlopen("libcrypto.a(libcrypto.so.1.0.0)", 
> RTLD_NOW) succeed? I admit this is an unlikely scenario, but it seems bad to 
> reduce the domain of a low-level API.

>I hope this is now acceptable (see 
>http://bugs.python.org/issue26439#msg267254) 
>> ## Automatic RTLD_MEMBER ##

>I was still uneasy about the automatic setting of RTLD_MEMBER. But I looked 
>for how others handle this, and I found Libtool’s LTDL library, and Apache 
>Portable Runtime (APR). Both have a similar (but stricter) automatic addition 
>based on detecting the archive(member) notation:

>http://git.savannah.gnu.org/cgit/libtool.git/commit/libltdl/loaders/dlopen.c?id=8fa719e
>https://github.com/apache/apr/commit/c27f8d2

> So I guess I can accept this way,

> I understand it would be good to have the return value of find_library() 
> consistent with the name accepted by CDLL(). Perhaps a new parameter format 
> would help, such as a tuple (archive, member).

> I am not comfortable with other aspects. I think I would have to see more 
> discussion with other people to change my opinion:

> 1. CDLL("libintl.so") should not load “libintl.a(libintl.so.1)”. I understand 
> you want this to help code written for Gnu or Linux automatically work on 
> AIX, but it doesn’t feel correct and robust to me. Perhaps moving this sort 
> of thing to a separate function or package would be better.

> 2. find_library("libintl.so") -> "libintl.a(libintl.so.1)". I would expect it 
> to look for a shared library installed in something like 
> "/usr/lib/liblibintl.so.a", unless I have misunderstood how compile-time 
> linking (cc -llibintl.so) works.

Again, my misunderstanding of how this function is intended - python newbie. 
arguments starting with "lib" are not likely to work - and it is not on 
find_library to strip "lib" to make the argument more -l like.

> 3. find_library() should not set the LIBPATH environment variable.

As before, and as is the status in issue9998 - no use of LIBPATH or 
LD_LIBRARY_PATH - even though dlopen() does use them. Although, if your 
objection is primarily on 'set' (i.e., a get could be accepted) - that is easy 
to put back in.

Thanks again for your help.

Note: the reason for the new issue# is because too much of what I was 
submitting before was "extension" and not "correction".

Hopefully, this makes the discussion more clear.

--

___
Python tracker 

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



[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-07-31 Thread Michael Felt

Michael Felt added the comment:

Thanks again for your help.

Note: I started a issue# is because too much of what I was submitting here was 
"extension" and not "correction".

Hopefully, the new issue# will be cleaner.

--

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-31 Thread Antti Haapala

Antti Haapala added the comment:

I would very much like to see this in 3.6. Who could review it?

--

___
Python tracker 

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2016-07-31 Thread Guido van Rossum

Guido van Rossum added the comment:

Nobody has posted a real use case. All the examples are toys. What are the
real use cases that are blocked by this? Readability counts!

--

___
Python tracker 

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



[issue27466] [Copy from github user macartur] time2netscape missing comma

2016-07-31 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-31 Thread Eric V. Smith

Eric V. Smith added the comment:

I intend to review this. As this is not a new feature, it doesn't need to be 
completed by beta 1. I'm focusing my energies on new features, then I'll look 
at this.

--

___
Python tracker 

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



[issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize

2016-07-31 Thread Xiang Zhang

New submission from Xiang Zhang:

In list_resize, new_allocated is of type size_t but I think don't have to be 
now since it finally have to assign back to self->allocated which is of type 
Py_ssize_t. With Py_ssize_t, we can check some overflows in the first overflow 
check and don't need the second overflow check.

--
components: Interpreter Core
files: list_resize.patch
keywords: patch
messages: 271746
nosy: martin.panter, xiang.zhang
priority: normal
severity: normal
status: open
title: Replace size_t with Py_ssize_t as the type of local variable in 
list_resize
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43957/list_resize.patch

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Since this introduces a new opcode, this is a new feature. Seems opcodes never 
were added at beta stage before 3.5b1.

--

___
Python tracker 

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



[issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize

2016-07-31 Thread R. David Murray

R. David Murray added the comment:

ob->allocated is temporarily set to -1 by list.sort to detect mutations, so the 
restriction of new_allocated to size_t is probably intentional.  If so, though, 
there ought to be a comment making that clear.

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



[issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize

2016-07-31 Thread R. David Murray

R. David Murray added the comment:

Oh, I got that backward didn't I.  My rusty C skills :(

--

___
Python tracker 

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2016-07-31 Thread Emanuel Barry

Emanuel Barry added the comment:

TL;DR - Use case is dynamic decorators. Not all of the syntax would make sense, 
see below.

The main benefit of this feature would be for dynamic decorators (as was 
evidenced from others in this issue). In a project I contribute to, we use 
dynamic decorators to set a function as being a command, and we use the object 
(a wrapper around the function) directly, so we need a bit more boilerplate 
around the place.

Ultimately, we would definitely use such a feature (just the '@spam().eggs()' 
part; we'd have no use for the other ones) , but we probably won't notice its 
absence either; we've worked around it for years, after all.

As far as readability goes, I think allowing only the '@spam().eggs()' version 
would actually improve readability quite a bit, by reducing the need to 
separate the decorator assignment in two (or more) parts. I can see the desire 
to have a '@spam[eggs]' kind of syntax though, again for the dynamic decorators 
case.

I see no reason to allow creating lambdas or conditional expressions inside 
decorators expressions. If anything, that'll encourage anti-patterns, whereas 
e.g. '@spam(value=eggs)' would be more readable, and would let the decorator 
decide what it wants to do with the value.

And if your decorator can be expressed as a lambda, why don't you put that 
in/below the function? Surely it's less work than writing the lambda everytime 
;)

--
nosy: +ebarry
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue27661] Add tzinfo= argument to datetime.combine

2016-07-31 Thread Alexander Belopolsky

New submission from Alexander Belopolsky:

Add an optional tzinfo argument to datetime.combine() so that

 datetime.combine(d, t, info)

returns the same object as

 datetime.combine(d, t).replace(tzinfo=info)

but without creating an intermediate naive instance.

Guido's LGTM: 
https://mail.python.org/pipermail/datetime-sig/2016-July/000993.html

--
assignee: belopolsky
messages: 271751
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Add tzinfo= argument to datetime.combine
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



[issue27661] Add tzinfo= argument to datetime.combine

2016-07-31 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file43958/issue27661.diff

___
Python tracker 

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



[issue27477] IDLE: Switch search dialogs to ttk widgets, and other refinement

2016-07-31 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I debated whether to open a new search style issue and copy a message or defer 
ttk for config to another issue and re-title this.  I went with widget group 
rather than aspect (style) this time. There are multiple search behavior issues.

I added Notepad, Workpad, Libre Office Write, Tortoise Hg, and browsers to 
Notepad++ for Find/Search and Replace dialog box comparisons.  From top to 
bottom.

0.1 De-modalize: The others are not modal and it is a nuisance.  #24760 is 
about same for Config dialog. #24813 for Help stuff.  I should look at your 
patches now.

0.2 List under Windows menu so easier to bring to top to use or close.  
Currently, cannot access Windows menu or anything else do to modality.  
Fortunately, Windows does list on popup expansion of taskbar icon.

1.0 Title: delete obvious "Dialog", add file base name.  I sometime forget 
which file Search box is attached to and waste time searching wrong file.  Will 
get worse with multiple boxes.

1.1 With tk, can we delete [-] min and [[]] max buttons and leave [X] close 
button?  They are not present for 4 apps with floating boxes.  #24039 is about 
inconsistent behavior of these buttons.  If deleting them is a possible 
solution, I want to consider it.

2. I do not see 'whitespace around gray widgets', but I don't think I need to.  
I do see widgets jammed against edges and agree space is needed.  Framing will 
also be wanted, I expect, as a pane for future single big window version of 
IDLE.

I just noticed that TortoiseHg has 4 options for its main pane, Search being 
one of them.  The 'tabs' are icons in a vertical strip to the right.  Search is 
a magnifying glass.  Each has a mouse hover popup word.

3. Regular expression, Match case, and Whole word modify What to search for, 
and belong together.  Wraparound, Up, and Down modify How to search, and I 
think also belong together on a line.  Grid would be 4 columns for these.

4.1 Close button should be at bottom or to the right. L.O.Write has [Help] and 
[Close] to bottom left and right respectively.  I want to consider this.  We 
could add a new parameter 'start_at' to help.py classes, defaulting to the top. 
 "if start_at: "  Then [Help] would display a new section 
"Search and Replace" added to the idle.rst and hence help.html.  'Find' is 
non-overlapping.  'Relational expression' uses patterns as defined in re doc.  
I have found 'whole word' not as obvious as I expected.  It should have an 
explicit definition and behavior to match. Ditto for 'Match case' in a unicode 
world.

4.2  Putting the 4 F & R buttons across the bottom on platforms where that is 
the norm is OK with me.  I only see down the side so far on Windows.  Search 
could (should?) have [Find all] in addition to [Find next].  The 4 F & R 
buttons could be Find, Find all, Replace, Replace all (L.O.Write).  But 
behavior change should be different issue.

--
assignee:  -> terry.reedy
title: IDLE: Switch dialogs to ttk widgets. -> IDLE: Switch search dialogs to 
ttk widgets, and other refinement

___
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-31 Thread Mark Roseman

Mark Roseman added the comment:

Serhiy, the tk_dialog has been superseded by tk_messageBox, and does not 
reflect current platform standards.  I just tried tk_messageBox on the Mac, 
which always activates the default button if you press 'return', even if 
another button has the focus. I expect Windows and X11 are different, and will 
check that out when I get a chance.

--

___
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-31 Thread Ned Deily

Changes by Ned Deily :


--
nosy:  -ned.deily

___
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-31 Thread Ned Deily

Ned Deily added the comment:

Possible duplicate of Issue10656 (see also Issue16189)

--
nosy: +David.Edelsohn, ned.deily

___
Python tracker 

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2016-07-31 Thread Guido van Rossum

Guido van Rossum added the comment:

Could you link to an example decorator definition and its call site(s)
that would benefit? I'm lacking the imagination to understand what a
"dynamic decorator" might be. @spam().eggs() is not enough to help me
understand -- I understand quite well what syntax people are
requesting, but I am unclear on what they actually want to do with it.
I worry there's some extreme use of higher-order functions here that
would just get in the way of readability, but a real-world example
might dispell my fear. (That's what I meant when I said "use case".)

--

___
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-31 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Background: For Open Module, the old commondialog did not have the asymmetrical 
drop shadow.  That is an unintentional addition (from a frame?) and I don't 
like it.  Perhaps we should use grid instead.  Rows 0 and 1 for the initial 
label and entry, with columnspan 2, rows 8 and 9 for error message and buttons. 
 This leaves room for insertion of path message, path entry, and browse button. 
 Patch welcome.

A definite yes for error label in widget.  I dislike the popup.  Begone!  
Should a blank label reserve space or should it be inserted as needed, making 
box expand.

--

___
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-31 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Serhiy: I believe Notepad, Wordpad, Libre Office Write behave as you describe.  
But there are differences in details. So I don't consider issue closed, but it 
is low priority to me.

--

___
Python tracker 

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2016-07-31 Thread Emanuel Barry

Emanuel Barry added the comment:

Sure, here goes; this is an IRC game bot which I contribute to. Apologies for 
the long links, it's the only way to make sure this consistently points to the 
same place regardless of future commits.

The 'cmd' decorator we use is defined at 
https://github.com/lykoss/lykos/blob/1852bf2c442d707ba0cbc16e8c9e012bcbc4fcc5/src/decorators.py#L67
 - we use its __call__ method to add the function to it; see next link.

How it's used: 
https://github.com/lykoss/lykos/blob/1852bf2c442d707ba0cbc16e8c9e012bcbc4fcc5/src/wolfgame.py#L9113
 - ideally, a syntax such as the following would be nice for these definitions:

­@cmd("myrole", ).set
def myrole(cli, nick, chan, rest):
# ... do stuff here ...

Historically (we used an arcane closure-based version that no one understood), 
we could call that function after directly, like any normal function. Now, 
though, we have to call it like this: 
https://github.com/lykoss/lykos/blob/1852bf2c442d707ba0cbc16e8c9e012bcbc4fcc5/src/wolfgame.py#L764

I'd like to state again that, while we'd use this new syntax, we've already 
worked around this lack of syntax. Whatever comes out of this, we won't be 
negatively affected, but decorators are meant to bring whatever alters the 
function right where it starts, so having syntax that eases that would make 
sense (to me, anyway).

--

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-31 Thread Martin Panter

Martin Panter added the comment:

overflow_fix_in_listextend.patch: I doubt Python supports the kinds of platform 
where this overflow would be possible. It may require pointers smaller than 32 
bits, or char objects larger than 8 bits. Perhaps we could just add a comment 
explaining we assume the overflow cannot happen.

It seems list objects will hold one pointer for each element, but the overflow 
involves the number of elements. Python defines PY_SSIZE_T_MAX as PY_SIZE_MAX 
// 2. For the overflow to happen we would need

m + n > PY_SSIZE_T_MAX

Assuming a “flat” address space that can allocate up to PY_SIZE_MAX bytes _in 
total_, the total number of elements cannot exceed

m + n == PY_SIZE_MAX // sizeof (PyObject *)

So in this scenario, the overflow cannot happen unless sizeof (PyObject *) == 1.

Considering things like the 16-bit segmented Intel “large” memory model (which 
I doubt Python is compatible with), each list could _independently_ be up to 
PY_SIZE_MAX bytes. Therefore the total number of elements may reach

m + n == PY_SIZE_MAX // sizeof (PyObject *) * 2

So even in this case, sizeof (PyObject *) == 4 (large model) is fine, but 
anything less (e.g. 16-bit char, or 1-byte segment + 2-byte offset) might 
overflow.

--

___
Python tracker 

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



[issue27641] Do not build Programs/_freeze_importlib when cross-compiling

2016-07-31 Thread Martin Panter

Martin Panter added the comment:

Thanks for the feedback. I did wonder about the name. Perhaps I will go with 
GENERATED_COMMENT:

GENERATED_COMMENT='#'

Python/importlib_external.h: @GENERATED_COMMENT@ 
$(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib

--

___
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-31 Thread Mark Roseman

Mark Roseman added the comment:

Just to follow up, both Windows and Linux the 'correct' behaviour seems to be 
that space or return activates the button with the current focus. Mac behaves 
differently in that return key always activates default button even if focus is 
on another button (and normally on Mac, buttons don't get focus).

I'll put together a patch that cleans up the layout and does the error label in 
dialog thing.

--

___
Python tracker 

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



[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2016-07-31 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +davin

___
Python tracker 

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2016-07-31 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, so if you wanted to be able to call myrole(...) instead of
myrole.caller, why doesn't cmd.__call__ return self.caller rather than
just self?

--

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-31 Thread Xiang Zhang

Xiang Zhang added the comment:

Hmm, I don't tend to infer platform characteristics. IMHO, it's a simple 
problem: sum up two lists' length which may overflow in logic.

With your argument, does it means it seems somewhat meaningless to have a List 
a Py_ssize_t length since it can never reach it? Checks against PY_SSIZE_T_MAX 
have already existed (for example, in ins1).

--

___
Python tracker 

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2016-07-31 Thread Emanuel Barry

Emanuel Barry added the comment:

We want to be able to access the instance attributes (as is done e.g. here: 
https://github.com/lykoss/lykos/blob/1852bf2c442d707ba0cbc16e8c9e012bcbc4fcc5/src/wolfgame.py#L9761
 ). I realize we can set the attributes directly on the functions, but we've 
decided to not do that (it's a style thing, really). Although I guess a class 
method which then returns our desired method could work out for us.

While I still think that this kind of syntax might be useful for dynamic 
decorators (I know I'd use that when playing with decorators), I'm afraid I'm 
out of concrete examples to send your way.

--

___
Python tracker 

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



[issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize

2016-07-31 Thread Xiang Zhang

Xiang Zhang added the comment:

:( Sorry David, my poor English doesn't enable me understand your message 
totally. Is list.sort related to this problem? Do I miss something?

--

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-31 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
nosy:  -gregory.p.smith

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-31 Thread Martin Panter

Martin Panter added the comment:

The check in ins1() was originally added in revision b9002da46f69. I presume it 
references the Python-dev thread “can this overflow (list insertion)?” 
<2812145155.a7...@activestate.com>, 
. At that time, ob_size was 
an int, so overflow checking was definitely needed. Later, revision 
7fdc639bc5b4 changed ob_size to Py_ssize_t, and then revision 606818c33e50 
updated the overflow check from INT_MAX to PY_SSIZE_T_MAX.

BTW I made a small mistake in my previous message. The worst case would be 
extending a list with itself. But I think the conclusion is still the same.

--

___
Python tracker 

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2016-07-31 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, maybe someone else wants to provide a real-world example.
Otherwise I am really going to close this (again).

--

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-31 Thread Xiang Zhang

Xiang Zhang added the comment:

So these checks are superfluous? Do we need to remove them?

Hmm, I still doubt such checks should consider platform characteristics first. 
In theory List can be PY_SSIZE_T_MAX length. Do we have to put the PY_SIZE_MAX 
// sizeof(PyObject *) limit on it?

--

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-31 Thread Antti Haapala

Antti Haapala added the comment:

I don't believe Python would really ever work on a platform with 
non-8-bit-bytes, I believe there are way too much assumptions *everywhere*. You 
can program in C on such a platform, yes, but not that sure about Python.

And on 8-bit-byte platfomrs, there is no large model with 16-bit pointers 
anywhere. There just are not enough bits that you could have multiple 64k 
byte-addressable segments that are addressed with 16-bit pointers. 

It might be that some obscure platform in the past would have had 128k memory, 
with large pointers, 2 allocatable 64k segments, >16 bit char pointer and 
16-bit object pointers pointing to even bytes, but I doubt you'd be really 
porting *Python 3* to such a platform, basically we're talking about something 
like Commodore 128 here.

--

___
Python tracker 

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



[issue27575] dict viewkeys intersection slow for large dicts

2016-07-31 Thread David Su

David Su added the comment:

Attached is a patch that I had been working on. Could you please review and 
provide me with some feedback? Thanks!

--
keywords: +patch
Added file: http://bugs.python.org/file43959/dict_view_intersection.patch

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-07-31 Thread Rolf Krahl

Rolf Krahl added the comment:

*ping*

It's more then four weeks ago that I revised my patch, still waiting for 
review.  I also still need feedback on the question whether the new 
EncodingError exception introduced by Damien should be kept or whether I should 
change this to a ValueError.

--

___
Python tracker 

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



[issue27575] dict viewkeys intersection slow for large dicts

2016-07-31 Thread David Su

Changes by David Su :


Added file: http://bugs.python.org/file43960/dictview_intersection_test.py

___
Python tracker 

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



[issue27575] dict viewkeys intersection slow for large dicts

2016-07-31 Thread David Su

Changes by David Su :


Added file: http://bugs.python.org/file43961/performance_test.sh

___
Python tracker 

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



[issue27661] Add tzinfo= argument to datetime.combine

2016-07-31 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +SilentGhost

___
Python tracker 

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