[issue27405] Ability to trace Tcl commands executed by Tkinter

2016-07-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I just noticed that the patch includes a patch to _tkinter.c, which however, 
does not show up on the Rietveld dashboad, where I first reviewed it.  Sorry 
for the mistaken comment.

--

___
Python tracker 

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



[issue17128] OS X system openssl deprecated - installer should build local libssl

2016-07-01 Thread Kevin Ollivier

Kevin Ollivier added the comment:

The OpenSSL included with OS X, still at 0.9.8, has become very dated and a 
growing number of servers (including openssl.org) now fail the handshake 
because they no longer support any of the protocols and ciphers included with 
that build. It is reaching the point where for some projects the system OpenSSL 
on OS X is no longer viable to use.

Here's a ticket for a Python project showing an example of this problem:

https://github.com/kivy/kivy-ios/issues/198

I have run into this issue myself on this and a couple other projects I am 
working on.

Would it be possible to have the fix for 10.5 builds get applied to all the 
Python OS X installers, perhaps for 3.6, and ideally also for 2.7 if there are 
plans to make a new release for that?

--
nosy: +Kevin Ollivier

___
Python tracker 

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



[issue26885] Add parsing support for more types in xmlrpc

2016-07-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your review Terry.

You can pass an integer in range from -2147483648 to 2147483647, and it is 
marshalled using the  tag. But when you receive tags , , etc, they 
are unmarshalled to integer values, and these values can be out of range from 
-2147483648 to 2147483647. How to document all these detail in short?

The same is with other types. xmlrpclib is more conservative with data that it 
sends than with data that it receives. float is marshalled using the  
flag, but the  tag is unmarshalled to float too. None and datetime can 
be marshalled only if corresponding option is enabled, but always can be 
unmarshalled. Decimal can't be marshalled, but can be unmarshalled.

For now unmarshalling None is supported from the  tag (this is unofficial 
extension). But Apache XML-RPC server produces tags with namespace: , 
which is not supported in xmplrpclib. The patch adds the support of tags with 
namespaces, and therefore adds the support of unmarshalling None in Apache 
XML-RPC server format.

--

___
Python tracker 

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



[issue27427] Add new math module tests

2016-07-01 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +mark.dickinson, rhettinger, stutzbach
title: Math tests -> Add new math module tests

___
Python tracker 

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



[issue27405] Ability to trace Tcl commands executed by Tkinter

2016-07-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You need to recompile the _tkinter module.

--

___
Python tracker 

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



[issue27173] Modern Unix key bindings for IDLE

2016-07-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

After committing the patch for this issue I'm going to refactor the code 
related to getting/setting theme/keys settings. For now it is too complicated, 
the logic is scattered between two files, some code is duplicated.

--

___
Python tracker 

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



[issue27405] Ability to trace Tcl commands executed by Tkinter

2016-07-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

In "debug = False+1', I presume the '+1' is just temporary.

The debug property and the clinic file refer to _tkinter.tkapp.get/settrace, 
which do not exist.  Did you just forget to include that part?  Or does 
'preliminary' mean 'do not test yet'?

>>> import tkinter
>>> tkinter.debug
1
>>> import idlelib.idle
Traceback (most recent call last):
  File "", line 1, in 
  File "F:\Python\dev\36\lib\idlelib\idle.py", line 11, in 
idlelib.pyshell.main()
  File "F:\Python\dev\36\lib\idlelib\pyshell.py", line 1553, in main
root = Tk(className="Idle")
  File "F:\Python\dev\36\lib\tkinter\__init__.py", line 2018, in __init__
self.debug = debug
  File "F:\Python\dev\36\lib\tkinter\__init__.py", line 2110, in debug
self.tk.settrace(trace)
AttributeError: '_tkinter.tkapp' object has no attribute 'settrace'

At least the error shows that the code works as far as written ;-).

I now understand 'larger customization ...' to mean supplying a trace function 
other than the default, to do something with 'cmd' other than just print it.  
For instance, one could record tcl commands in a file and later count the tcl 
function calls, much like python's trace does.  To do that, I believe you could 
just replace 'def trace ... with

if iscallable(value):
trace = value
else:
def trace ...

+1 on adding this.  The default trace would be useful for simple interaction, 
but less so for what I tried to do above, which is to trace a complete IDLE 
session.

--
assignee:  -> serhiy.storchaka
stage:  -> test needed

___
Python tracker 

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



[issue27213] Rework CALL_FUNCTION* opcodes

2016-07-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The ABI of BUILD_MAP_UNPACK_WITH_CALL is changed. oparg=514 meant merging 2 
dicts, but with the patch it will mean merging 514 dicts.

The INCREF/DECREF calls on function objects surrounding calls are not needed, 
because the refcount was increased when the function pushed on the stack. They 
were needed if use PyMethod optimization, since PyMethod_GET_FUNCTION() returns 
borrowed link.

Seems you have missed my comments on compile.c.

Added more comments on Rietveld.

What about CALL_FUNCTION_EX benchmarking? Did the optimization help?

--

___
Python tracker 

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



[issue23908] Check path arguments of os functions for null character

2016-07-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Zachary.

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



[issue23908] Check path arguments of os functions for null character

2016-07-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 30099abdb3a4 by Serhiy Storchaka in branch '2.7':
Issue #23908: os functions, open() and the io.FileIO constructor now reject
https://hg.python.org/cpython/rev/30099abdb3a4

--

___
Python tracker 

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



[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread Xiang Zhang

Xiang Zhang added the comment:

Oh, sorry. My focus seem to be on the wrong place. I thought David is arguing 
something about the constants are bitmasks or not. It's my fault. But actually 
the current code looks very clearly and I can tell from it that EVENT_* are 
bitmasks and KQ_FILTER_* are not. Also changing it is also OK and can avoid a 
bit calculation. Then no opinion on changing it or not.

--

___
Python tracker 

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



[issue27173] Modern Unix key bindings for IDLE

2016-07-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Seems to be working correctly now, so I will review the code in detail.  I will 
look into extracting a common get_theme_keys function and editing the long 
docstring currently attached to CurrentTheme.  I want to look at paired 
functions in configdialog, such as def VarChanged_builtinTheme/Keys to see if 
there are any unnecessary differences.

The hardest thing is adding tests.  Correct answers depend on the configuration 
vales, both default and user overrides.  See #24737 for the latter.

--
dependencies: +IDLE tests must be able to set user configuration values.
stage: patch review -> test needed

___
Python tracker 

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



[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread Demur Rumed

Demur Rumed added the comment:

Xiang: pause a moment to read the code being discussed. event before the |= is 
0. You're saying flag must READ xor WRITE xor neither. Then only one if can be 
taken. Therefore events |= EVENT_* will always happen with events == 0, 
therefore it can be events = EVENT_*

Further inspection of the code could move the flag/events calc into the 'if 
key' block

--
nosy: +Demur Rumed

___
Python tracker 

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



[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread David Beazley

David Beazley added the comment:

I don't see any possible way that you would ever get events = EVENT_READ | 
EVENT_WRITE if the flag is a single value (e.g., KQ_FILTER_READ) and the flag 
itself is not a bitmask.  Only one of those == tests will ever be True.  There 
is no need to use |=.   Unless I'm missing something.

--

___
Python tracker 

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



[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +neologix

___
Python tracker 

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



[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread Xiang Zhang

Xiang Zhang added the comment:

But EVENT_* are. If you use =, events can only be either EVENT_READ or 
EVENT_WRITE, not EVENT_READ & EVENT_WRITE. EVENT_* != KQ_FILTER_*.

--

___
Python tracker 

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



[issue27437] IDLE tests must be able to set user configuration values.

2016-07-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I don't believe that buildbots have an accessible $HOME that can be written to. 
 In any case, tests of writing user config files should use StringIOs.

--

___
Python tracker 

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



[issue27437] IDLE tests must be able to set user configuration values.

2016-07-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Being able to force a rereading of user files from the menu could also be 
useful for manual testing or after a user fixes a problem.

--

___
Python tracker 

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



[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread David Beazley

David Beazley added the comment:

If the KQ_FILTER constants aren't bitmasks, it seems that the code could be 
simplified to the last version then.  At the least, it would remove a few 
unnecessary calculations.Again, a very minor thing (I only stumbled onto it 
by accident really).

--

___
Python tracker 

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



[issue27437] IDLE tests must be able to set user configuration values.

2016-07-01 Thread Terry J. Reedy

New submission from Terry J. Reedy:

An important feature of IDLE is that it has default configuration values in 
idlelib/config-xyz.def files that can be overriden by user values in 
$HOME/.idlerc/config-xyz.cfg files. IDLE should run and tests should pass both 
without and with user overrides. IDLE's config module currently hard-codes the 
file names.  However, configparser can read from files it opens from a filename 
(.read), iterables of strings (.read_file), strings (.read_string), and 
dictionaries (.read_dict). This issue is about exposing this flexibility to 
IDLE tests and being able to clear and reset the user values for each test.

--
assignee: terry.reedy
messages: 269685
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE tests must be able to set user configuration values.
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



[issue20104] expose posix_spawn(p)

2016-07-01 Thread Danek Duvall

Danek Duvall added the comment:

Oh, for what it's worth, Solaris added setsid support to posix_spawn a few 
years ago, as a result of this conversation.  I still think it would be 
worthwhile supporting this in the stdlib, since we keep running into processes 
which have a lot of memory reserved and can't fork some small program because 
they're running in a memory-limited environment.

--

___
Python tracker 

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



[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread Xiang Zhang

Xiang Zhang added the comment:

EVENT_* and KQ_FILTER_* are two different sets of constants. EVENT_* represent 
event types of the abstract event and KQ_FILTER_* represent the kevent filter 
type. EVENT_* can be combined while kevent.filter can only get one type.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue27434] cross-building python 3.6 with an older interpreter fails

2016-07-01 Thread Xavier de Gaye

Xavier de Gaye added the comment:

With this patch, cross-building the 3.6 source with only python 3.5.1 on the 
PATH, produces the following configure error:

  checking for python interpreter for cross build... configure: error: 
python3.6 interpreter not found

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file43604/restrict_interp.patch

___
Python tracker 

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



[issue27337] 3.6.0a2 tarball has weird paths

2016-07-01 Thread Nick Timkovich

Nick Timkovich added the comment:

In pyenv this was "fixed" by pointing to the .tar.xz archive instead of the 
.tgz https://github.com/yyuu/pyenv/pull/652, maybe you could implement that for 
Pythonz?

--
nosy: +nicktimko -ned.deily, petere

___
Python tracker 

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



[issue27079] Bugs in curses.ascii predicates

2016-07-01 Thread Akira Li

Akira Li added the comment:

I'm not sure anything should be done (e.g., it is "undefined behavior" to pass 
a negative value such as CHAR_MIN (if *char* type is signed) to a character 
classification function in C. Though EOF value (-1 traditionally) should be 
handled).

If you want to explore it further; I've enumerated open questions in 2014 
(inconsistent TypeError, ord(c) > 0x100, negative ints handling, etc) 
http://bugs.python.org/issue9770#msg221008

--

___
Python tracker 

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



[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-01 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the patch, Steve! Since this is a bug fix I may take until after 
3.6b1 goes out to get reviewed and committed since I need to get any semantic 
changes in before then (b1 is due out in Sep). So if this patch lingers for a 
couple months, that will be why.

--

___
Python tracker 

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



[issue23908] Check path arguments of os functions for null character

2016-07-01 Thread Zachary Ware

Zachary Ware added the comment:

I get one test failure:

ERROR: test_u (__main__.Unicode_TestCase)
--
Traceback (most recent call last):
  File "P:\ath\to\cpython\lib\test\test_getargs2.py", line 782, in test_u
self.assertEqual(getargs_u(u'nul:\0'), u'nul:')
TypeError: argument 1 must be unicode without null characters, not unicode

All other tests appear to pass.

--

___
Python tracker 

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



[issue27436] Strange code in selectors.KqueueSelector

2016-07-01 Thread David Beazley

New submission from David Beazley:

Not so much a bug, but an observation based on reviewing the implementation of 
the selectors.KqueueSelector class.  In that class there is the select() method:

def select(self, timeout=None):
timeout = None if timeout is None else max(timeout, 0)
max_ev = len(self._fd_to_key)
ready = []
try:
kev_list = self._kqueue.control(None, max_ev, timeout)
except InterruptedError:
return ready
for kev in kev_list:
fd = kev.ident
flag = kev.filter
events = 0
if flag == select.KQ_FILTER_READ:
events |= EVENT_READ
if flag == select.KQ_FILTER_WRITE:
events |= EVENT_WRITE

key = self._key_from_fd(fd)
if key:
ready.append((key, events & key.events))
return ready

The for-loop looks like it might be checking flags against some kind of 
bit-mask in order to build events.  However, if so, the code just looks wrong.  
Wouldn't it use the '&' operator (or some variant) instead of '==' like this?

for kev in kev_list:
fd = kev.ident
flag = kev.filter
events = 0
if flag & select.KQ_FILTER_READ:
events |= EVENT_READ
if flag & select.KQ_FILTER_WRITE:
events |= EVENT_WRITE

If it's not a bit-mask, then wouldn't the code be simplified by something like 
this?

for kev in kev_list:
fd = kev.ident
flag = kev.filter
if flag == select.KQ_FILTER_READ:
events = EVENT_READ
elif flag == select.KQ_FILTER_WRITE:
events = EVENT_WRITE


Again, not sure if this is a bug or not. It's just something that looks weirdly 
off.

--
components: Library (Lib)
messages: 269676
nosy: dabeaz
priority: normal
severity: normal
status: open
title: Strange code in selectors.KqueueSelector
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



[issue22724] byte-compile fails for cross-builds

2016-07-01 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Adding -E to PYTHON_FOR_BUILD fixes the x86_64 install because in my Android 
cross-build setup, the native interpreter is built from the same source tree as 
the cross-build. However, currently the interpreter used for the cross-build 
may be any interpreter found in PATH and can import an incorrect 
importlib.util.MAGIC_NUMBER if PYTHONPATH is not set properly. So this new 
patch does not use -E and splits PYTHON_FOR_BUILD into two variables, 
PY_BUILD_ENVIRON that sets the environment variables and PYTHON_FOR_BUILD, the 
interpreter. PY_BUILD_ENVIRON is not used when running compileall.

Tested by running the test suite on the Android i686 and x86_64 emulators 
(excluding test_ctypes that segfaults python on x86_64). The tests cannot be 
run with a cross-build where PYTHON_FOR_BUILD is python 3.5.1 because of issue 
27434.

--
Added file: http://bugs.python.org/file43603/py_build_environ.patch

___
Python tracker 

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



[issue26765] Factor out common bytes and bytearray implementation

2016-07-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b0087e17cd5e by Serhiy Storchaka in branch 'default':
Issue #26765: Moved wrappers for bytes and bytearray methods to common header
https://hg.python.org/cpython/rev/b0087e17cd5e

--

___
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-01 Thread aixtools

New submission from aixtools:

I am opening a new issue # - about the same problem described in 26439, but now 
calling it a bug
rather than a behavior change. Then I did not know better - all was new, and as 
the "new" kid
I felt uncomfortable calling it a bug - when maybe it was just behavior I did 
not understand

However, with the feedback from code review I am beginning to understand what 
the ctypes functionality
is: ctypes.find_library() and cdll.LoadLibrary (aka CDLL)

in __init__.py it is clear that there is one entry point for LoadLibrary. For 
find_library(),
I assume overtime, the development led to six (6) definitions - and I am 
proposing a 7th.

The pseudo_code is roughly this (although import ctypes._$_platform._xxx may be 
incorrect syntax)
def find_library(name)
import os,sys
_platform = sys.platform
import ctypes._$_platform._find_library as _find_library
return(_find_library(name))

Unclear is how a regular .so file should be treated by find_library() when the 
actual file is not
prefixed by the string "lib", e.g., sudoers.so - should it only look for 
libsudoers.so even though

Currently it is "defined" 7 times (including the definition I added at line 79)
because - again - util.py defines find_library several times - only one of the 
definitions is called
dependent on the os.name or os.name + platform.

Within the os.name() and sys.platform code block there are sufficient 
"liberities" to call
external programs used to determine where (i.e., find) the library is - and 
what it's correct
prefix and suffix is.


+6  # find_library(name) returns the pathname of a library, or None.
   +49  def find_library(name): in block if os.name == "nt"
   +71  def find_library(name): if os.name == "ce" return None
   +79  def find_library(name): if sys.platform.startswith("aix") return 
ctypes._aixutils.find_library(name)
   +84  def find_library(name): elif os.name == "posix" and sys.platform == 
"darwin":
   +95  elif os.name == "posix":
  +177  def find_library(name): inside: if 
(sys.platform.startswith("freebsd")
or sys.platform.startswith("openbsd")
or sys.platform.startswith("dragonfly")):

  +217  def find_library(name, is64 = False): inside:elif 
sys.platform == "sunos5":

  +220  else:
  +249  def find_library(name):
  +250  return _findSoname_ldconfig(name) or 
_get_soname(_findLib_gcc(name))

++
Getting back to my patch development - initially I was adding code to both 
util.py and __init__.py
and putting everything in " startswith("aix")" blocks. 
As I thought, in error, find_library() was to make visible what CDLL was 
finding on it's own
I was also doing find_library() like behavior. Rather than have the same code 
in two files
I moved the code into a new file - now named _aixutils.py.

So, this looks like a design change, but it is not. All this code could be 
re-indented and inserted
into util.py. IMHO, in a separate file the changes are easier to follow.
If a seperate file means it cannot be accepted into python-2.7.X then the code 
needs to be moved back into
util.py

Note: the extra tests added to util.py are only for my enjoyment, i.e., 
verification of several cases I have
experienced while porting other packages. Think of them as not being there (for 
now, if not for always).

Once I knew what CDLL(None) was suppossed to 
That is why my first patch had CDLL() also calling ctypes._aixutils - to only 
edit once.
Once I learned how wrong I was - that was removed - and it just remained this 
way as "eye-candy".

+++ Closing +++

find_library() is defined multiple times, so adding one for aix is not a design 
change,
i.e., behavior modification rather, find_library - as defined for aix in 
"default block"
(elif os.name = "posix": ... else: ...) specifically calling
_findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name)) is a "bug of 
ommission"
because the programs the two routines called depend on: ldconfig and gcc are 
not, normally
present on AIX.
My patch is a different way changing line 250 from
return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))
to
return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))
or _findAIXmember(name) or _find_Soname_dump(name)

with, of course def _findAIXmember() and def _findSoname_dump() defined within 
the limits of util.py
 Instead, I have "hard-coded" an approach similar to the psuedo code example.


+++ Disclaimer :P +++
As I am still relatively new, if I am still not understanding the official 
definition of ctypes.find_library() - I apologize.
util.py is, due to is many defines of find_library() was difficult
for me to grasp the difference between permissible and "not done".

Going back to the earliest documentation I could find for ctypes 
https://docs.python.org/2.6/library/ctypes.html (new in 2.5) the key lines are:

ctypes exports the cdll, and on Windows windll and oledll objects, for 

[issue27007] Alternate constructors bytes.fromhex() and bytearray.fromhex() return an instance of base type

2016-07-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue27007] Alternate constructors bytes.fromhex() and bytearray.fromhex() return an instance of base type

2016-07-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 62375fd21de8 by Serhiy Storchaka in branch 'default':
Issue #27007: The fromhex() class methods of bytes and bytearray subclasses
https://hg.python.org/cpython/rev/62375fd21de8

--
nosy: +python-dev

___
Python tracker 

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



[issue27434] cross-building python 3.6 with an older interpreter fails

2016-07-01 Thread Matthias Klose

Matthias Klose added the comment:

yes, I think we have to limit the choice of the interpreter for the build to 
the same major version.

--

___
Python tracker 

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



[issue27007] Alternate constructors bytes.fromhex() and bytearray.fromhex() return an instance of base type

2016-07-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue20770] Inform caller of smtplib STARTTLS failures

2016-07-01 Thread R. David Murray

Changes by R. David Murray :


--
stage:  -> resolved

___
Python tracker 

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



[issue27424] Failures in test.test_logging

2016-07-01 Thread R. David Murray

R. David Murray added the comment:

Domain names should never have non-ascii in them.  They should be IDNA encoded. 
 There is a known problem where Windows will return non-ascii domain names if 
the local hostname is configured naively (see issue 9377).  SMTPUTF8 might be a 
workaround in smtpd's case, since I think it will allow handling of such domain 
names, but that could actually be considered an RFC violation in smtpd if it 
works :)

That said, looking at the traceback I'm not convinced that's the problem.  The 
test using support.HOST, and that is 127.0.0.1.

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



[issue27213] Rework CALL_FUNCTION* opcodes

2016-07-01 Thread Demur Rumed

Demur Rumed added the comment:

callfunc3 addresses most feedback. Doesn't address _PyEval_EvalCodeWithName2 
code bloat, & I disagree with mentioning BUILD_MAP_UNPACK_WITH_CALL change in 
magic number update as the ABI of BUILD_MAP_UNPACK_WITH_CALL is unchanged. ie 
if we were to implement #27358 after this there would be no need to bump the 
magic number

One thing which looks odd to me is the INCREF/DECREF calls on function objects 
surrounding calls. Especially odd is CALL_FUNCTION_EX where we finish with two 
calls to Py_DECREF(func). It shows up in IMPORT_NAME too

--
Added file: http://bugs.python.org/file43602/callfunc3.patch

___
Python tracker 

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



[issue27432] Unittest truncating of error message not works

2016-07-01 Thread R. David Murray

R. David Murray added the comment:

This is by design.  The short option was introduced to use in specific asserts 
(assertDictEqual and assertMultilineEqual; see 8b8701551253).  These were later 
enhanced to do an even better job of abbreviating the output usefully, but the 
short option on safe_repr was not removed even though it is no longer used, for 
backward compatibility reasons.

If you would like for there to be a way to toggle safe_repr's default, that 
would be a new feature request, and seems like a reasononable feature to me.  
The new feature should incorporate a way to set _MAX_LENGTH as well.

--
nosy: +r.david.murray
type: behavior -> 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



[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-07-01 Thread Wei-Cheng Pan

Wei-Cheng Pan added the comment:

> The patch needs tests and documentation.

Ok, I'll update it later.

>> +parser.add_argument('--no-ensure-ascii', action='store_true', 
>> default=False,
>I'd go with ``action='store_false', default=True``.

If I'm not misreading your comment, this will change the original behavior, 
right? (because options.no_ensure_ascii will be set to True by default)

--

___
Python tracker 

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



[issue27434] cross-building python 3.6 with an older interpreter fails

2016-07-01 Thread Xavier de Gaye

New submission from Xavier de Gaye:

Cross-building the 3.6 source with PYTHON_FOR_BUILD using archlinux python 
3.5.1 as found in PATH, fails with:

_PYTHON_PROJECT_BASE=/home/xavier/src/android/pyona/build/python3.6-android-21-x86
 _PYTHON_HOST_PLATFORM=linux-x86 
PYTHONPATH=/home/xavier/src/packages/android/cpython/Lib:/home/xavier/src/packages/android/cpython/Lib/plat-i386-linux-gnu
 python3 -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Could not import runpy module
Traceback (most recent call last):
  File "/home/xavier/src/packages/android/cpython/Lib/runpy.py", line 15, in 

import importlib.util
  File "/home/xavier/src/packages/android/cpython/Lib/importlib/util.py", line 
25
raise ValueError(f'no package specified for {repr(name)} '
 ^
SyntaxError: invalid syntax
generate-posix-vars failed


The reason is that the syntax of formatted string literals is unknown to python 
3.5.

--
components: Cross-Build
messages: 269666
nosy: Alex.Willmer, doko, xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: cross-building python 3.6 with an older interpreter fails
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-07-01 Thread Thomas Heller

Changes by Thomas Heller :


--
nosy: +theller

___
Python tracker 

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



[issue27417] Call CoInitializeEx on startup

2016-07-01 Thread Thomas Heller

Changes by Thomas Heller :


--
nosy: +theller

___
Python tracker 

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



[issue26110] Speedup method calls 1.2x

2016-07-01 Thread INADA Naoki

INADA Naoki added the comment:

Oops, previous patch doesn't update magic number in PC/launcher.c
Should I update it?  Or don't touch it to avoid additional conflicts?

--
Added file: http://bugs.python.org/file43601/call_method_3.patch

___
Python tracker 

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



[issue27425] Tests fail because of git's newline preferences on Windows

2016-07-01 Thread R. David Murray

R. David Murray added the comment:

Yes .gitattributes looks like the correct solution.  The problem is that most 
of the text files we *want* git to transform per platform, it's just a few that 
we don't.  Mercurial actually added support for this for us when we switched to 
it.

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



[issue26984] int() can return not exact int instance

2016-07-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Proposed patch makes int() always returning exact int.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file43600/int_exact.patch

___
Python tracker 

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



[issue26110] Speedup method calls 1.2x

2016-07-01 Thread INADA Naoki

INADA Naoki added the comment:

Updated, based on 102241:908b801f8a62

--
nosy: +naoki
Added file: http://bugs.python.org/file43599/call_method_2.patch

___
Python tracker 

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



[issue26664] Misuse of $ in activate.fish of venv

2016-07-01 Thread László Károlyi

László Károlyi added the comment:

+1 here, broken on homebrew cpython > 3.5.1 (a.k.a. 3.5.2)

--
nosy: +karolyi

___
Python tracker 

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699)

2016-07-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee: serhiy.storchaka -> georg.brandl

___
Python tracker 

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699)

2016-07-01 Thread koobs

Changes by koobs :


--
versions: +Python 3.3

___
Python tracker 

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699)

2016-07-01 Thread koobs

koobs added the comment:

3.3 is supported for security related fixes until September 2017 [1], but only 
3.4, 3.5 and 2.7 have received the backport, reopen for outstanding merge

[1] https://docs.python.org/devguide/#status-of-python-branches

Update summary to reflect the RedHat CVE that was assigned to this issue.

--
keywords: +security_issue
nosy: +koobs
resolution: fixed -> 
status: closed -> open
title: HTTP header injection in urrlib2/urllib/httplib/http.client -> HTTP 
header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699)

___
Python tracker 

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



[issue20770] Inform caller of smtplib STARTTLS failures

2016-07-01 Thread And Clover

And Clover added the comment:

This is CVE-2016-0772 and appears to have been fixed properly with an exception 
here:

https://hg.python.org/cpython/rev/d590114c2394 (py3)
https://hg.python.org/cpython/rev/b3ce713fb9be (py2)

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



[issue27424] Failures in test.test_logging

2016-07-01 Thread INADA Naoki

INADA Naoki added the comment:

Maybe, `socket.getfqdn()` returns non-ASCII string in your environment.
smtpd.py has `-u` option which enables utf-8 support.

smtpd.SMTPServer has enable_SMTPUTF8 option.
test_logging.TestSMTPServer should enable this option.

Could you test adding `enable_SMTPUTF8=True` kwarg here?
https://github.com/python/cpython/blob/master/Lib/test/test_logging.py#L682-L683

--
nosy: +naoki

___
Python tracker 

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



[issue27433] Missing "as err" in Lib/socket.py

2016-07-01 Thread Berker Peksag

Berker Peksag added the comment:

This is a duplicate of issue 26384.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> UnboundLocalError in socket._sendfile_use_sendfile
type:  -> behavior

___
Python tracker 

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



[issue27433] Missing "as err" in Lib/socket.py

2016-07-01 Thread Tobias Burnus (PDF)

New submission from Tobias Burnus (PDF):

Cf. https://hg.python.org/cpython/file/tip/Lib/socket.py#l261

In _sendfile_use_sendfile, one has:

try:
fsize = os.fstat(fileno).st_size
except OSError:
raise _GiveupOnSendfile(err)  # not a regular file

I think the "err" in the last line will only work if there is an "as err" in 
the "except" line.

--
components: Library (Lib)
messages: 269656
nosy: Tobias Burnus (PDF)
priority: normal
severity: normal
status: open
title: Missing "as err" in Lib/socket.py
versions: Python 3.5

___
Python tracker 

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



[issue27429] xml.sax.saxutils.escape doesn't escape multiple characters safely

2016-07-01 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue27431] Shelve pickle version error

2016-07-01 Thread Berker Peksag

Berker Peksag added the comment:

Good catch, thanks for the report! 3.2, 3.3 and 3.4 are now in 
security-fix-only so their docs won't be updated.

--
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type: enhancement -> behavior
versions:  -Python 3.2, 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



[issue27431] Shelve pickle version error

2016-07-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b2c3837f7833 by Berker Peksag in branch '3.5':
Issue #27431: Update default protocol version in shelve.Shelf() documentation
https://hg.python.org/cpython/rev/b2c3837f7833

New changeset 908b801f8a62 by Berker Peksag in branch 'default':
Issue #27431: Merge from 3.5
https://hg.python.org/cpython/rev/908b801f8a62

--
nosy: +python-dev

___
Python tracker 

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



[issue27432] Unittest truncating of error message not works

2016-07-01 Thread Camilla Ke

New submission from Camilla Ke:

Builtin assert methods output messages no matter how length is the output 
messages.

However, content with exceeding length should be truncated.  

I found an error in the function.

The function is safe_repr() in util.py

if len(result) > _MAX_LENGTH, it should return truncated content, but "short" 
is default to False. 

unittest/util.py
def safe_repr(obj, short=False):
try:
result = repr(obj)
except Exception:
result = object.__repr__(obj)
if not short or len(result) < _MAX_LENGTH:
return result
return result[:_MAX_LENGTH] + ' [truncated]...'

--
components: Library (Lib)
messages: 269653
nosy: Camilla Ke
priority: normal
severity: normal
status: open
title: Unittest truncating of error message not works
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue27431] Shelve pickle version error

2016-07-01 Thread Sander Steffann

New submission from Sander Steffann:

The "class shelve.Shelf(dict, protocol=None, writeback=False, 
keyencoding='utf-8')" section still says "By default, version 0 pickles are 
used to serialize values.". This is incorrect. The default version has been 3 
since this commit: 

https://hg.python.org/cpython/file/f351fb7ea179/Lib/shelve.py

--
assignee: docs@python
components: Documentation
messages: 269652
nosy: Sander Steffann, docs@python
priority: normal
severity: normal
status: open
title: Shelve pickle version error
type: enhancement
versions: 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



[issue27430] Spelling fixes

2016-07-01 Thread Roundup Robot

New submission from Roundup Robot:

New changeset ab6129af2a5c by Berker Peksag in branch '3.5':
Issue #27430: Fix typos, patch by scop.
https://hg.python.org/cpython/rev/ab6129af2a5c

New changeset 97b22fe37af1 by Berker Peksag in branch 'default':
Issue #27430: Merge from 3.5
https://hg.python.org/cpython/rev/97b22fe37af1

--
nosy: +python-dev

___
Python tracker 

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



[issue27430] Spelling fixes

2016-07-01 Thread Berker Peksag

Berker Peksag added the comment:

Thanks.

--
nosy: +berker.peksag
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type: enhancement -> behavior

___
Python tracker 

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



[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-01 Thread Steve Piercy

Steve Piercy added the comment:

Patch attached for review.

Notes:
- I built the docs using Sphinx 1.4.1, whereas I think 1.3.3 is in use in 
production. If you upgrade, you will need to specify the language for syntax 
highlighting, else you will get hundreds of these error messages:

  /Users/stevepiercy/projects/cpython/Doc/distutils/examples.rst:250: WARNING: 
Could not lex literal_block as "python3". Highlighting skipped.

  I made my changes accordingly, as they are backward compatible to Sphinx 
1.3.3 and will be one fewer thing to update in future releases.
- I removed the file Doc/using/scripts.rst because it became obsolete. This 
caused warnings in Doc/whatsnew/3.3.rst and Doc/whatsnew/3.4.rst which 
reference the obsolete file.
- I updated a lot of links to https://packaging.python.org/ and others to save 
a redirect and to get link checking to pass.
- I replaced confusing colloquialisms of "env", "venv", and "virtualenv" with 
"virtual environment" as appropriate. This clarifies that a virtual environment 
is the thing created, whereas `venv`, `pyvenv`, and `virtualenv` are 
modules/scripts/commands that create a virtual environment, or that "env" is 
the name of a directory.
- Minor grammar, punctuation, and reST fixes.

--
hgrepos: +346
keywords: +patch
Added file: http://bugs.python.org/file43598/pyvenv-to-venv.patch

___
Python tracker 

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



[issue27430] Spelling fixes

2016-07-01 Thread SilentGhost

Changes by SilentGhost :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
stage:  -> patch review
versions: +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



[issue27430] Spelling fixes

2016-07-01 Thread Ville Skyttä

Changes by Ville Skyttä :


--
files: spelling.patch
keywords: patch
nosy: scop
priority: normal
severity: normal
status: open
title: Spelling fixes
type: enhancement
Added file: http://bugs.python.org/file43597/spelling.patch

___
Python tracker 

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



[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-07-01 Thread Berker Peksag

Berker Peksag added the comment:

The patch needs tests and documentation.

> +parser.add_argument('--no-ensure-ascii', action='store_true', 
> default=False,

I'd go with ``action='store_false', default=True``.

--
nosy: +berker.peksag
stage:  -> patch review

___
Python tracker 

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



[issue23908] Check path arguments of os functions for null character

2016-07-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping. Can anybody please test the patch on Windows?

--

___
Python tracker 

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



[issue18726] json functions have too many positional parameters

2016-07-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
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