[issue22232] str.splitlines splitting on non-\r\n characters

2016-06-01 Thread Alexander Schrijver

Alexander Schrijver added the comment:

I appeared to have missed the reference to that issue when I read this issue 
the first time. Re-opening that issue makes sense to me.

--

___
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-06-01 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The "IDLE Classic Unix" key set in IDLE provides Emacs-like key bindings. But 
modern Linux environments (KDE, Gnome, etc) use different key bindings in 
standard editors. Proposed patch provides new key set named "IDLE Modern Unix" 
that uses key bindings common in KDE (and mainly in Gnome). It is more habitual 
for average user.

In additional the patch makes IDLE to use platform-depending key set by default.

--
components: IDLE
files: idle_modern_unix_key_set.patch
keywords: patch
messages: 266801
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Modern Unix key bindings for IDLE
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43079/idle_modern_unix_key_set.patch

___
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-06-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +terry.reedy

___
Python tracker 

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



[issue27174] Update URL to IPython in interactive.rst

2016-06-01 Thread kulla

New submission from kulla:

The file https://docs.python.org/3.6/tutorial/interactive.html has a dead link 
for IPython to http://ipython.scipy.org/ I guess the right link shall be 
https://ipython.org/

--
components: Devguide
messages: 266802
nosy: ezio.melotti, kulla, willingc
priority: normal
severity: normal
status: open
title: Update URL to IPython in interactive.rst
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



[issue24759] Idle: require tk 8.5 and ttk widgets, and drop unneeded code.

2016-06-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

My patch in issue24750 makes sense only if we want support Tcl/Tk 8.4. I think 
that if require Tcl/Tk 8.5+, we can use Ttk directly and unconditionally. I 
don't think that it can be not working.

--

___
Python tracker 

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



[issue27174] Update URL to IPython in interactive.rst

2016-06-01 Thread kulla

Changes by kulla :


--
type:  -> enhancement

___
Python tracker 

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



[issue27174] Update URL to IPython in interactive.rst

2016-06-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> docs@python
components: +Documentation -Devguide
keywords: +easy
nosy: +docs@python
stage:  -> needs patch
type: enhancement -> behavior
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-01 Thread Xiang Zhang

Xiang Zhang added the comment:

This seems related with the difference between zlib format and raw format. When 
you do raw inflate, you have to inflateSetDictionary before any inflate. You 
cannot rely on the first inflate to return Z_NEED_DICT and then do 
inflateSetDictionary.

Although I have the solution with experiment, but there is nothing can be found 
in the official zlib documentation. It is rather vague. I'll make more research 
and submit a patch later..

Right now, you can use zlib format (positive wbits) if it can achieve your 
goal. It's behaviour is right.

--
nosy: +martin.panter, nadeem.vawda, twouters

___
Python tracker 

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



[issue27171] Fix various typos

2016-06-01 Thread Martin Panter

Martin Panter added the comment:

Thanks. The py2 version is partly a back port, but I have searched for the same 
kind of spelling mistakes and fixed them in different places, e.g. “overriden” 
in Lib/bsddb/test/test_all.py, which does not exist in Py 3.

--

___
Python tracker 

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



[issue12855] linebreak sequences should be better documented

2016-06-01 Thread Martin Panter

Martin Panter added the comment:

Reopening to change the Python 2 documentation. A starting point may be 
Matthew’s patch and/or Alexander’s patch in Issue 22232.

--
status: closed -> open

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

New submission from SilentGhost:

This could only go in 3.6, but it needs proper documentation and test(s).

--
nosy: +SilentGhost, yselivanov
stage:  -> test needed
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



[issue25570] urllib.request > Request.add_header("abcd", "efgh") fails with character ":" in first parameter string

2016-06-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 320b9a65ac07 by Martin Panter in branch '3.5':
Issue #25570: Add example of customizing User-Agent via add_header()
https://hg.python.org/cpython/rev/320b9a65ac07

New changeset 75dc64c8c22b by Martin Panter in branch 'default':
Issue #25570: Merge add_header() example from 3.5
https://hg.python.org/cpython/rev/75dc64c8c22b

New changeset 3aa49900869b by Martin Panter in branch '2.7':
Issue #25570: Add example of customizing User-Agent via add_header()
https://hg.python.org/cpython/rev/3aa49900869b

--
nosy: +python-dev

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

Terry J. Reedy added the comment:

Seems reasonable.

3 or more years ago, there was an issue about needing to define pairs like 
Control-Key-c and Control-Key-C in order to have crtl + c/C-key work the same 
regardless of the caps lock setting.  I also remember that the effect of Caps 
lock was system dependent.  But I forget the details.  We should find the issue 
and document the system dependent rules, perhaps in config.py, perhaps in 
config-keys.def.

Adding a new default key set will likely not be as simple as we wish.  The 
problem is the same one we had when adding a new default color theme last fall. 
 If one selects the new definition, older releases will try and fail to load 
what is not there.  Keys have a different backup logic than themes, including 
the 'last resort fallback' in IdleConf.GetCoreKeys.  With thems the result was 
errors and or an exit.  Have you, or can you check what happens if you select 
'Modern Unix' and run an existing release.

If necessary, we can use the same workaround we did with theme, which is 
described in the docstring for IdleConf.CurrentTheme.  Part the theme patch was 
making sure that all of the rest of IDLE accessed the current theme through the 
rewritten CurrentTheme instead of through GetOption('main', 'Theme', ...).

I would like to add some unittests, but a manual test protocol is needed at 
least to test an existing release.  Tests should be run on each of the three 
systems, and for each backported version.  When we have a tested patch ready, 
we could ask New to test on Mac, or do you have access to one now?

--

___
Python tracker 

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



[issue27175] Unpickling Path objects

2016-06-01 Thread Antony Lee

New submission from Antony Lee:

Currently, pickling Path objects lead to issues when working across platforms: 
Paths (and, thus, objects that contain Paths) created on a POSIX platform 
(PosixPaths) cannot be unpickled on Windows and vice versa.  There are a few 
possibilities around this issue.

- Don't do anything about it, you should use PurePaths if you care about 
cross-platform compatibility: this would be pretty awkward, as any call to the 
Path API would require converting back the PurePath to a Path first.

- Silently convert Paths to PurePaths during pickling (a solution that seems to 
have been adopted by 
http://docs.menpo.org/en/stable/api/menpo/io/export_pickle.html for example): 
it would be better if Paths at least roundtripped correctly within a single 
platform.

- Convert Paths to PurePaths at unpickling time, only if the platform is 
different (and possibly with a warning): this is the least bad solution I came 
up with so far.  Note that calls to the Path API on a "converted" PurePath 
object would be invalid anyways as the PurePath (being of a different platform) 
cannot be representing a valid path.

Thoughts?

--
components: Library (Lib)
messages: 266810
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Unpickling Path objects
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



[issue26739] idle: Errno 10035 a non-blocking socket operation could not be completed immediately

2016-06-01 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Hi there, everyone.
I'm sorry for my rash remarks about the state of IDLE, I'm sure it is alive and 
well and its good to see that fine people like Terry are working on keeping it 
up to date.

Michael, please understand that python developers are volunteers and sometimes 
need help to fix things.  In this case, we have not been able to reproduce the 
problem, and are not sure what can be causing it.  My suggestion for you to 
modify code would be a step in identifying and diagnosing the problem.  Without 
such feedback it is hard to accomplish anything.

Cheers!

--

___
Python tracker 

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



[issue27175] Unpickling Path objects

2016-06-01 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +pitrou
type:  -> behavior
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



[issue25570] urllib.request > Request.add_header("abcd", "efgh") fails with character ":" in first parameter string

2016-06-01 Thread Martin Panter

Changes by Martin Panter :


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



[issue12855] linebreak sequences should be better documented

2016-06-01 Thread Martin Panter

Martin Panter added the comment:

Here is an updated patch for Python 2, based on Benjamin’s commit, Matthew’s 
earlier py27 patch, and Alexander’s backport of related changes from Python 3. 
Let me know what you think.

--
nosy: +Alexander Schrijver
stage: resolved -> patch review
Added file: http://bugs.python.org/file43080/linebreakdoc.v5.py2.7.patch

___
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-01 Thread ryan.petrello

ryan.petrello added the comment:

Thanks, I'll upload a new patch shortly that addresses these.

--

___
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-01 Thread ryan.petrello

Changes by ryan.petrello :


Added file: 
http://bugs.python.org/file43081/signature-from-callable-skip-bound-arg.patch

___
Python tracker 

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



[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-01 Thread Xiang Zhang

Xiang Zhang added the comment:

I think my conclusion in last message is right. A similar bug in CPAN can be 
found in https://rt.cpan.org/Public/Bug/Display.html?id=36046. And I can find 
in zlib's changelog inflateSetDictionary starts to support raw inflate from 
1.2.2.1.

Patch attached now allows Python to decompress raw deflate format with a 
dictionary. Hope some core devs are willing to review.

--
keywords: +patch
Added file: http://bugs.python.org/file43082/issue27164.patch

___
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-06-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> 3 or more years ago, there was an issue about needing to define pairs like 
> Control-Key-c and Control-Key-C in order to have crtl + c/C-key work the same 
> regardless of the caps lock setting.  I also remember that the effect of Caps 
> lock was system dependent.

Proposed scheme binds different actions on hotkeys with and without Shift: 
Ctrl-Z/Ctrl-Shift-Z, Ctrl-S/Ctrl-Shift-S. If don't touch CapsLock this is not 
an issue.

Yes, there is a problem with new buildin keys set in old IDLE versions. A lot 
of warnings is emitted on stderr. The solution for the "IDLE Dark" theme is not 
complete, since after adding next new theme we will encounter the same problem 
and should add options "name3", "name4"...

Updated patch uses the same solution for new keys set. But it also makes 
warnings be less annoying. Every warning is emitted just once, and only one 
warning is emitted for unknown keys set.

--
Added file: http://bugs.python.org/file43083/idle_modern_unix_key_set2.patch

___
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-01 Thread ryan.petrello

Changes by ryan.petrello :


--
nosy: +eric.snow

___
Python tracker 

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



[issue27176] Addition of assertNotRaises

2016-06-01 Thread Bar Harel

New submission from Bar Harel:

I thought of implementing an assertNotRaises to solve the issue of using 
try...except...fail in order to prevent showing the tests as an error and 
instead show them as a failure.
Is there anything I should consider while implementing it?

--
components: Library (Lib), Tests
messages: 266816
nosy: bar.harel
priority: normal
severity: normal
status: open
title: Addition of assertNotRaises
type: enhancement

___
Python tracker 

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



Re: [issue23459] Linux: expose the new execveat() syscall

2016-06-01 Thread Dennis Clarke

On 05/30/2016 06:12 PM, Марк Коренберг wrote:


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

It is actual to me due to it's AT_EMPTY_PATH feature (I download script, verify 
signature, and want to run it)

See also `man 3 fexecve`

Why not to add `dir_fd=None` ?  (as in `os.rmdir()` for example).

It should be very small patch, as I think.


This system call only exists in some recent versions of Linux :

  #include 

   int execveat(int dirfd, const char *pathname,
char *const argv[], char *const envp[],
int flags);


Using code that depends on it will break portability.

Dennis Clarke

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



[issue27177] re match.group should support __index__

2016-06-01 Thread Jeroen Demeyer

New submission from Jeroen Demeyer:

```
>>> class zero(object):
... def __index__(self):
... return 0
... 
>>> z = zero()
>>> import re
>>> p = re.compile('(a)b')
>>> m = p.match('ab')
>>> m.group(0)
'ab'
>>> m.group(z)
Traceback (most recent call last):
  File "", line 1, in 
IndexError: no such group
```

--
components: Regular Expressions
files: re_match_index.patch
keywords: patch
messages: 266817
nosy: ezio.melotti, jdemeyer, mrabarnett
priority: normal
severity: normal
status: open
title: re match.group should support __index__
versions: Python 2.7
Added file: http://bugs.python.org/file43084/re_match_index.patch

___
Python tracker 

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



[issue27176] Addition of assertNotRaises

2016-06-01 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +ezio.melotti, michael.foord, rbcollins
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



[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2016-06-01 Thread Charles-François Natali

Charles-François Natali added the comment:

Shouldn't the documentation be updated?

https://docs.python.org/3.6/library/weakref.html#weakref.WeakKeyDictionary

Note Caution: Because a WeakKeyDictionary is built on top of a Python 
dictionary, it must not change size when iterating over it. This can be 
difficult to ensure for a WeakKeyDictionary because actions performed by the 
program during iteration may cause items in the dictionary to vanish “by magic” 
(as a side effect of garbage collection).

--
nosy: +neologix

___
Python tracker 

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



[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-01 Thread Xiang Zhang

Xiang Zhang added the comment:

Forget to add test. Upload a new one with test included.

--
Added file: http://bugs.python.org/file43085/issue27164_with_test.patch

___
Python tracker 

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



[issue27176] Addition of assertNotRaises

2016-06-01 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Yes. What does such an assertion actually mean?

Why would I write `self.assertNotRaises(ValueError, spam, arg)` rather than 
just call `spam(arg)`? The only difference is that assertNotRaises will treat 
one specific exception as a test failure rather than a error, but I don't think 
that's useful. spam(arg) presumably is supposed to return something, or do 
something, not merely "don't raise ValueError". Raising ValueError should be no 
different from raising any other exception: it's a error, not a failure.

It makes sense to test for expected exceptions. I don't think it makes sense to 
test for exceptions that don't happen. Every single successful test of 
`spam(arg)` shows that ValueError is not raised, as well as every imaginable 
other exception. I don't think there is any need for an assert method to test 
for exceptions not being raised.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue27176] Addition of assertNotRaises

2016-06-01 Thread R. David Murray

R. David Murray added the comment:

Agreed.  I've never used the distinction between errors and failures myself.

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



[issue27177] re match.group should support __index__

2016-06-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This looks as new feature and can go only in 3.6.

--
nosy: +serhiy.storchaka
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.6 -Python 2.7

___
Python tracker 

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



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

2016-06-01 Thread Andrey Kislyuk

Andrey Kislyuk added the comment:

Is there any chance of getting this into 3.6? We are still in a situation where 
the shlex module misleads developers into believing that it has functionality 
to parse things the way the shell does. I've had to vendor the copy of shlex 
with patches from this bug applied (thanks Vinay!)

--
nosy: +Andrey.Kislyuk

___
Python tracker 

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



[issue27176] Addition of assertNotRaises

2016-06-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I concur with David snd Steven, so closing this as rejected.

--
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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




[issue27174] Update URL to IPython in interactive.rst

2016-06-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 92fd6935e882 by Berker Peksag in branch '3.5':
Issue #27174: Update IPython URL in tutorial
https://hg.python.org/cpython/rev/92fd6935e882

New changeset 87d76611470c by Berker Peksag in branch 'default':
Issue #27174: Merge from 3.5
https://hg.python.org/cpython/rev/87d76611470c

--
nosy: +python-dev

___
Python tracker 

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



[issue27174] Update URL to IPython in interactive.rst

2016-06-01 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report, kulla.

--
nosy: +berker.peksag
resolution:  -> fixed
stage: needs patch -> 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



[issue27051] Create PIP gui

2016-06-01 Thread Upendra Kumar

Upendra Kumar added the comment:

@Terry, code updates can be followed on 
https://github.com/upendra-k14/pip_gui/tree/dump_code

Please review the code in dump_code branch. For now, only pip_gui_v3.py is 
relevant. 

1.  I had doubt about including a private module from pip ( "pip._vendor" ). As 
this module contains a lot of important utilites I have included it by copying 
the "_vendor" module in my package and changed all the package references of 
"pip._vendor" to "pip_tkinter._vendor" to make it work. Since, it was a private 
module, I included it by copying it. 

One more reason is that pip has mentioned this module has immutable. There are 
very less chances that further changes in this module will be introduced in 
future.

2.  Except a few complex commands like install, I have planned to inherit the 
pip command classes. For example, I have inherited the 
pip.commands.SearchCommand class from pip and overrided the "run" method. It 
helped me to give finer control over the search results. 

For example,

Now we can retrieve all previous versions of a package ( which is not provided 
by pip ) and search results can be directly obtained in form of tuple lists 
without parsing the output.
But, I think doing something similar for pip.commands.InstallCommand is very 
difficult. Therefore, for now I have chosen to use "runpip and pip.main" for 
pip install command.

--

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-01 Thread Upendra Kumar

Upendra Kumar added the comment:

Actually now we don't need 

"pip list" command to get list of installed distributions.

We can directly get it :

from pip_tkinter._vendor import pkg_resources
installed_packages = [p.project_name for p in pkg_resources.working_set]

--

___
Python tracker 

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



[issue26589] Add HTTP Response code 451

2016-06-01 Thread Nathan Harold

Nathan Harold added the comment:

Added it to the table at 
https://docs.python.org/3.6/library/http.html#http-status-codes and put a 
versionadded notice at the bottom.

--
nosy: +nharold
Added file: http://bugs.python.org/file43086/doctable.diff

___
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-01 Thread Ryan Petrello

Changes by Ryan Petrello :


Added file: 
http://bugs.python.org/file43087/signature-from-callable-skip-bound-arg.patch

___
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-01 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: test needed -> patch review

___
Python tracker 

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



[issue27173] Modern Unix key bindings for IDLE

2016-06-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Original IDLE Dark patch: #24820. Follow-up for cross-version issues (initially 
for themes, but with a eye to keys, etc): #25313.  I intended that 'name2' be 
future proof (msg252372). I believe my idea was that if it were to point to a 
future 4th default theme that did not exist, there would be a graceful fallback 
to 'name', which defaults to IDLE Classic. But I am not sure if I tested this, 
so I should recheck.  If it does not work, a fix should go in all current 
versions. I believe the patch did achieve no warnings for older versions, as 
least on my machine. 

I would have the same goal for keys: no warning, future proof.  A test of the 
latter before committing requires two independent repositories, both with the 
patch, one with the extra definitions.  I currently have two 3.6 repositories 
and will do such a test once we have code that we think should work.

When one selects IDLE Dark as Default Theme, active or not, a subdued red 
message is displayed: "New theme, see Help".  (The latter part should change to 
a more explicit "click 'Help' below" so there is no possible confusion with the 
main menu Help. The Highlighting specific part of the popup suggests saving 
IDLE Dark as a custom theme, with a new name, This makes the theme available to 
older versions and solves compatibility problems.  The same would apply to a 
new key set.

In #24781, Mark Roseman proposed revamping the preferences dialog, both 
externally and internally.  The main idea for the Theme tab is to present users 
with a single list of available themes and (mostly) hide the builtin versus 
custom distinction.  (It cannot be ignored completely as builtins cannot be 
deleted and editing requires saving as custom.)  
https://bugs.python.org/file40111/highlight3.png has an image.  We might 
consider the same idea for key sets.

--

___
Python tracker 

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



[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-01 Thread Berker Peksag

Berker Peksag added the comment:

I agree with all of Carol's suggestions. Also, OSError could be replaced with a 
more appropriate exception such as ValueError.

--
nosy: +berker.peksag
stage:  -> needs patch
versions: +Python 3.5, 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



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

2016-06-01 Thread Yury Selivanov

Yury Selivanov added the comment:

Please don't commit this without my review.

--

___
Python tracker 

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



[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-01 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

+1 for ValueError instead of OSError.

--
nosy: +fdrake

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

Changes by SilentGhost :


--
assignee:  -> yselivanov
stage: patch review -> commit review

___
Python tracker 

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



[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-01 Thread Berker Peksag

Berker Peksag added the comment:

Here is a patch.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file43088/issue23116.diff

___
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-01 Thread Ryan Petrello

Changes by Ryan Petrello :


Added file: 
http://bugs.python.org/file43089/signature-from-callable-skip-bound-arg.patch

___
Python tracker 

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



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

[David, could this be a sprint issue?] 

Here is the difference between python and C coded modules.  The x.y docs are 
for all implementations of x.y.  The python-coded modules are intended for use 
by all implementations, perhaps with minor modifications.  In any case, the 
users of all implementation can presumably read Python code.  The C 
implementations used by CPython are specific to CPython, and not necessarily 
meaningful to user of Jython, IronPython, PyPy, or any other alternatives.

In any case, Guido has unambiguiously pronounced on linking to Python source 
files.  Doing that is enough for one issue.  I changed the title to be specific.

--
title: Missing doc links to source code -> Missing doc links to source code for 
Python-coded modules.

___
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-01 Thread Ryan Petrello

Changes by Ryan Petrello :


Added file: 
http://bugs.python.org/file43090/signature-from-callable-skip-bound-arg.patch

___
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-06-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

New patch makes IDLE silently fall back to default key set and adds a note 
about new key set on Keys configuration tab.

--
Added file: http://bugs.python.org/file43091/idle_modern_unix_key_set3.patch

___
Python tracker 

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



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-01 Thread R. David Murray

R. David Murray added the comment:

You mean someone doing a file review at the sprints?  I can add it to the list. 
 No guarantees about it getting committed at the sprints, though.

If we are linking to the python version of modules that have both python and C 
versions, IMO the existence of the C version should be noted as a CPython 
implementation detail, since otherwise someone might think that the python code 
was what CPython was actually running.

--

___
Python tracker 

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



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-01 Thread R. David Murray

R. David Murray added the comment:

I meant full review, not file review.

--

___
Python tracker 

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



[issue27025] More human readable generated widget names

2016-06-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You can apply show_widget_names.diff to see all widget names. Run IDLE and open 
the configuration dialog for example.

--
Added file: http://bugs.python.org/file43092/show_widget_names.diff

___
Python tracker 

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



[issue27178] Unconverted RST marking in interpreter tutorial

2016-06-01 Thread Nathan Harold

New submission from Nathan Harold:

There's a bit of uninterpreted RST markup:

3.6.. _tut-using:

at the top of the second section of the tutorial 
(https://docs.python.org/3.6/tutorial/interpreter.html) in the documentation 
for 3.6 only.  (I can see this in the offline copy I received with 3.6.0a1 as 
well.)

It appears that this originated in 96328:dfe62f685538, which changed various 
references to Python to say 3.6 instead of 3.5.  This line had formerly just 
said:

.. _tut-using:

My best guess is that this was just an accident.  I can't find a precedent or 
meaning for the changed notation, and there were no similar changes to any 
other files, either.  I've included a patch for this line.

--
assignee: docs@python
components: Documentation
files: fix.diff
keywords: patch
messages: 266840
nosy: docs@python, nharold
priority: normal
severity: normal
status: open
title: Unconverted RST marking in interpreter tutorial
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43093/fix.diff

___
Python tracker 

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



[issue27178] Unconverted RST marking in interpreter tutorial

2016-06-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a2ffc966363e by Berker Peksag in branch 'default':
Issue #27178: Fix markup in tutorial
https://hg.python.org/cpython/rev/a2ffc966363e

--
nosy: +python-dev

___
Python tracker 

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



[issue27178] Unconverted RST marking in interpreter tutorial

2016-06-01 Thread Berker Peksag

Berker Peksag added the comment:

Good catch! Thanks for patch, Nathan.

--
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> 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



[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-01 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith

___
Python tracker 

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



[issue26582] asyncio documentation links to wrong CancelledError

2016-06-01 Thread R. David Murray

R. David Murray added the comment:

ping: Victor or Yuri, do agree that asyncio.CancelledError should be 
documented?  I know that this duality has confused me in the past as well.  I 
don't know if having it documented would have helped me ahead of time, but at 
least it could have cleared up my puzzlement as to why I was seeing a 
concurrent.futures exception when I didn't think I was using concurrent.futures 
:)

I do wonder what the OPs actual problem was with catching the exception.

--
nosy: +r.david.murray, yselivanov

___
Python tracker 

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



[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-01 Thread R. David Murray

R. David Murray added the comment:

They aren't currently defined conditionally, though, and haven't ever been, so 
I'm not sure it is worth chaning that.  However, we should probably add an 
'availability' line, since they aren't (effectively) available on Windows.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib), Windows
nosy: +docs@python, r.david.murray
stage:  -> needs patch

___
Python tracker 

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



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

If someone does a full review (looks at each diff in Rietveld to see if it 
matches the intended format -- see Yoni's 4-19 message, with
:source:`Lib/mod.py` (lib2to3 is an exception) following **Source code:**
-- and then downloads patch, applies, builds new html doc, and tests a few of 
the new links, and find nothing wrong, and says 'ready for commit review) then 
I may take this, re-check, and commit.

--

___
Python tracker 

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



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-01 Thread Yoni Lavi

Yoni Lavi added the comment:

Thank you for looking at this.

David, concerning modules that have multiple sources, are you referring to 
modules such as `stat` and `heapq`? In these, it's the Python source that tries 
to import the C module if it's available, so I'd consider it ok to leave just a 
link to the Python source.

--

___
Python tracker 

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



[issue19012] urllib2: bad proxy configuration throws "getaddrinfo" error

2016-06-01 Thread R. David Murray

R. David Murray added the comment:

Closing because no reproducer provided.

--
resolution:  -> works for me
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



[issue16964] Add 'm' format specifier for mon_grouping etc.

2016-06-01 Thread R. David Murray

Changes by R. David Murray :


--
stage: needs patch -> patch review
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



[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-01 Thread Martin Panter

Martin Panter added the comment:

You should be able to use a compression (or decompression) object as a 
workaround. But calling zlib.compress() multiple times would generate multiple 
separate deflated streams, which is different.

I think it is reasonable for Python to handle larger data sizes for zlib. (In 
theory, the 4 GiB UINT_MAX limit is platform-dependent.) IMO it is a matter of 
writing the patch(es), and perhaps depending on the complexity, deciding 
whether to apply them to 2.7 etc or just the next version of Python 3 (risk vs 
reward).

Alternatively (or in the mean time), I guess we could document the limitation.

--

___
Python tracker 

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



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-01 Thread R. David Murray

R. David Murray added the comment:

Yes, those should be OK.  I was thinking of _pyio and _pydecimal, but I don't 
know if you are linking to those.

--

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-06-01 Thread Dāvis

New submission from Dāvis:

subprocess uses wrong encoding on Windows.


On Windows 10 with Python 3.5.1
from Command Prompt (cmd.exe)
> chcp 65001
> python -c "import subprocess; subprocess.getstatusoutput('ā')"
Traceback (most recent call last):
  File "", line 1, in 
  File "P:\Python35\lib\subprocess.py", line 808, in getstatusoutput
data = check_output(cmd, shell=True, universal_newlines=True, stderr=STDOUT)
  File "P:\Python35\lib\subprocess.py", line 629, in check_output
**kwargs).stdout
  File "P:\Python35\lib\subprocess.py", line 698, in run
stdout, stderr = process.communicate(input, timeout=timeout)
  File "P:\Python35\lib\subprocess.py", line 1055, in communicate
stdout = self.stdout.read()
  File "P:\Python35\lib\encodings\cp1257.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2: 
character maps to 


from PowerShell
> [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
> python -c "import subprocess; subprocess.getstatusoutput('ā')"
Traceback (most recent call last):
  File "", line 1, in 
  File "P:\Python35\lib\subprocess.py", line 808, in getstatusoutput
data = check_output(cmd, shell=True, universal_newlines=True, stderr=STDOUT)
  File "P:\Python35\lib\subprocess.py", line 629, in check_output
**kwargs).stdout
  File "P:\Python35\lib\subprocess.py", line 698, in run
stdout, stderr = process.communicate(input, timeout=timeout)
  File "P:\Python35\lib\subprocess.py", line 1055, in communicate
stdout = self.stdout.read()
  File "P:\Python35\lib\encodings\cp1257.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2: 
character maps to 



As you can see even if consoles encoding is UTF-8 it still uses Windows ANSI 
codepage 1257
this happens because io.TextIOWrapper is used with default encoding which is 
locale.getpreferredencoding(False)
but that's wrong because that's not console's encoding.
I've attached a patch which fixes this by using correct console encoding with 
sys.stdout.encoding

Only note that there's different bug that when python is executed inside 
PowerShell's group expression then sys.stdout.encoding will be wrong

> [Console]::OutputEncoding.EncodingName
Unicode (UTF-8)
> ([Console]::OutputEncoding.EncodingName)
Unicode (UTF-8)
> python -c "import sys; print(sys.stdout.encoding)"
cp65001
> (python -c "import sys; print(sys.stdout.encoding)")
cp1257

it still should be cp65001 and that's why in this case subprocess will still 
fail even with my patch, but this some different bug.

--
components: IO, Library (Lib), Unicode, Windows
files: subprocess_fix_encoding.patch
keywords: patch
messages: 266852
nosy: davispuh, ezio.melotti, haypo, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: subprocess uses wrong encoding on Windows
type: behavior
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43094/subprocess_fix_encoding.patch

___
Python tracker 

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



[issue27025] More human readable generated widget names

2016-06-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

To make the experiment easy to repeat, say after the patch, I wrote this.  
(Perhaps inspired by Ned Batchelder's 'machete debugging' PyCon talk.)

import tkinter as tk
from idlelib.configdialog import ConfigDialog
_realsetup = tk.BaseWidget._setup
def _wrapsetup(self, master, cnf):
_realsetup(self, master, cnf)
print(self.widgetName, self._w)
tk.BaseWidget._setup = _wrapsetup
root = tk.Tk()
ConfigDialog(roo)
ttk.BaseWidget._setup = _realsetup

Observations: the longest path rather long: ...  The root to 
widget paths collectively represent a tree and, sorted, could be used to 
populate a tree widget, such as a Treeview.  With the proposed new names, this 
would give one a useful overview of the total gui, or a part thereof.

If one subclasses a widget, such as class MyFrame(Frame, would the instance 
.widgetName used in the patch 'Frame' or 'MyFrame'?  The latter would make the 
treeview really useful, and reward judicious subclassing.

--

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-06-01 Thread STINNER Victor

STINNER Victor added the comment:

What is the ā command? Where does it come from? What is its output? Do you know 
the encoding of its output? It remembers me the "set" issue in distutils: issue 
#27048.

--

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-06-01 Thread Dāvis

Dāvis added the comment:

there's no such "ā" command, it's just used to get non-ASCII output

cmd will return:
'ā' is not recognized as an internal or external command,
operable program or batch file.


and this will be encoded in consoles encoding (UTF8 in my example or whatever 
chcp is set to) which Python will fail to read as it will use 
locale.getpreferredencoding(False) instead of sys.stdout.encoding


see attached patch, it fixes this problem, you can try reproduce yourself.

--

___
Python tracker 

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



[issue12243] getpass.getuser works on OSX

2016-06-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c13198a2007e by Berker Peksag in branch '3.5':
Issue #12243: Remove redundant availability notes from getpass docs
https://hg.python.org/cpython/rev/c13198a2007e

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

--
nosy: +python-dev

___
Python tracker 

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



[issue12243] getpass.getuser works on OSX

2016-06-01 Thread Berker Peksag

Berker Peksag added the comment:

See issue 11233 for the availability directive patch. Thanks for the patch, 
Bryce.

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



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-01 Thread Yoni Lavi

Yoni Lavi added the comment:

Ah, thanks for the explanation. I think in this case we're ok too.
I linked io.rst to Lib/io.py, which relies on the C version. And in the case of 
decimal.rst, it was already linked to Lib/decimal.py which very explicitly 
attempts to load the C version and falls back to _pydecimal.

--

___
Python tracker 

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



[issue12243] getpass.getuser works on OSX

2016-06-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 98870f27d2ed by Berker Peksag in branch '2.7':
Issue #12243: Remove redundant availability notes from getpass docs
https://hg.python.org/cpython/rev/98870f27d2ed

--

___
Python tracker 

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



[issue27025] More human readable generated widget names

2016-06-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Try this instead.

import tkinter as tk
from idlelib.configdialog import ConfigDialog
from idlelib import macosx

_realsetup = tk.BaseWidget._setup
def _wrapsetup(self, master, cnf):
_realsetup(self, master, cnf)
print(self.widgetName, self._w)
tk.BaseWidget._setup = _wrapsetup

root = tk.Tk()
macosx._initializeTkVariantTests(root)
ConfigDialog(root)
tk.BaseWidget._setup = _realsetup

--

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-06-01 Thread Dāvis

Dāvis added the comment:

I looked at #27048 and indeed it's affected by this bug, it happens to me too 
(I've non-ASCII symbols in %PATH%) and this my patch fixes that.


on my system without patch

> python -c "from distutils import _msvccompiler; _msvccompiler._get_vc_env('')"
Traceback (most recent call last):
  File "", line 1, in 
  File "P:\Python35\lib\distutils\_msvccompiler.py", line 92, in _get_vc_env
universal_newlines=True,
  File "P:\Python35\lib\subprocess.py", line 629, in check_output
**kwargs).stdout
  File "P:\Python35\lib\subprocess.py", line 698, in run
stdout, stderr = process.communicate(input, timeout=timeout)
  File "P:\Python35\lib\subprocess.py", line 1055, in communicate
stdout = self.stdout.read()
  File "P:\Python35\lib\encodings\cp1257.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x83 in position 50: 
character maps to 

with my patch

> python -c "from distutils import _msvccompiler; _msvccompiler._get_vc_env('')"
>
no error

--

___
Python tracker 

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



[issue6443] _winreg.QueryValueEx confused on double null terminated strings

2016-06-01 Thread Tony Grue

Tony Grue added the comment:

I see this was closed,though it sounds like it's because a work around is 
found, not because the code now handles multiple null values in a row.

Looking at code from the github mirror (pasted below); it looks like the issue 
is that the countStrings function breaks out of iterating in the for loop, even 
if it hasn't reached the end of the buffer.

File PC/winreg.c:

static int
countStrings(wchar_t *data, int len)
{
int strings;
wchar_t *P;
wchar_t *Q = data + len;

for (P = data, strings = 0; P < Q && *P != '\0'; P++, strings++)
for (; P < Q && *P != '\0'; P++)
;
return strings;
}

--
nosy: +Tony Grue
versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 
3.6

___
Python tracker 

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



[issue22374] Replace contextmanager example and improve explanation

2016-06-01 Thread Berker Peksag

Berker Peksag added the comment:

We also have swap_attr() and swap_item() helpers in 
Lib/test/support/__init__.py. I've used a simplified version of swap_attr() in 
my patch.

Since this is basically a document improvement I removed Python 2.7 from the 
versions field.

--
keywords: +patch
nosy: +berker.peksag
stage:  -> patch review
type:  -> enhancement
versions: +Python 3.6 -Python 2.7, Python 3.4
Added file: http://bugs.python.org/file43095/issue22374.diff

___
Python tracker 

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



[issue8519] doc: termios and ioctl reference links

2016-06-01 Thread Berker Peksag

Berker Peksag added the comment:

+1 for using the manpage directives.

--
keywords: +easy
nosy: +berker.peksag
stage:  -> needs patch
type:  -> enhancement
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



[issue20693] Sidebar scrolls down 2x as fast as page content

2016-06-01 Thread Berker Peksag

Changes by Berker Peksag :


--
status: pending -> closed

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-06-01 Thread Martin Panter

Martin Panter added the comment:

I don’t know much about the conventions for stdout etc encoding on Windows. But 
in general, the patch does not seem robust. Does it work if sys.stdout is a 
pipe or file (not a console)? I doubt it will work when sys.stdout has been 
replaced by e.g. StringIO, and sys.stdout.encoding is None. Maybe you could use 
sys.__stdout__. But then, what happens when you run Python without any stdout 
at all, say in a GUI like Idle?

On Linux, the patch may have no effect in common cases. But again, it will 
break if sys.stdout has been replaced, or is set to None.

Looking at _Py_device_encoding() in Python/fileutils.c, perhaps you need a 
Windows-specific interface to GetConsoleCP() and GetConsoleOutputCP() that 
subprocess can use.

--
nosy: +martin.panter
stage:  -> patch review

___
Python tracker 

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



[issue18085] Verifying refcounts.dat

2016-06-01 Thread Berker Peksag

Berker Peksag added the comment:

Can we now close this as a duplicate of issue 9755?

--
nosy: +berker.peksag

___
Python tracker 

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



[issue18384] Add devhelp build instructions to the documentation makefile

2016-06-01 Thread Berker Peksag

Berker Peksag added the comment:

I think we should avoid adding distro specific tools into CPython repository 
(and the another reason to reject this is that the other distros will probably 
want to add their tools).

--
nosy: +berker.peksag
resolution:  -> rejected
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



[issue9755] Fix refcounting details in Py3k C API documentation

2016-06-01 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

As mentioned in issue 18085, the original file was not generated, but crafted 
by hand (though I don't think that really matters).

--

___
Python tracker 

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



[issue18085] Verifying refcounts.dat

2016-06-01 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

I don't think this is a duplicate of issue 9755; this relates to verifying the 
data, and that revolves around possible process improvements.

Whether this issue should be closed is tied to whether the file has been 
verified, as the issue title suggests.

I don't know whether Serhiy verified everything when he made his changes or 
not; that's not explicit in the issue or commit comments.

--

___
Python tracker 

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



[issue20825] containment test for "ip_network in ip_network"

2016-06-01 Thread James Schneider

James Schneider added the comment:

I'd like to ask for a status on getting this merged? 

As a network administrator, these changes would have a magical effect on my 
code dealing with routing tables and ACL's.

--
nosy: +James Schneider

___
Python tracker 

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



[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-01 Thread Xiang Zhang

Xiang Zhang added the comment:

Yes. It's compression object not compress.

I find more. The overflow checking is introduced to solve problem in issue8650. 
It seems the explicit overflow checking is introduced to keep compatibility 
with py2 (py2 raises the overflowerror in pyargparse).

I support loosing the limitation, but now it can only go into the next version 
of py3.

--
nosy: +nadeem.vawda

___
Python tracker 

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



[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-01 Thread Martin Panter

Martin Panter added the comment:

Thanks for the patches. Maybe Gregory knows more about this than I do (I never 
used zdict). But I think I have figured it out today, so I left some review 
comments :)

I’m not sure whether this really is a bug fix, although it would have little if 
any impact on existing code. It seems zdict was implemented with just the 
non-raw zlib format in mind, so supporting raw deflate mode is a new feature. 
If we were to add full support of inflateSetDictionary() for raw deflate mode, 
I imagine it would be a new decompressobj.set_dictionary() method.

I did some quick tests with specifying an unnecessary zdict buffer to the 
decompressor (when zdict not used for compression), and it doesn’t _seem_ to 
break anything, but I am not 100% sure.

Notes from my learning what zdict means:

Zdict seems to be a bunch of user data to setup or train the (de)compressor 
with. It was added by Issue 14684. (Not a Python dictionary, nor any special 
zlib dictionary format. The Python documentation is confusing, and the Go 
documentation made more sense, assuming it is equivalent.)

See the documentation of in/deflateSetDictionary() in 
 or zlib.h. Looking through the history at 
 can also be useful.

--
stage:  -> patch review

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-06-01 Thread Steve Dower

Steve Dower added the comment:

Even sys.__stdout__ can be missing. In this context, falling back on the 
default encoding is probably fine, but for 3.6 I'd like to make everything 
default to UTF-8 on Windows, and force the console mode on startup (restore on 
finalize) - apart from the input() implementation it's fairly straightforward.

But don't hold up an immediate fix on that change, just be aware that I'm 
tinkering with a good long-term fix.

--

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-06-01 Thread Eryk Sun

Eryk Sun added the comment:

There is no right encoding as far as I can see. 

If it's attached to a console (i.e. conhost.exe), then cmd.exe uses the 
console's output codepage when writing to a pipe or file, which is the scenario 
that your patch attempts to address. But if you pass 
creationflags=CREATE_NO_WINDOW, then the new console (created without a window) 
uses the OEM codepage, CP_OEMCP. And if you pass creationflags=DETACHED_PROCESS 
(i.e. no console), cmd uses the ANSI codepage, CP_ACP. There's also a "/u" 
option to force cmd to use the native Unicode encoding on Windows, UTF-16LE.

Note that the above only considers cmd.exe. Its child processes can write 
output using any encoding. You may end up with several different encodings 
present in the same stream. Many, if not most, programs don't use the console's 
current codepage when writing to a pipe or file. Commonly they default to OEM, 
ANSI, UTF-8, or UTF-16LE. For example, Windows Python uses ANSI for standard 
I/O that's not a console, unless you set PYTHONIOENCODING. 

Even if a called program cares about the console output codepage, your patch 
doesn't implement this robustly. It uses sys.stdout and sys.stderr, but those 
can be reassigned. Even sys.__stdout__ and sys.__stderr__ may be irrelevant. 
Python could be run via pythonw.exe for which the latter are None (unless it's 
started with non-NULL standard handles). Or python.exe could be run with 
standard I/O redirected to pipes or files, defaulting to ANSI. Also, the 
current program or called program could change the console encoding via 
chcp.com, which is just an indirect way of calling the WinAPI functions 
SetConsoleCP and SetConsoleOutputCP. 

There's no common default encoding for standard I/O on Windows, especially not 
a common UTF encoding, so universal_newlines=True, getoutput, and 
getstatusoutput may be of limited use. Preferably a calling program can set an 
option like cmd's "/u" or Python's PYTHONIOENCODING to force using a Unicode 
encoding, and then manually decode the output by wrapping stdout/stderr in 
instances of io.TextIOWrapper. It would help if subprocess.Popen had parameters 
for encoding and errors.

--
nosy: +eryksun

___
Python tracker 

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



[issue27025] More human readable generated widget names

2016-06-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1 I think would be a nice improvement.

--
nosy: +rhettinger

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-06-01 Thread Martin Panter

Martin Panter added the comment:

I think Issue 6135 has a bit of discussion on adding encoding and error 
parameters to subprocess.Popen etc.

--

___
Python tracker 

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



[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-01 Thread Xiang Zhang

Xiang Zhang added the comment:

Thanks for your review, Martin. :) I have replied with after thinking and try.

Yes, this is more like a feature request. But for the end user, this behaviour 
is quite like a bug.

> If we were to add full support of inflateSetDictionary() for raw deflate 
> mode, I imagine it would be a new decompressobj.set_dictionary() method.

I don't support adding a new set_dictionary() method. Right now decompressobj 
handles raw deflate format, zlib format and gzip format. Adding a 
set_dictionary() method for raw deflate format seems weird. If we are going to 
do so, I suggest reorganize the zlib like PHP and nodejs do, separating 
different formats into different objects.

> I did some quick tests with specifying an unnecessary zdict buffer to the 
> decompressor (when zdict not used for compression), and it doesn’t _seem_ to 
> break anything, but I am not 100% sure.

This patch only affects raw inflate. You have to set wbits negative. If you are 
decompressing with an unnecessary zdict, I think it ought to emit an error.

With Python background, zlib dictionary is really hard to understand. I think 
manual doesn't tell much. I understand why zdict is needed until reading 
https://blog.cloudflare.com/improving-compression-with-preset-deflate-dictionary/.

--

___
Python tracker 

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



[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2016-06-01 Thread Martin Panter

Martin Panter added the comment:

Patch v4 resolves conflicts against the current code. I also used AC_CHECK_DECL 
invocations instead of AC_COMPILE_IFELSE in the configure script.

FTR I think my problems with the prompt and the terminal settings are caused by 
a line of code that is commented out in the Apple version. See 
 and 
.
 Also, the following test fails for me when using Editline:

==
ERROR: testHistoryUpdates (test.test_readline.TestHistoryManipulation)
--
Traceback (most recent call last):
  File "/home/proj/python/cpython/Lib/test/test_readline.py", line 38, in 
testHistoryUpdates
readline.replace_history_item(0, "replaced line")
ValueError: No history item at position 0

Third, test_zipimport passes, but messes up the terminal (staircase effect). 
Probably related to the Apple patch mentioned above.

--
Added file: http://bugs.python.org/file43096/editline.v4.patch

___
Python tracker 

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