[issue14061] Misc fixes and cleanups in archiving code in shutil and test_shutil

2016-06-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
versions:  -Python 3.4
Added file: http://bugs.python.org/file43517/shutil_make_archive_misc_2.patch

___
Python tracker 

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



[issue27371] Runaway memory consumption using update()

2016-06-23 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +gpolo, serhiy.storchaka

___
Python tracker 

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



[issue27373] logging.handlers.SysLogHandler with TCP not working on rsyslog5.8

2016-06-23 Thread 吴冉波

New submission from 吴冉波:

logging.handlers.SysLogHandler with TCP not working on rsyslog5.8, but newer 
version rsyslog8.19 is fine.

I use SysLogHandler with TCP to send message to remote rsyslog server failed, 
but success with bash below: 

echo "<133>$0[$$]: Test syslog message from Netcat" | nc -w1 -t 192.168.1.23 514

this is my script: 
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import logging.handlers
import socket
import syslog

my_logger = logging.getLogger('MyLogger')  # logger is singleton
my_logger.setLevel(logging.DEBUG)

if __name__ == '__main__':

handler = logging.handlers.SysLogHandler(address=('192.168.1.23', 514), 
facility="auth", socktype=socket.SOCK_STREAM)
my_logger.addHandler(handler)
my_logger.critical('this is critical')

handler.flush()
handler.close()
my_logger.removeHandler(handler)

CentOS version is 6.6
Python version is 2.7.10

This is easy to repeat on my serval CentOS Server. And I attach tcpdump result 
of script and bash.

--
components: Library (Lib)
files: fail.log
messages: 269112
nosy: vinay.sajip, 吴冉波
priority: normal
severity: normal
status: open
title: logging.handlers.SysLogHandler with TCP not working on rsyslog5.8
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file43518/fail.log

___
Python tracker 

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



[issue14354] Crash in _ctypes_alloc_callback

2016-06-23 Thread Berker Peksag

Changes by Berker Peksag :


--
components: +ctypes -Benchmarks
stage:  -> resolved
superseder:  -> ctypes: unions as arguments

___
Python tracker 

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



[issue27363] Complex with negative zero imaginary part

2016-06-23 Thread R. David Murray

R. David Murray added the comment:

Breaking the repr invariant would be bad.  Agree with rejection.

--
nosy: +r.david.murray
resolution:  -> rejected
stage:  -> 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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-23 Thread R. David Murray

R. David Murray added the comment:

Have you searched the python-dev and python-ideas archives for the previous 
discussions of this issue?  I don't remember for sure, but I think Guido might 
have made a ruling (not that the discussion couldn't be reopened if he has, 
but, well...)

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



[issue27033] Change the decode_data default in smtpd to False

2016-06-23 Thread R. David Murray

R. David Murray added the comment:

Yes.  Thanks, Serhiy.

--
resolution:  -> fixed
stage: commit 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



[issue27374] Cygwin: Makefile does not install DLL import library

2016-06-23 Thread Erik Bray

New submission from Erik Bray:

When building Python on Cygwin, both a libpython-X.Y.dll and a
libpython-X.Y.dll.a are created (see https://cygwin.com/cygwin-ug-net/dll.html).

The latter is an "import library"
consisting of stubs for functions in the DLL so that it can be linked
to statically when building, for example, extension modules.

The odd bit is that in the altbininstall target if the
$(DLLLIBRARY) variable (which references the .dll itself) is defined then only 
it is installed, while $(LDLIBRARY) (which in this cases references the .dll.a 
import library) is *not* installed, except in $(prefix)/lib/pythonX.Y/config, 
which is not normally on the linker search path, or even included by
python-config --ldflags.

Therefore static linking to libpython fails, unless the search path is 
explicitly modified, or a symlink is created from 
$(prefix)/lib/pythonX.Y/config/libpython.dll.a to $(prefix)/lib.  In fact the 
Makefile already does the latter, again not if $(DLLLIBRARY) is defined.

In fact Cygwin's own package for Python manually creates the latter symlink in 
its install script.  But I would consider it a bug in Python's Makefile that it 
doesn't handle this.

I first asked on Python-dev about this back in April but got no reply 
(understandably) probably due to the lack of core devs who can comment on 
Cygwin :)

--
components: Installation
files: cygwin-ldlibrary.patch
keywords: patch
messages: 269116
nosy: erik.bray
priority: normal
severity: normal
status: open
title: Cygwin: Makefile does not install DLL import library
type: behavior
Added file: http://bugs.python.org/file43519/cygwin-ldlibrary.patch

___
Python tracker 

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



[issue27344] zipfile *does* support utf-8 filenames

2016-06-23 Thread R. David Murray

R. David Murray added the comment:

OK, what do you propose as a documentation change?  The current doc is 
accurate, but incomplete.  New phrasing could include something about the two 
de-facto standards but that one can not be sure that filenames will be in one 
of those two encodings.  Issue 10614 addresses the fact that the zipfile module 
doesn't make it easy to specify the encoding of filenames when creating an 
archive, IIUC, which also still needs to be addressed in any documentation 
change.

--

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-23 Thread Emanuel Barry

Emanuel Barry added the comment:

Now I have! I found nothing on Python-Dev, but apparently it's been discussed 
on Python-ideas before: 
https://mail.python.org/pipermail/python-ideas/2015-August/035031.html Guido 
hasn't participated in that discussion, and most of it was "This will break 
people's code", with people both for and against the idea, without an apparent 
consensus.

Should I try a second round on Python-ideas, to try and get a consensus (or a 
BDFL ruling)?

--

___
Python tracker 

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



[issue27373] logging.handlers.SysLogHandler with TCP not working on rsyslog5.8

2016-06-23 Thread Vinay Sajip

Vinay Sajip added the comment:

If it works fine with rsyslog 8.19 but fails with rsyslog 5.8, what exactly is 
logging doing wrong? How is rsyslog configured in the two cases? How exactly 
was the fail.log generated (I know you said tcpdump was used, but can you 
provide more detail)?

I'm not sure I'll be able to reproduce this, so you may need to identify what 
you think logging is doing wrong (there have been no changes in SysLogHandler 
for quite a while, AFAIK).

--

___
Python tracker 

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



[issue27344] zipfile *does* support utf-8 filenames

2016-06-23 Thread Daniel Holth

Daniel Holth added the comment:

The current documentation says "Note There is no official file name encoding 
for ZIP files. If you have unicode file names, you must convert them to byte 
strings in your desired encoding before passing them to write(). WinZip 
interprets all file names as encoded in CP437, also known as DOS Latin."

This is bad advice because if you convert the filenames to bytes before passing 
them to zipfile, it won't remember that they should be unicode. Instead it 
should say

"The ZIP file format supports Unicode filenames. If you have unicode filenames, 
zipfile will encode them to and from utf-8 internally. If you pass bytes 
filenames to write() then they will be stored without a specified encoding."

I am not sure what current versions of WinZip or Windows file manager do.

--

___
Python tracker 

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



[issue27344] zipfile *does* support utf-8 filenames

2016-06-23 Thread Daniel Holth

Daniel Holth added the comment:

" ... zipfile will encode them to and from utf-8 internally, and the encoding 
is marked in a standard flag inside the archive member."

--

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-23 Thread Antti Haapala

Antti Haapala added the comment:

it is handy to be able to use `\w` and `\d` in non-raw-string *regular 
expressions*, without too much backslashitis. Seems to be in use in Python 
standard library as well, for example in csv.py

--
nosy: +ztane

___
Python tracker 

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



[issue27344] zipfile *does* support utf-8 filenames

2016-06-23 Thread Daniel Holth

Daniel Holth added the comment:

The documentation should read

The ZIP file format supports Unicode filenames. If you have unicode filenames, 
zipfile will encode them to and from utf-8 internally, but if you pass bytes 
filenames to write() then they will be stored without a specified encoding.

Even though the format itself supports Unicode, historically Windows' built-in 
ZIP utility has interpreted all ZIP filenames as CP437 also known as DOS Latin. 
There is a fix from Microsoft for Windows 7 available here: 
https://support.microsoft.com/en-us/kb/2704299

--

___
Python tracker 

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



[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread raphi rose

New submission from raphi rose:

I am using ubuntu 14.04, and I am trying to install a newer version of python, 
instead of 2.7.6 I'm trying to use 3.5.1. to do this I downloaded the tar.xz 
file, extracted it to a directory in my computer (not the /usr/local/bin/). I 
then went into the terminal and changed to the directory it was in, used 
$./configure, $make, $make test, and in the test it came up with an error, i 
then did $make testall, same error, finally i used $./python -m test -v 
test_nntplib, and it came up with this:
== CPython 3.5.1 (default, Jun 23 2016, 10:51:23) [GCC 4.8.4]
==   Linux-3.13.0-88-generic-x86_64-with-debian-jessie-sid little-endian
==   hash algorithm: siphash24 64bit
==   /home/rrose/temp/Python-3.5.1/build/test_python_18970
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_nntplib
test_caps_only_after_login (test.test_nntplib.CapsAfterLoginNNTPv2Tests) ... ok
test_decode_header (test.test_nntplib.MiscTests) ... ok
test_parse_datetime (test.test_nntplib.MiscTests) ... ok
test_parse_overview (test.test_nntplib.MiscTests) ... ok
test_parse_overview_fmt (test.test_nntplib.MiscTests) ... ok
test_ssl_support (test.test_nntplib.MiscTests) ... skipped 'requires SSL 
support'
test_unparse_datetime (test.test_nntplib.MiscTests) ... ok
test_unparse_datetime_legacy (test.test_nntplib.MiscTests) ... ok
test_bad_capabilities (test.test_nntplib.MockSocketTests) ... ok
test_bad_welcome (test.test_nntplib.MockSocketTests) ... ok
test_login_aborted (test.test_nntplib.MockSocketTests) ... ok
test_service_permanently_unavailable (test.test_nntplib.MockSocketTests) ... ok
test_service_temporarily_unavailable (test.test_nntplib.MockSocketTests) ... ok
test_bad_capabilities (test.test_nntplib.MockSslTests) ... skipped 'requires 
SSL support'
test_bad_welcome (test.test_nntplib.MockSslTests) ... skipped 'requires SSL 
support'
test_login_aborted (test.test_nntplib.MockSslTests) ... skipped 'requires SSL 
support'
test_service_permanently_unavailable (test.test_nntplib.MockSslTests) ... 
skipped 'requires SSL support'
test_service_temporarily_unavailable (test.test_nntplib.MockSslTests) ... 
skipped 'requires SSL support'
test_article (test.test_nntplib.NNTPv1Tests) ... ok
test_article_file (test.test_nntplib.NNTPv1Tests) ... ok
test_authinfo (test.test_nntplib.NNTPv1Tests) ... ok
test_body (test.test_nntplib.NNTPv1Tests) ... ok
test_body_file (test.test_nntplib.NNTPv1Tests) ... ok
test_caps (test.test_nntplib.NNTPv1Tests) ... ok
test_date (test.test_nntplib.NNTPv1Tests) ... ok
test_description (test.test_nntplib.NNTPv1Tests) ... ok
test_descriptions (test.test_nntplib.NNTPv1Tests) ... ok
test_group (test.test_nntplib.NNTPv1Tests) ... ok
test_head (test.test_nntplib.NNTPv1Tests) ... ok
test_head_file (test.test_nntplib.NNTPv1Tests) ... ok
test_help (test.test_nntplib.NNTPv1Tests) ... ok
test_ihave (test.test_nntplib.NNTPv1Tests) ... ok
test_last (test.test_nntplib.NNTPv1Tests) ... ok
test_list (test.test_nntplib.NNTPv1Tests) ... ok
test_newnews (test.test_nntplib.NNTPv1Tests) ... ok
test_next (test.test_nntplib.NNTPv1Tests) ... ok
test_over (test.test_nntplib.NNTPv1Tests) ... ok
test_post (test.test_nntplib.NNTPv1Tests) ... ok
test_quit (test.test_nntplib.NNTPv1Tests) ... ok
test_stat (test.test_nntplib.NNTPv1Tests) ... ok
test_too_long_lines (test.test_nntplib.NNTPv1Tests) ... ok
test_welcome (test.test_nntplib.NNTPv1Tests) ... ok
test_xover (test.test_nntplib.NNTPv1Tests) ... ok
test_article (test.test_nntplib.NNTPv2Tests) ... ok
test_article_file (test.test_nntplib.NNTPv2Tests) ... ok
test_authinfo (test.test_nntplib.NNTPv2Tests) ... ok
test_body (test.test_nntplib.NNTPv2Tests) ... ok
test_body_file (test.test_nntplib.NNTPv2Tests) ... ok
test_caps (test.test_nntplib.NNTPv2Tests) ... ok
test_date (test.test_nntplib.NNTPv2Tests) ... ok
test_description (test.test_nntplib.NNTPv2Tests) ... ok
test_descriptions (test.test_nntplib.NNTPv2Tests) ... ok
test_group (test.test_nntplib.NNTPv2Tests) ... ok
test_head (test.test_nntplib.NNTPv2Tests) ... ok
test_head_file (test.test_nntplib.NNTPv2Tests) ... ok
test_help (test.test_nntplib.NNTPv2Tests) ... ok
test_ihave (test.test_nntplib.NNTPv2Tests) ... ok
test_last (test.test_nntplib.NNTPv2Tests) ... ok
test_list (test.test_nntplib.NNTPv2Tests) ... ok
test_newnews (test.test_nntplib.NNTPv2Tests) ... ok
test_next (test.test_nntplib.NNTPv2Tests) ... ok
test_over (test.test_nntplib.NNTPv2Tests) ... ok
test_post (test.test_nntplib.NNTPv2Tests) ... ok
test_quit (test.test_nntplib.NNTPv2Tests) ... ok
test_stat (test.test_nntplib.NNTPv2Tests) ... ok
test_too_long_lines (test.test_nntplib.NNTPv2Tests) ... ok
test_welcome (test.test_nntplib.NNTPv2Tests) ... ok
test_xover (test.test_nntplib.NNTPv2Tests) ... ok
skipped "Use of the 'network' resource not enabled"
test_module_all_attribute (t

[issue27350] Compact and ordered dict

2016-06-23 Thread INADA Naoki

Changes by INADA Naoki :


Added file: http://bugs.python.org/file43520/compact-dict.patch

___
Python tracker 

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



[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread raphi rose

Changes by raphi rose :


--
components:  -Tests

___
Python tracker 

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



[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread Stefan Krah

Stefan Krah added the comment:

You need to install at least these development libraries:

sudo apt-get install libssl-dev liblzma-dev libbz2-dev libreadline-dev 
libgdbm-dev libffi-dev


Possibly some are missing in this list, tkinter and zip for example.
Use "apt-cache search tkinter" to figure out the name of the library,
always use the "dev" versions.

--
nosy: +skrah

___
Python tracker 

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



[issue20842] pkgutil docs should reference glossary terms not PEP 302

2016-06-23 Thread Jaysinh shukla

Jaysinh shukla added the comment:

Submitting the patch for this issue. I observed the last message of respected 
Kushal but because the message was posted too earlier decided to submit patch. 
Thanks!

--
keywords: +patch
nosy: +jaysinh.shukla
Added file: http://bugs.python.org/file43521/issue20842_v1.diff

___
Python tracker 

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



[issue27376] Add mock_import method to mock module

2016-06-23 Thread Eyal Posener

New submission from Eyal Posener:

Add mock_import method.

A helper function to mask ``ImportError``s on a scoped code, using the ``with`` 
statement, or in method a method used as a decorator.
Failed imports will be ignored, unless specified by the *do_not_mock* argument.

The *do_not_mock* argument is a package or module name, or package or module 
names list. When specified, and imported in the scoped mocked code, importing 
them must succeed. If ``None`` (the default) then no import must succeed.

--
components: Library (Lib)
files: mock_import.patch
keywords: patch
messages: 269127
nosy: Eyal Posener
priority: normal
severity: normal
status: open
title: Add mock_import method to mock module
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43522/mock_import.patch

___
Python tracker 

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



[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread raphi rose

raphi rose added the comment:

the only one listed as dev was "tcl-snack-dev - Sound extension to Tcl/Tk and 
Python/Tkinter - development files," or instead of doing that one should i just 
use "python3-tk - Tkinter - Writing Tk applications with Python 3.x" and put a 
"-dev" at the end of the command? also, I'm a bit confused, should i only be 
looking at ones that have "lib" at the beginning?

--

___
Python tracker 

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



[issue27172] Add skip_bound_arg argument to inspect.Signature.from_callable()

2016-06-23 Thread Ryan Petrello

Ryan Petrello added the comment:

Nick,

That seems reasonable to me :)  I've updated my library to just use 
inspect.getfullargspec for Py3.  Thanks for taking the time to walk through 
this with me!

--

___
Python tracker 

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



[issue27172] Undeprecate inspect.getfullargspec()

2016-06-23 Thread Nick Coghlan

Nick Coghlan added the comment:

OK, as per the above discussion, I've changed the title of this issue to be to 
undeprecate inspect.getfullargspec().

That change involves two pieces:

- change the documented deprecation of inspect.getfullargspec() to instead be a 
recommendation to avoid using it in new code, and instead use 
inspect.signature()
- update the inspect.getargspec() documentation and programmatic deprecation 
warning to point to both inspect.signature() and inspect.getfullargspec() as 
potential replacements

That gives folks already using inspect.getfullargspec assurance that it isn't 
going away anytime soon (if ever), while folks using inspect.getargspec get a 
lower impact migration path to a more Python 3 friendly version of the callable 
introspection API.

--
title: Add skip_bound_arg argument to inspect.Signature.from_callable() -> 
Undeprecate inspect.getfullargspec()

___
Python tracker 

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



[issue27377] Add smarter socket.fromfd()

2016-06-23 Thread Neil Schemenauer

New submission from Neil Schemenauer:

When implementing server software that inherits a socket via a file descriptor, 
it is useful to be able to query the descriptor and find out what kind of 
socket has been passed.  This can be done with getsockopt() and getsockname().  
Python does not expose a clean way to do this.

One example use case is receiving an open socket from systemd.  For example, 
systemd will pass the open socket using file descriptor 3.  It would be handy 
if the Python server did not have to hard-code the type of the socket but 
instead could determine it.  This patch provides a function that, when given an 
integer file descriptor, returns a Python socket object with the correct family 
and kind/type attributes.  This seems like a useful, high-level interface.

This patch adds two new functions to the socket module.  I'm not so happy about 
the names.  Suggestions welcome.  The fromfd2() function does not duplicate the 
file descriptor.  I think this was a design mistake in fromfd().  If it wasn't 
for the duplication, I would change fromfd() to have None as default arguments 
and then use fdtype() to get the family, kind and protocol.  The fdtype() 
function returns (family, type, proto) for an integer file descriptor.

There does not appear to be any way to query the protocol of the passed socket. 
 I just assume it is zero.

--
components: Library (Lib)
files: fromfd2.txt
messages: 269131
nosy: nascheme
priority: normal
severity: normal
stage: patch review
status: open
title: Add smarter socket.fromfd()
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43523/fromfd2.txt

___
Python tracker 

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



[issue20674] Update comments in dictobject.c

2016-06-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Completely remove all reference to strings as it is normally completely wrong.  
In three runs of
   list(map(hash, ("namea", "nameb", "namec", "named")))
I get
[-7801965690653662103, -712276634514874737, 4394438508544812081, 
-6975951345912708912]
[-1171799829, 419385606, 1995488749, 1433346153]
[551304887, -285234584, -553876274, -279423320]

Rewrite for ints only.

I am willing to apply, but cannot patch 3.4, so Raymond, if you want that, you 
will have to do it.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread Stefan Krah

Stefan Krah added the comment:

I think you need tcl8.4-dev and tk8.4-dev and perhaps zlib1g-dev.


Actually the point is that it's expected that some modules don't build
if the corresponding libraries aren't installed.

--

___
Python tracker 

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



[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread raphi rose

raphi rose added the comment:

hmm, well i installed all the ones you told me to, ran make test again, and now 
it comes up with 
ERROR: test_article_head_body (test.test_nntplib.NetworkedNNTPTests)
--
Traceback (most recent call last):
  File "/home/rrose/temp/Python-3.5.1/Lib/test/test_nntplib.py", line 252, in 
wrapped
meth(self)
  File "/home/rrose/temp/Python-3.5.1/Lib/test/test_nntplib.py", line 189, in 
test_article_head_body
self.assertEqual(filtered_lines, filtered_head_lines + [b''] + body.lines)
  File "/home/rrose/temp/Python-3.5.1/Lib/unittest/case.py", line 820, in 
assertEqual
assertion_func(first, second, msg=msg)
  File "/home/rrose/temp/Python-3.5.1/Lib/unittest/case.py", line 1018, in 
assertListEqual
self.assertSequenceEqual(list1, list2, msg, seq_type=list)
  File "/home/rrose/temp/Python-3.5.1/Lib/unittest/case.py", line 967, in 
assertSequenceEqual
(i, item1, item2))
BytesWarning: str() on a bytes instance

--
Ran 106 tests in 12.949s

FAILED (errors=1)
test test_nntplib failed
3 tests failed again:
test_httplib test_nntplib test_ssl
make: *** [test] Error 1
I am about to run each of those tests manually and will report the output

--

___
Python tracker 

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



[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread raphi rose

raphi rose added the comment:

the test_nntplib

rrose@intern:~/temp/Python-3.5.1$ ./python -m test -v test_nntplib
== CPython 3.5.1 (default, Jun 23 2016, 15:03:20) [GCC 4.8.4]
==   Linux-3.13.0-88-generic-x86_64-with-debian-jessie-sid little-endian
==   hash algorithm: siphash24 64bit
==   /home/rrose/temp/Python-3.5.1/build/test_python_28873
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_nntplib
test_caps_only_after_login (test.test_nntplib.CapsAfterLoginNNTPv2Tests) ... ok
test_decode_header (test.test_nntplib.MiscTests) ... ok
test_parse_datetime (test.test_nntplib.MiscTests) ... ok
test_parse_overview (test.test_nntplib.MiscTests) ... ok
test_parse_overview_fmt (test.test_nntplib.MiscTests) ... ok
test_ssl_support (test.test_nntplib.MiscTests) ... ok
test_unparse_datetime (test.test_nntplib.MiscTests) ... ok
test_unparse_datetime_legacy (test.test_nntplib.MiscTests) ... ok
test_bad_capabilities (test.test_nntplib.MockSocketTests) ... ok
test_bad_welcome (test.test_nntplib.MockSocketTests) ... ok
test_login_aborted (test.test_nntplib.MockSocketTests) ... ok
test_service_permanently_unavailable (test.test_nntplib.MockSocketTests) ... ok
test_service_temporarily_unavailable (test.test_nntplib.MockSocketTests) ... ok
test_bad_capabilities (test.test_nntplib.MockSslTests) ... ok
test_bad_welcome (test.test_nntplib.MockSslTests) ... ok
test_login_aborted (test.test_nntplib.MockSslTests) ... ok
test_service_permanently_unavailable (test.test_nntplib.MockSslTests) ... ok
test_service_temporarily_unavailable (test.test_nntplib.MockSslTests) ... ok
test_article (test.test_nntplib.NNTPv1Tests) ... ok
test_article_file (test.test_nntplib.NNTPv1Tests) ... ok
test_authinfo (test.test_nntplib.NNTPv1Tests) ... ok
test_body (test.test_nntplib.NNTPv1Tests) ... ok
test_body_file (test.test_nntplib.NNTPv1Tests) ... ok
test_caps (test.test_nntplib.NNTPv1Tests) ... ok
test_date (test.test_nntplib.NNTPv1Tests) ... ok
test_description (test.test_nntplib.NNTPv1Tests) ... ok
test_descriptions (test.test_nntplib.NNTPv1Tests) ... ok
test_group (test.test_nntplib.NNTPv1Tests) ... ok
test_head (test.test_nntplib.NNTPv1Tests) ... ok
test_head_file (test.test_nntplib.NNTPv1Tests) ... ok
test_help (test.test_nntplib.NNTPv1Tests) ... ok
test_ihave (test.test_nntplib.NNTPv1Tests) ... ok
test_last (test.test_nntplib.NNTPv1Tests) ... ok
test_list (test.test_nntplib.NNTPv1Tests) ... ok
test_newnews (test.test_nntplib.NNTPv1Tests) ... ok
test_next (test.test_nntplib.NNTPv1Tests) ... ok
test_over (test.test_nntplib.NNTPv1Tests) ... ok
test_post (test.test_nntplib.NNTPv1Tests) ... ok
test_quit (test.test_nntplib.NNTPv1Tests) ... ok
test_stat (test.test_nntplib.NNTPv1Tests) ... ok
test_too_long_lines (test.test_nntplib.NNTPv1Tests) ... ok
test_welcome (test.test_nntplib.NNTPv1Tests) ... ok
test_xover (test.test_nntplib.NNTPv1Tests) ... ok
test_article (test.test_nntplib.NNTPv2Tests) ... ok
test_article_file (test.test_nntplib.NNTPv2Tests) ... ok
test_authinfo (test.test_nntplib.NNTPv2Tests) ... ok
test_body (test.test_nntplib.NNTPv2Tests) ... ok
test_body_file (test.test_nntplib.NNTPv2Tests) ... ok
test_caps (test.test_nntplib.NNTPv2Tests) ... ok
test_date (test.test_nntplib.NNTPv2Tests) ... ok
test_description (test.test_nntplib.NNTPv2Tests) ... ok
test_descriptions (test.test_nntplib.NNTPv2Tests) ... ok
test_group (test.test_nntplib.NNTPv2Tests) ... ok
test_head (test.test_nntplib.NNTPv2Tests) ... ok
test_head_file (test.test_nntplib.NNTPv2Tests) ... ok
test_help (test.test_nntplib.NNTPv2Tests) ... ok
test_ihave (test.test_nntplib.NNTPv2Tests) ... ok
test_last (test.test_nntplib.NNTPv2Tests) ... ok
test_list (test.test_nntplib.NNTPv2Tests) ... ok
test_newnews (test.test_nntplib.NNTPv2Tests) ... ok
test_next (test.test_nntplib.NNTPv2Tests) ... ok
test_over (test.test_nntplib.NNTPv2Tests) ... ok
test_post (test.test_nntplib.NNTPv2Tests) ... ok
test_quit (test.test_nntplib.NNTPv2Tests) ... ok
test_stat (test.test_nntplib.NNTPv2Tests) ... ok
test_too_long_lines (test.test_nntplib.NNTPv2Tests) ... ok
test_welcome (test.test_nntplib.NNTPv2Tests) ... ok
test_xover (test.test_nntplib.NNTPv2Tests) ... ok
skipped "Use of the 'network' resource not enabled"
skipped "Use of the 'network' resource not enabled"
test_module_all_attribute (test.test_nntplib.PublicAPITests) ... ok
test_we_are_in_reader_mode_after_connect 
(test.test_nntplib.SendReaderNNTPv2Tests) ... ok

--
Ran 70 tests in 0.037s

OK (skipped=2)
1 test OK.

--

___
Python tracker 

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

[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread raphi rose

raphi rose added the comment:

the test_httplib

rrose@intern:~/temp/Python-3.5.1$ ./python -m test -v test_httplib
== CPython 3.5.1 (default, Jun 23 2016, 15:03:20) [GCC 4.8.4]
==   Linux-3.13.0-88-generic-x86_64-with-debian-jessie-sid little-endian
==   hash algorithm: siphash24 64bit
==   /home/rrose/temp/Python-3.5.1/build/test_python_2
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_httplib
test_auto_headers (test.test_httplib.HeaderTests) ... ok
test_content_length_0 (test.test_httplib.HeaderTests) ... ok
test_invalid_headers (test.test_httplib.HeaderTests) ... ok
test_ipv6host_header (test.test_httplib.HeaderTests) ... ok
test_malformed_headers_coped_with (test.test_httplib.HeaderTests) ... ok
test_putheader (test.test_httplib.HeaderTests) ... ok
test_all (test.test_httplib.OfflineTest) ... ok
test_client_constants (test.test_httplib.OfflineTest) ... ok
test_responses (test.test_httplib.OfflineTest) ... ok
test_bad_status_repr (test.test_httplib.BasicTest) ... ok
test_chunked (test.test_httplib.BasicTest) ... ok
test_chunked_extension (test.test_httplib.BasicTest) ... ok
test_chunked_head (test.test_httplib.BasicTest) ... ok
test_chunked_missing_end (test.test_httplib.BasicTest)
some servers may serve up a short chunked encoding stream ... ok
test_chunked_sync (test.test_httplib.BasicTest)
Check that we don't read past the end of the chunked-encoding stream ... ok
test_chunked_trailers (test.test_httplib.BasicTest)
See that trailers are read and ignored ... ok
test_content_length_sync (test.test_httplib.BasicTest)
Check that we don't read past the end of the Content-Length stream ... ok
test_early_eof (test.test_httplib.BasicTest) ... ok
test_epipe (test.test_httplib.BasicTest) ... ok
test_error_leak (test.test_httplib.BasicTest) ... ok
test_host_port (test.test_httplib.BasicTest) ... ok
test_incomplete_read (test.test_httplib.BasicTest) ... ok
test_negative_content_length (test.test_httplib.BasicTest) ... ok
test_overflowing_chunked_line (test.test_httplib.BasicTest) ... ok
test_overflowing_header_line (test.test_httplib.BasicTest) ... ok
test_overflowing_status_line (test.test_httplib.BasicTest) ... ok
test_partial_readintos (test.test_httplib.BasicTest) ... ok
test_partial_readintos_incomplete_body (test.test_httplib.BasicTest) ... ok
test_partial_readintos_no_content_length (test.test_httplib.BasicTest) ... ok
test_partial_reads (test.test_httplib.BasicTest) ... ok
test_partial_reads_incomplete_body (test.test_httplib.BasicTest) ... ok
test_partial_reads_no_content_length (test.test_httplib.BasicTest) ... ok
test_read_head (test.test_httplib.BasicTest) ... ok
test_readinto_chunked (test.test_httplib.BasicTest) ... ok
test_readinto_chunked_head (test.test_httplib.BasicTest) ... ok
test_readinto_head (test.test_httplib.BasicTest) ... ok
test_response_headers (test.test_httplib.BasicTest) ... ok
test_send (test.test_httplib.BasicTest) ... ok
test_send_file (test.test_httplib.BasicTest) ... ok
test_send_iter (test.test_httplib.BasicTest) ... ok
test_send_type_error (test.test_httplib.BasicTest) ... ok
test_send_updating_file (test.test_httplib.BasicTest) ... ok
test_status_lines (test.test_httplib.BasicTest) ... ok
test_too_many_headers (test.test_httplib.BasicTest) ... ok
testTimeoutAttribute (test.test_httplib.TimeoutTest) ... ok
test_100_close (test.test_httplib.PersistenceTest) ... ok
test_disconnected (test.test_httplib.PersistenceTest) ... ok
test_reuse_reconnect (test.test_httplib.PersistenceTest) ... ok
test_attributes (test.test_httplib.HTTPSTest) ... ok
test_host_port (test.test_httplib.HTTPSTest) ... ok
test_local_bad_hostname (test.test_httplib.HTTPSTest) ...  server 
(('127.0.0.1', 42358):42358 ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)):
   [23/Jun/2016 15:18:58] code 404, message File not found
 server (('127.0.0.1', 42358):42358 ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 
256)):
   [23/Jun/2016 15:18:58] "GET /nonexistent HTTP/1.1" 404 -
 server (('127.0.0.1', 42358):42358 ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 
256)):
   [23/Jun/2016 15:18:58] code 404, message File not found
 server (('127.0.0.1', 42358):42358 ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 
256)):
   [23/Jun/2016 15:18:58] "GET /nonexistent HTTP/1.1" 404 -
stopping HTTPS server
joining HTTPS thread
ok
test_local_good_hostname (test.test_httplib.HTTPSTest) ...  server 
(('127.0.0.1', 50574):50574 ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)):
   [23/Jun/2016 15:18:58] code 404, message File not found
 server (('127.0.0.1', 50574):50574 ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 
256)):
   [23/Jun/2016 15:18:58] "GET /nonexistent HTTP/1.1" 404 -
stopping HTTPS server
joining HTTPS thread
ok
test_local_unknown_cert (test.test_httplib.HTTPSTest) ... stopping HTTPS server
Got an error:
[SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl

[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread raphi rose

raphi rose added the comment:

the test_ssl

rrose@intern:~/temp/Python-3.5.1$ ./python -m test -v test_ssl
== CPython 3.5.1 (default, Jun 23 2016, 15:03:20) [GCC 4.8.4]
==   Linux-3.13.0-88-generic-x86_64-with-debian-jessie-sid little-endian
==   hash algorithm: siphash24 64bit
==   /home/rrose/temp/Python-3.5.1/build/test_python_28902
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_ssl
test_ssl: testing with 'OpenSSL 1.0.1f 6 Jan 2014' (1, 0, 1, 6, 15)
  under Linux ('debian', 'jessie/sid', '')
  HAS_SNI = True
  OP_ALL = 0x83ff
  OP_NO_TLSv1_1 = 0x1000
test__create_stdlib_context (test.test_ssl.ContextTests) ... ok
test_cert_store_stats (test.test_ssl.ContextTests) ... ok
test_check_hostname (test.test_ssl.ContextTests) ... ok
test_ciphers (test.test_ssl.ContextTests) ... ok
test_constructor (test.test_ssl.ContextTests) ... ok
test_create_default_context (test.test_ssl.ContextTests) ... ok
test_get_ca_certs (test.test_ssl.ContextTests) ... ok
test_load_cert_chain (test.test_ssl.ContextTests) ... ok
test_load_default_certs (test.test_ssl.ContextTests) ... ok
test_load_default_certs_env (test.test_ssl.ContextTests) ... ok
test_load_default_certs_env_windows (test.test_ssl.ContextTests) ... skipped 
'Windows specific'
test_load_dh_params (test.test_ssl.ContextTests) ... ok
test_load_verify_cadata (test.test_ssl.ContextTests) ... ok
test_load_verify_locations (test.test_ssl.ContextTests) ... ok
test_options (test.test_ssl.ContextTests) ... ok
test_protocol (test.test_ssl.ContextTests) ... ok
test_session_stats (test.test_ssl.ContextTests) ... ok
test_set_default_verify_paths (test.test_ssl.ContextTests) ... ok
test_set_ecdh_curve (test.test_ssl.ContextTests) ... ok
test_sni_callback (test.test_ssl.ContextTests) ... ok
test_sni_callback_refcycle (test.test_ssl.ContextTests) ... ok
test_verify_flags (test.test_ssl.ContextTests) ... ok
test_verify_mode (test.test_ssl.ContextTests) ... ok
test_DER_to_PEM (test.test_ssl.BasicSocketTests) ... ok
test_asn1object (test.test_ssl.BasicSocketTests) ... ok
test_cert_time_to_seconds (test.test_ssl.BasicSocketTests) ... ok
test_cert_time_to_seconds_locale (test.test_ssl.BasicSocketTests) ... skipped 
'locale-specific month name needs to be different from C locale'
test_cert_time_to_seconds_timezone (test.test_ssl.BasicSocketTests) ... ok
test_constants (test.test_ssl.BasicSocketTests) ... ok
test_dealloc_warn (test.test_ssl.BasicSocketTests) ... ok
test_enum_certificates (test.test_ssl.BasicSocketTests) ... skipped 'Windows 
specific'
test_enum_crls (test.test_ssl.BasicSocketTests) ... skipped 'Windows specific'
test_errors (test.test_ssl.BasicSocketTests) ... ok
test_get_default_verify_paths (test.test_ssl.BasicSocketTests) ... ok
test_match_hostname (test.test_ssl.BasicSocketTests) ... ok
test_openssl_version (test.test_ssl.BasicSocketTests) ... ok
test_parse_cert (test.test_ssl.BasicSocketTests) ... 
{'issuer': ((('countryName', 'XY'),),
(('localityName', 'Castle Anthrax'),),
(('organizationName', 'Python Software Foundation'),),
(('commonName', 'localhost'),)),
 'notAfter': 'Oct  5 23:01:56 2020 GMT',
 'notBefore': 'Oct  8 23:01:56 2010 GMT',
 'serialNumber': 'D7C7381919AFC24E',
 'subject': ((('countryName', 'XY'),),
 (('localityName', 'Castle Anthrax'),),
 (('organizationName', 'Python Software Foundation'),),
 (('commonName', 'localhost'),)),
 'subjectAltName': (('DNS', 'localhost'),),
 'version': 3}

{'OCSP': ('http://ocsp.verisign.com',),
 'caIssuers': ('http://SVRIntl-G3-aia.verisign.com/SVRIntlG3.cer',),
 'crlDistributionPoints': ('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',),
 'issuer': ((('countryName', 'US'),),
(('organizationName', 'VeriSign, Inc.'),),
(('organizationalUnitName', 'VeriSign Trust Network'),),
(('organizationalUnitName',
  'Terms of use at https://www.verisign.com/rpa (c)10'),),
(('commonName', 'VeriSign Class 3 International Server CA - G3'),)),
 'notAfter': 'Sep 20 23:59:59 2012 GMT',
 'notBefore': 'Sep 21 00:00:00 2011 GMT',
 'serialNumber': '2EE6EA7640A075CEE5005F4D7C79549A',
 'subject': ((('countryName', 'FI'),),
 (('stateOrProvinceName', 'Espoo'),),
 (('localityName', 'Espoo'),),
 (('organizationName', 'Nokia'),),
 (('organizationalUnitName', 'BI'),),
 (('commonName', 'projects.developer.nokia.com'),)),
 'subjectAltName': (('DNS', 'projects.developer.nokia.com'),
('DNS', 'projects.forum.nokia.com')),
 'version': 3}
ok
test_parse_cert_CVE_2013_4238 (test.test_ssl.BasicSocketTests) ... 
{'issuer': ((('countryName', 'US'),),
(('stateOrProvinceName', 'Oregon'),),
(('localityName',

[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread raphi rose

raphi rose added the comment:

also, after installing this library liblzma-dev it said that i had redundant 
files (not in those words) and that I should run "apt-get autoremove," which I 
did, this may have been what caused the other failures?

--

___
Python tracker 

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



[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread Stefan Krah

Stefan Krah added the comment:

Ah, so the tests pass when you run them manually but "make test"
fails.  This looks like

  https://bugs.python.org/issue26837 ,

which is fixed in the next release. You can just ignore this
failure, it's harmless.

[BTW, using autoremove is fine.]

--
components: +Tests -Build, Installation
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> assertSequenceEqual() raises BytesWarning when format message
type: compile error -> behavior

___
Python tracker 

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



[issue27377] Add smarter socket.fromfd()

2016-06-23 Thread Neil Schemenauer

Neil Schemenauer added the comment:

Add documentation for new functions.

--
Added file: http://bugs.python.org/file43524/fromfd2.txt

___
Python tracker 

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



[issue27377] Add smarter socket.fromfd()

2016-06-23 Thread Neil Schemenauer

Changes by Neil Schemenauer :


Removed file: http://bugs.python.org/file43523/fromfd2.txt

___
Python tracker 

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



[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread raphi rose

raphi rose added the comment:

ok great, thanks for your help!

--
components: +Build, Installation -Tests
resolution: duplicate -> 
status: closed -> open
type: behavior -> compile error

___
Python tracker 

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



[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread raphi rose

Changes by raphi rose :


--
resolution:  -> fixed

___
Python tracker 

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



[issue27378] remove ref to Phil Schwartz's 'Kodos' in regex HOWTO

2016-06-23 Thread Matt Morrison

New submission from Matt Morrison:

In the Regular Expressions HOWTO 
(https://docs.python.org/3/howto/regex.html#performing-matches, 
Doc/howto/regex.rst), there is the following paragraph:

=
You can learn about this by interactively experimenting with the :mod:`re`
module.  If you have :mod:`tkinter` available, you may also want to look at
:source:`Tools/demo/redemo.py`, a demonstration program included with the
Python distribution.  It allows you to enter REs and strings, and displays
whether the RE matches or fails. :file:`redemo.py` can be quite useful when
trying to debug a complicated RE.  Phil Schwartz's `Kodos
`_ is also an interactive tool for developing and
testing RE patterns.
=

I checked the Kodos site on SourceForge, and the latest release is exactly 10 
years old. I couldn't get it to work with 2.7.11 on Ubuntu 16.04 and PyQt4 - 
Qt3 is one of its requirements. I didn't bother running 2to3 on it. I propose 
we delete the last sentence of the above paragraph altogether. There are many 
good regex sites out there, including regex101, regexr, Debuggex, regexpal, and 
more (those are just the first few in my bookmarks list), and I don't feel we 
should be promoting one outdated tool.

Here is the diff:
=
@@ -374,9 +374,7 @@
 :source:`Tools/demo/redemo.py`, a demonstration program included with the
 Python distribution.  It allows you to enter REs and strings, and displays
 whether the RE matches or fails. :file:`redemo.py` can be quite useful when
-trying to debug a complicated RE.  Phil Schwartz's `Kodos
-`_ is also an interactive tool for developing 
and
-testing RE patterns.
+trying to debug a complicated RE.

 This HOWTO uses the standard Python interpreter for its examples. First, run 
the
 Python interpreter, import the :mod:`re` module, and compile a RE::

=

I've also attached it as a file.

--
assignee: docs@python
components: Documentation
files: regex.diff
keywords: patch
messages: 269142
nosy: MattDMo, docs@python
priority: normal
severity: normal
status: open
title: remove ref to Phil Schwartz's 'Kodos' in regex HOWTO
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43525/regex.diff

___
Python tracker 

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



[issue27375] error in "make test", while trying to install python on linux computer

2016-06-23 Thread Stefan Krah

Changes by Stefan Krah :


--
components: +Tests -Build, Installation
resolution: fixed -> duplicate
status: open -> closed
type: compile error -> behavior

___
Python tracker 

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



[issue27377] Add smarter socket.fromfd()

2016-06-23 Thread SilentGhost

SilentGhost added the comment:

The patch applies cleanly, not sure why the rietveld link doesn't appear. 
Perhaps because of the extension?

In test, I noticed, that you're not testing that OSError is raised, perhaps 
something to add?

--
nosy: +SilentGhost

___
Python tracker 

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



[issue27376] Add mock_import method to mock module

2016-06-23 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +michael.foord
stage:  -> patch review

___
Python tracker 

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



[issue27363] Complex with negative zero imaginary part

2016-06-23 Thread Vedran Čačić

Vedran Čačić added the comment:

Funny, I thought the "repr invariant" was exactly the opposite thing, that 
_eval_ (or literal_eval) of repr should give back the starting object. And 
that's what I intended to preserve here. It's obviously broken now.

Ok, alternate suggestion: can at least ast.literal_eval be fixed to work in the 
same way as complex constructor? Because it's not much of a "literal" 
otherwise...

--

___
Python tracker 

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



[issue27371] Runaway memory consumption using tkinter update()

2016-06-23 Thread R. David Murray

R. David Murray added the comment:

You might want to try stripping it further, and see if you can reproduce it 
just using tk, without python involved.

--
nosy: +r.david.murray
title: Runaway memory consumption using update() -> Runaway memory consumption 
using tkinter update()

___
Python tracker 

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



[issue27371] Runaway memory consumption using tkinter update()

2016-06-23 Thread Jeremy Blow

Jeremy Blow added the comment:

That seems like a good idea, will do so and report back findings. Hey, good 
meeting you at PyCon, by the way. Met you at the freelance open space. :-)

--

___
Python tracker 

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



[issue27365] Allow non-ascii chars in IDLE NEWS.txt (for contributor names)

2016-06-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cbc6407fa393 by Terry Jan Reedy in branch '2.7':
Issue #27365: Add blank lines. to 2.7 test_editmenu
https://hg.python.org/cpython/rev/cbc6407fa393

--

___
Python tracker 

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



[issue13344] closed sockets don't raise EBADF anymore

2016-06-23 Thread Martin Panter

Martin Panter added the comment:

According to strace, Python 3 is calling send(-1, ...):

sendto(-1, "x", 1, 0, NULL, 0)  = -1 EBADF (Bad file descriptor)

A related discrepancy between Python 2 and 3 is how the socket.makefile() 
objects affect the original socket. In Python 2:

>>> f = sock.makefile("wb")
>>> sock.close()  # Should “close” Python’s sock object, but not f
>>> sock.send(b"x")
socket.error: [Errno 9] Bad file descriptor

In Python 3:
>>> sock.send(b"x")  # Actually sent to remote end!
1

--
nosy: +martin.panter

___
Python tracker 

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



[issue27377] Add smarter socket.fromfd()

2016-06-23 Thread Martin Panter

Martin Panter added the comment:

Maybe if the patch was regenerated with Mercurial off a public revision, it 
would work with Rietveld. I have seen non-Mercurial patches work too though. 
Perhaps this one doesn’t because the line numbers are off compared to the 
default branch?

See also Issue 18391 discussing extending the existing fromfd() function to 
automatically determine the socket parameters.

I agree that the name fromfd2() is a bit ugly, although there is precedence at 
least in Python 2: urllib2, os.popen2(), popen2 module, etc. Maybe other bike 
shed colours might be from_existing_fd(), using_fd(), fdopen(). Something that 
suggests creating an object from an FD without duplication.

I wonder if fdtype() is really needed as a public API.

The new fromfd2() API is missing when you do “from socket import * ”. There is 
a new function 
 that 
may be useful to automate checking for this error.

What prevents this from working on Windows? I understand there is less of a 
need, but I imagine it would be relatively easy to support.

It looks like some platforms support SO_PROTOCOL and/or SO_PROTOTYPE to get a 
socket’s protocol: . Also, there 
might be a Windows-specific SO_PROTOCOL_INFO option.

>>> s

>>> SO_PROTOCOL = 38  # On Linux x86-64; see Issue 18391
>>> protocol_struct = Struct("I")
>>> protocol = s.getsockopt(SOL_SOCKET, SO_PROTOCOL, protocol_struct.size)
>>> protocol_struct.unpack(protocol)
(6,)
>>> IPPROTO_TCP
6

IMO if Python grows the ability to determine a socket’s protocol, it might be 
better for socket.proto to use it automatically, at least if proto=0 was 
specified to the socket() function.

diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
+.. function:: fromfd2(fd)
+
+   Create a socket object from a file descriptor.  The file descriptor is
+   not duplicated.  The family, type and protocol for the socket are
This needs fixing about how and if the protocol is determined.

+   determined from the file descriptor.  If the file descriptor is not a
+   socket, OSError is raised.  The socket is assumed to be in blocking mode.
:exc:`OSError`

+   The newly created socket is :ref:`non-inheritable `.
This does not seem to be true, nor desirable:

>>> s = socket()
>>> s.get_inheritable()
False
>>> s.set_inheritable(True)
>>> ss = fromfd2(s.fileno())
>>> ss.get_inheritable()
True
>>> s.get_inheritable()
True

+   .. versionadded:: 3.6
+  The returned socket is now non-inheritable.
The whole function is new, not just process inheritance.

diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
+with s:
+s2 = socket.fromfd2(s.fileno())
+with s2:
Isn’t this incorrect due to closing the same file descriptor twice? I think you 
should use socket.detach(). See Issue 26685, whose changes should raise an 
exception for this bug in 3.6.

diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
+if (!S_ISSOCK(st_fd.st_mode)) {
+PyErr_SetString(PyExc_ValueError, "fdtype: "
+"file descriptor is not a socket");
This seems to be contrary to your documentation. Also, perhaps it is good 
enough to let getsockopt() later raising ENOTSOCK?

+union sockaddr_union sockaddr = {};
Why not just use a struct sockaddr? All we need is the sa.sa_family field right?

--
nosy: +martin.panter

___
Python tracker 

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



[issue26537] ConfigParser has optionxform, but not sectionxform

2016-06-23 Thread Xiang Zhang

Xiang Zhang added the comment:

ping

--

___
Python tracker 

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



[issue20842] pkgutil docs should reference glossary terms not PEP 302

2016-06-23 Thread Martin Panter

Martin Panter added the comment:

See also Issue 26896. Apparently some of the terms you are linking are used 
wrongly.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-23 Thread Emanuel Barry

Emanuel Barry added the comment:

Yes, it's in use in an awful lot of places (see my patch). The proper fix is to 
use raw strings, or, if you need actual escapes in the same string, manually 
escape them. However, as you'll see by looking at the patch, the vast majority 
of cases are fixed by prepending a single 'r' to the front of the string. In 
fact, only csv.py and html/parser.py needed more finer-grained escaping.

I think that the argument "It works in non-raw strings" is weak. I've always 
used raw strings for regular expressions, and this patch would simply move this 
from being a style issue to being a syntax one (and I think it's fine :).

--

___
Python tracker 

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



[issue27379] SocketType changed in Python 3

2016-06-23 Thread Martin Panter

New submission from Martin Panter:

In the documentation for Python 2 and 3, socket.SocketType is defined as:

This is a Python type object that represents the socket object type. It is the 
same as “type(socket(...))”.

In Python 2 it is a standalone “socket._socketobject” class, which holds a 
“_socket.socket” instance as an internal “_sock” attribute. So the 
documentation and implementation are consistent. But since revision 
8e062e572ea4, Python 3 no longer defines SocketType directly, and just imports 
the “_socket.SocketType” definition, which is an alias of “_socket.socket”. The 
change also defines “socket.socket” as a subclass of this low-level class. The 
result is that SocketType is not the exact type, but only a base class:

>>> s = socket.socket()
>>> type(s)

>>> SocketType

>>> type(s) is SocketType  # Should be true according to documentation
False
>>> isinstance(s, SocketType)
True

Should the documentation just be amended, or should SocketType be changed? If 
SocketType is not changed, perhaps we should document that socket.socket() is a 
class, not just a function, and maybe deprecate SocketType.

--
messages: 269153
nosy: martin.panter
priority: normal
severity: normal
status: open
title: SocketType changed in Python 3
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



[issue27380] IDLE: add base Query dialog with ttk widgets

2016-06-23 Thread Terry J. Reedy

New submission from Terry J. Reedy:

The custom popup entry dialogs in config_sec and config_help have a common 
structure and overlapping code.  When one hits OK and the entry is not valid, 
both display a specific message and let the user edit the entry (or Cancel).

File => Load Module, on the other hand, uses tkSimpleDialog.askstring.  No 
error checking is done before the box disappears.  If there is an error, even a 
simple misspelling, one must start over.  It is really annoying to use.  I want 
to replace this with a custom popup that would be the same as the one in 
config_sec, except for title, prompt, and validation function.  If the name 
given has multiple conponents, such as idlelib.idelhelp.help_xyz, I would like 
to report which is the first invalid component (going from left to right).

I am therefore adding a new module, query.py, with a new Query class that will 
be the baseclass for three derived classes.

The partial patch renames config_sec.py (formerly configSectionNameDialog.py) 
to query.py.  The corresponding test_config_sec) becomes test_query.  It splits 
class GetCfgSectionNameDialog into a base class Query and a subclass 
SectionName.  Query is responsible for the popup, and used ttk widgets as 
appropriate.  SectionName overrides the entry validation function entry_ok 
(formerly name_ok).  The test functions have been similarly split.

What remains are ModuleName and HelpSource subclasses, corresponding tests, and 
integration with the software that would use them.

--
assignee: terry.reedy
files: query.diff
keywords: patch
messages: 269154
nosy: terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: IDLE: add base Query dialog with ttk widgets
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43526/query.diff

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There was a long discussion on Python-Dev. [1]  Guido taken part in it.

[1] http://comments.gmane.org/gmane.comp.python.devel/151612

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-23 Thread Emanuel Barry

Emanuel Barry added the comment:

Thanks, didn't find that one. Apparently Guido's stance is "Make this a silent 
warning, then we can discuss about preventing it later", which happens to be 
what I'm doing here.

--

___
Python tracker 

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



[issue27371] Runaway memory consumption using tkinter update()

2016-06-23 Thread Jeremy Blow

Jeremy Blow added the comment:

Confirmed the problem is with Tk/MacOS. Running a simple TCL script yielded the 
same behavior in terms of memory. The hunt goes elsewhere... Thank you R. David 
for the suggestion. 

```
package require Tk

while 1 {
update
}
```

# MacOS 10.9.4
/Users/jeremy$ /usr/bin/time -l tclsh update_loop.tcl
   60.20 real34.67 user21.42 sys
  18219008  maximum resident set size
 0  average shared memory size
 0  average unshared data size
 0  average unshared stack size
  5836  page reclaims
26  page faults
 0  swaps
 0  block input operations
 9  block output operations
 0  messages sent
 0  messages received
 0  signals received
830419  voluntary context switches
   1663224  involuntary context switches

# MacOS 10.11.3
/Users/jeremy$ /usr/bin/time -l tclsh update_loop.tcl
   60.44 real39.06 user21.45 sys
 571715584  maximum resident set size
 0  average shared memory size
 0  average unshared data size
 0  average unshared stack size
141633  page reclaims
 0  page faults
 0  swaps
 0  block input operations
 3  block output operations
 0  messages sent
 0  messages received
 0  signals received
521744  voluntary context switches
   1833399  involuntary context switches

--
resolution:  -> third party
status: open -> closed

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-23 Thread Emanuel Barry

Emanuel Barry added the comment:

I found the cause of the failed assertion, an invalid escape sequence slipped 
through in a file. Patch attached (also with Serhiy's comments).

It worries me a little though that pure Python code can cause a hard crash. Ok, 
it worries me a lot. Please don't merge this until it's fixed. I'm guessing 
this is a combination of unittest catching warnings and compiling the faulty 
source file. As to why a malformed node (i.e. one that raised a 
DeprecationWarning) managed to pass through unharmed is beyond me.

--
Added file: 
http://bugs.python.org/file43527/deprecate_invalid_unicode_escapes_2.patch

___
Python tracker 

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



[issue27378] remove ref to Phil Schwartz's 'Kodos' in regex HOWTO

2016-06-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 23182404a85c by Berker Peksag in branch '3.5':
Issue #27378: Remove an outdated reference from regex HOWTO
https://hg.python.org/cpython/rev/23182404a85c

New changeset 21cb299a9626 by Berker Peksag in branch 'default':
Issue #27378: Merge from 3.5
https://hg.python.org/cpython/rev/21cb299a9626

--
nosy: +python-dev

___
Python tracker 

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



[issue27378] remove ref to Phil Schwartz's 'Kodos' in regex HOWTO

2016-06-23 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

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



[issue26547] Undocumented use of the term dictproxy in vars() documentation

2016-06-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 79e4593ce746 by Berker Peksag in branch '3.5':
Issue #26547: Remove outdated term dictproxy from vars() documentation
https://hg.python.org/cpython/rev/79e4593ce746

New changeset 45544b868f7b by Berker Peksag in branch 'default':
Issue #26547: Merge from 3.5
https://hg.python.org/cpython/rev/45544b868f7b

--
nosy: +python-dev

___
Python tracker 

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



[issue26547] Undocumented use of the term dictproxy in vars() documentation

2016-06-23 Thread Berker Peksag

Berker Peksag added the comment:

Thanks, Julien.

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



[issue18300] script_helper._assert_python should set TERM='' by default.

2016-06-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 983fe8f96b08 by Berker Peksag in branch '3.5':
Issue #18300: Set TERM='' by default in assert_python_*
https://hg.python.org/cpython/rev/983fe8f96b08

New changeset 1c49cf82d115 by Berker Peksag in branch 'default':
Issue #18300: Merge from 3.5
https://hg.python.org/cpython/rev/1c49cf82d115

--
nosy: +python-dev

___
Python tracker 

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



[issue18300] script_helper._assert_python should set TERM='' by default.

2016-06-23 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the review, Martin.

--
components: +Tests
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.5, Python 3.6 -Python 2.7, 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