[issue13691] pydoc help (or help('help')) should show the doc for help

2017-02-18 Thread Jaysinh shukla

Changes by Jaysinh shukla :


--
nosy: +jaysinh.shukla

___
Python tracker 

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



[issue29533] urllib2 works slowly with proxy on windows

2017-02-18 Thread Julia Dolgova

Julia Dolgova added the comment:

I compared the behavior of IE and urllib.
I put different addresses to the  ("Do not use proxy server 
for address beginning with" setting), made different requests through IE and 
urllib and watched if the proxy was bypassed.

IE doesn't even make a forward dns lookup for the hosname given to check 
whether it should bypass proxy, whereas urllib does.

For example:
proxy_bypass_list   request  IE bypasses proxy   
urllib bypasses proxy
23.253.135.79   https://python.org/  no  yes
151.101.76.223  https://docs.python.org/ no  yes
ovinnik.canonical.com   https://ubuntu.com/  no  yes

compare_ie_urllib.txt - full report

--
Added file: http://bugs.python.org/file46649/compare_ie_urllib.txt

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:

Serhiy posted a patch at http://bugs.python.org/issue29537 that addresses the 
original problem from http://bugs.python.org/issue27286 in a different way: it 
simply omits the function name in cases where the stack reference is ambiguous.

So what I think we should do for 3.5.4 is implement the one-off patch that 
allows the remainder of the 3.5.x series to accept both the original 3.5.0 
magic number and the 3.5.3+ magic number, in combination with Serhiy's change 
to the eval loop to render any malformed legacy bytecode harmless.

The 2.7, 3.6 and master branches can then just get the test case that locks the 
bytecode to a particular value in any given branch that has reached release 
candidate status.

--

___
Python tracker 

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



[issue26128] Let the subprocess.STARTUPINFO constructor take arguments

2017-02-18 Thread Subhendu Ghosh

Changes by Subhendu Ghosh :


--
nosy: +subho

___
Python tracker 

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



[issue13691] pydoc help (or help('help')) should show the doc for help

2017-02-18 Thread Sanyam Khurana

Changes by Sanyam Khurana :


--
pull_requests: +138

___
Python tracker 

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



[issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:

In putting together a PR for this, I think it *only* makes sense if we also 
push Petr's change upstream to accept the legacy bytecode files in 3.5.4+.

The reason is that the patch actually causes a test case to fail due to "f()" 
change to "function" in an error message.

--

___
Python tracker 

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



[issue26128] Let the subprocess.STARTUPINFO constructor take arguments

2017-02-18 Thread Subhendu Ghosh

Changes by Subhendu Ghosh :


--
pull_requests: +137

___
Python tracker 

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



[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread Jaysinh shukla

Changes by Jaysinh shukla :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread Jaysinh shukla

Changes by Jaysinh shukla :


--
pull_requests: +136

___
Python tracker 

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



[issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5

2017-02-18 Thread Nick Coghlan

Changes by Nick Coghlan :


--
pull_requests: +135

___
Python tracker 

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



[issue27286] str object got multiple values for keyword argument

2017-02-18 Thread Nick Coghlan

Changes by Nick Coghlan :


--
pull_requests: +134

___
Python tracker 

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



[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread Jim DeLaHunt

Jim DeLaHunt added the comment:

Jaysinh, thank you for checking.  From your log, I see you are using Sphinx 
version 1.3.6.  I am seeing this problem with Sphinx version 1.5.2.  I think 
you need Sphinx 1.5.2 or later to see the warning message.

I notice my original bug description didn't specify a Sphinx version. Now we 
know that it needs to be a fairly recent version of Sphinx.

>From the discussion in https://github.com/sphinx-doc/sphinx/issues/2986, it 
>looks like the Sphinx team added the warning message at or shortly after the 
>release of 1.5.0.

--

___
Python tracker 

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



[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-18 Thread Vinay Sajip

Vinay Sajip added the comment:

PR submitted.

--
stage: needs patch -> patch review

___
Python tracker 

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



[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-18 Thread Vinay Sajip

Changes by Vinay Sajip :


--
pull_requests: +133

___
Python tracker 

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



[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-18 Thread Vinay Sajip

Changes by Vinay Sajip :


--
pull_requests: +132

___
Python tracker 

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



[issue16285] Update urllib quoting to RFC 3986

2017-02-18 Thread Nick Coghlan

Changes by Nick Coghlan :


--
versions: +Python 3.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



[issue29592] abs_paths() in site.py is slow

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:

Aye, I agree it should be redundant now - import system should always be making 
__file__ and __cached__ absolutely at import time these days.

So +1 for dropping this from 3.7 and getting a bit of startup time back.

--

___
Python tracker 

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



[issue29592] abs_paths() in site.py is slow

2017-02-18 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +131

___
Python tracker 

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



[issue13691] pydoc help (or help('help')) should show the doc for help

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:

Recapping the situations that need test cases before this can be merged:

* behaviour when "help" is entered at the interactive help prompt (as the 
current behaviour is correct and should *not* change)
* behaviour when calling "help(help)"
* behaviour when calling "help('help')"
* behaviour when running "python3 -m pydoc help"

In the latter 3 cases, the default site._Helper docs currently shown are not 
particularly helpful.

It does make me wonder whether it might be worth defining a __help__ magic 
method that completely overrides what help(obj) displays. It would limit the 
fix to 3.7+, but it would make it possible to do this cleanly just by defining 
__help__ on site._Helper.

--
nosy: +ncoghlan
versions: +Python 3.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



[issue29526] Documenting format() function

2017-02-18 Thread Amit Kumar

Changes by Amit Kumar :


--
pull_requests: +130

___
Python tracker 

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



[issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2017-02-18 Thread Vinay Sajip

Vinay Sajip added the comment:

When adding the fix for #20160 I had added a test involving passing a struct by 
value to a Python callback. I modified that test to update the struct in the 
callback, and check that the passed-in struct hadn't changed.

def test_callback_large_struct(self):
class Check: pass

class X(Structure):
_fields_ = [
('first', c_ulong),
('second', c_ulong),
('third', c_ulong),
]

def callback(check, s):
check.first = s.first
check.second = s.second
check.third = s.third
# See issue #29565.
# The structure should be passed by value, so
# any changes to it should not be reflected in
# the value passed
s.first = s.second = s.third = 0x0badf00d

check = Check()
s = X()
s.first = 0xdeadbeef
s.second = 0xcafebabe
s.third = 0x0bad1dea

CALLBACK = CFUNCTYPE(None, X)
dll = CDLL(_ctypes_test.__file__)
func = dll._testfunc_cbk_large_struct
func.argtypes = (X, CALLBACK)
func.restype = None
# the function just calls the callback with the passed structure
func(s, CALLBACK(functools.partial(callback, check)))
self.assertEqual(check.first, s.first)
self.assertEqual(check.second, s.second)
self.assertEqual(check.third, s.third)
self.assertEqual(check.first, 0xdeadbeef)
self.assertEqual(check.second, 0xcafebabe)
self.assertEqual(check.third, 0x0bad1dea)
# See issue #29565.
# Ensure that the original struct is unchanged.
self.assertEqual(s.first, check.first)
self.assertEqual(s.second, check.second)
self.assertEqual(s.third, check.third)

The changed test still passes, so it looks like ctypes makes a copy when 
passing from C to a Python callback, but not when passing from Python to C.

--

___
Python tracker 

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



[issue28909] Adding LTTng-UST tracing support

2017-02-18 Thread Peter McCormick

Peter McCormick added the comment:

A few suggestions:

 * Disallow `--with-lttngust` on anything other than Linux (on macOS 
`configure` dies due to differences in acceptable `mktemp` arguments if you 
even attempt it)
 * Rename `cpython_inst.h` to `pytrace.h` and rename `pylttngust_probes.h` to 
`pytrace_lttngust_probes.h`
- While we're at it, rename `pydtrace.h` to `pytrace_dtrace.h`, and 
other mentions of `PyDTrace_*` to `PyTrace_DTrace_*`?
 * Define a `WITH_TRACE` or `Py_TRACE` or similar preprocessor symbol 
 * Using that symbol, in `Python/ceval.c` ifdef-guard the static function 
prototypes and function calls
- Otherwise when BOTH DTrace and LTTng-UST are disabled, Clang on macOS 
gives `warning: code will never be executed` warnings on the various arms of 
the `if (PyTraceEnabled(...))` statements, and GCC on Linux warn about unused 
variables `lineno`, `funcname` and `filename` in 
`pytrace_function_{entry,return}`, since the actual use of those variables as 
arguments is preprocessed out of existance

If everyone was in agreement, would it make sense to sequence this as first the 
generalization-renames to the existing DTrace/SystemTap code, and then recast 
the LTTng addition patch on top of those? I'd be happy to do this.

So, `PyTrace` or `PyTracing`?

--

___
Python tracker 

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



[issue13691] pydoc help (or help('help')) should show the doc for help

2017-02-18 Thread Sanyam Khurana

Sanyam Khurana added the comment:

Hi, I'm working on fixing this issue.

--
nosy: +CuriousLearner

___
Python tracker 

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



[issue23890] assertRaises increases reference counter

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:

I've been looking into this further, and a reproducer that's independent of 
assertRaises() is to just bind the function to a local variable name in an 
outer function:

def outer():
callable_obj = f
try:
callable_obj()
except Exception as exc:
return exc

That should make it easier to test a basic recursive "clear_all_frames" 
operation like:

def clear_all_frames(exc):
cause = exc.__cause__
if cause is not None:
clear_all_frames(cause)
context = exc.__context__
if context is not None:
clear_all_frames(context)
traceback.clear_frames(exc.__traceback__)

--

___
Python tracker 

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



[issue29521] Minor warning messages when compiling documentation

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:


New changeset 24bfe15e83c24bf2c2e2654050da809553789002 by Nick Coghlan in 
branch '3.5':
[backport to 3.5] bpo-29529: Add .travis.yml to 3.5 branch (#26)
https://github.com/python/cpython/commit/24bfe15e83c24bf2c2e2654050da809553789002


--

___
Python tracker 

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



[issue29529] Backport Travis configuration

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:


New changeset 24bfe15e83c24bf2c2e2654050da809553789002 by Nick Coghlan in 
branch '3.5':
[backport to 3.5] bpo-29529: Add .travis.yml to 3.5 branch (#26)
https://github.com/python/cpython/commit/24bfe15e83c24bf2c2e2654050da809553789002


--

___
Python tracker 

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



[issue29529] Backport Travis configuration

2017-02-18 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +129

___
Python tracker 

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



[issue29529] Backport Travis configuration

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:


New changeset 3337d33a4518f7ab8a7ab6c9a75b8b92ba348b27 by Nick Coghlan in 
branch '3.6':
[backport to 3.6] bpo-29529: Add .travis.yml to 3.6 branch (#25)
https://github.com/python/cpython/commit/3337d33a4518f7ab8a7ab6c9a75b8b92ba348b27


--
nosy: +ncoghlan

___
Python tracker 

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



[issue29521] Minor warning messages when compiling documentation

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:


New changeset 3337d33a4518f7ab8a7ab6c9a75b8b92ba348b27 by Nick Coghlan in 
branch '3.6':
[backport to 3.6] bpo-29529: Add .travis.yml to 3.6 branch (#25)
https://github.com/python/cpython/commit/3337d33a4518f7ab8a7ab6c9a75b8b92ba348b27


--

___
Python tracker 

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



[issue28909] Adding LTTng-UST tracing support

2017-02-18 Thread Peter McCormick

Peter McCormick added the comment:

Fork at 
 with 
Francis' original patch, plus a revert for the DTrace provider name change.

Here are instructions I used to try this out:

## LTTng installation

Full installation instructions for LTTng are available at 
. On Ubuntu 19.04 you can currently install LTTng 
v2.7 from the `universe` repository if it is enabled:

```shell
$ apt-get install lttng-tools lttng-modules-dkms liblttng-ust-dev babeltrace
```

## Building

Clone/fetch/checkout from 
 and 
run:

```shell
$ ./configure --with-lttngust
$ make
```

## Tracing a session

LTTng operates around the concept of tracing selected userspace & kernelspace 
events of interest within the context of a session, so let's start one and run 
the instrumented interpreter to see what happens:

```shell
$ lttng create 'pysession'
$ lttng enable-event --userspace 'cpython:*'
$ lttng start
$ ./python -m this
$ lttng stop
$ lttng view | wc -l
48257
$ lttng view
[23:50:04.493873655] (+?.?) keflavik cpython:gc__start: { cpu_id = 1 }, 
{ generation = 0 }
[23:50:04.493910472] (+0.36817) keflavik cpython:gc__done: { cpu_id = 1 }, 
{ collected = 0 }
[23:50:04.494281326] (+0.000370854) keflavik cpython:gc__start: { cpu_id = 1 }, 
{ generation = 0 }
[23:50:04.494305307] (+0.23981) keflavik cpython:gc__done: { cpu_id = 1 }, 
{ collected = 0 }
[23:50:04.495031049] (+0.000725742) keflavik cpython:gc__start: { cpu_id = 1 }, 
{ generation = 0 }
[23:50:04.495074272] (+0.43223) keflavik cpython:gc__done: { cpu_id = 1 }, 
{ collected = 0 }
[23:50:04.495403759] (+0.000329487) keflavik cpython:function__entry: { cpu_id 
= 1 }, { co_filename = "", co_name = "", 
line_no = 8 }
[23:50:04.495405056] (+0.01297) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "", line_no = 
8 }
[23:50:04.495406486] (+0.01430) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "", line_no = 
25 }
[23:50:04.495407149] (+0.00663) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "", line_no = 
27 }
[23:50:04.495408921] (+0.01772) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "", line_no = 
35 }
[23:50:04.495409618] (+0.00697) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "", line_no = 
42 }
[23:50:04.495410775] (+0.01157) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "", line_no = 
44 }
[23:50:04.495412006] (+0.01231) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "", line_no = 
47 }
[23:50:04.495421990] (+0.09984) keflavik cpython:function__entry: { cpu_id 
= 1 }, { co_filename = "", co_name = 
"_DeadlockError", line_no = 47 }
[23:50:04.495422496] (+0.00506) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "_DeadlockError", 
line_no = 47 }
[23:50:04.495423317] (+0.00821) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "_DeadlockError", 
line_no = 48 }
[23:50:04.495424559] (+0.01242) keflavik cpython:function__return: { cpu_id 
= 1 }, { co_filename = "", co_name = 
"_DeadlockError", line_no = 48 }
[23:50:04.495468551] (+0.43992) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "", line_no = 
51 }
[23:50:04.495470096] (+0.01545) keflavik cpython:function__entry: { cpu_id 
= 1 }, { co_filename = "", co_name = 
"_ModuleLock", line_no = 51 }
[23:50:04.495470570] (+0.00474) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "_ModuleLock", line_no 
= 51 }
[23:50:04.495471249] (+0.00679) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "_ModuleLock", line_no 
= 55 }
[23:50:04.495471746] (+0.00497) keflavik cpython:line: { cpu_id = 1 }, { 
co_filename = "", co_name = "_ModuleLock", line_no 
= 57 }
...
```

The raw trace files will be written under 
`~/lttng-traces/pysession-$TIMESTAMP`. To clean them up afterwards, you can run:

```shell
$ lttng destroy
```

## GitHub

I would be happy to re-post this to GitHub issues if so desired.

--
hgrepos: +367
nosy: +pdmccormick

___
Python tracker 

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



[issue29571] test_re is failing when local is set for `en_IN`

2017-02-18 Thread Nick Coghlan

Changes by Nick Coghlan :


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



[issue29571] test_re is failing when local is set for `en_IN`

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:


New changeset 760f596b6a4b5514afe35e521621f484aef35413 by GitHub in branch 
'3.5':
[3.5] bpo-29571: Use correct locale encoding in test_re (#149) (#154)
https://github.com/python/cpython/commit/760f596b6a4b5514afe35e521621f484aef35413


--

___
Python tracker 

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



[issue29571] test_re is failing when local is set for `en_IN`

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:


New changeset 0683d6889bd4430599d22e12e201b8e9c45be5a2 by GitHub in branch 
'3.6':
[3.6] bpo-29571: Use correct locale encoding in test_re (#149) (#153)
https://github.com/python/cpython/commit/0683d6889bd4430599d22e12e201b8e9c45be5a2


--

___
Python tracker 

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



[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread INADA Naoki

INADA Naoki added the comment:

Could docs.python.org use new Sphinx, after fix this issue?

Travis checks doc with Sphinx 1.5.2, but docs.python.org seems using 1.3.3.  
It's too old.

--

___
Python tracker 

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



[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +128

___
Python tracker 

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



[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread INADA Naoki

INADA Naoki added the comment:

ref: https://github.com/sphinx-doc/sphinx/issues/2986

--

___
Python tracker 

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



[issue29453] Remove reference to undefined dictionary ordering in Tutorial

2017-02-18 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks for the revision.  Assigning to Mariatta so that she can apply the PR.

--
assignee: serhiy.storchaka -> Mariatta
nosy: +Mariatta

___
Python tracker 

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



[issue29579] Windows Python 3.7 installer broken by README.txt renamed to README.rst

2017-02-18 Thread Steve Dower

Changes by Steve Dower :


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



[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread INADA Naoki

INADA Naoki added the comment:

I can reproduce it with Sphinx 1.5.2.
Additonally, "None" is shown at top.

--
nosy: +inada.naoki
Added file: http://bugs.python.org/file46648/sphinx-1.5-pydoc.png

___
Python tracker 

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



[issue29520] Documentation uses deprecated "defindex.html" Sphinx template

2017-02-18 Thread Jaysinh shukla

Jaysinh shukla added the comment:

Hello Jim,
I tried to run `make html` on `/Doc` directory at latest master. I was not 
able to reproduce this warning message. I am attaching console output I got 
while building the documentation with this issue. I request you to check that 
once. Will you re-install the dependancy and check for this issue once again? 
Many thanks!

--
nosy: +jaysinh.shukla
Added file: http://bugs.python.org/file46647/doc_logs_python.log

___
Python tracker 

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



Re: How to access installed scripts on Windows?

2017-02-18 Thread eryk sun
On Sat, Feb 18, 2017 at 8:38 PM, ddbug  wrote:
> I am very perplexed by inability to tell the Windows installer (bdist_wininst 
> or pip) where to
> install scripts (or "entry points").
>
> By default (and I don't see other options) scripts go to
> %USERPROFILE%/Appdata/Roaming/Python/Scripts.

That's the scripts directory that's used by the --user setup in 2.7
and formerly in 3.x. Python 3.5+ uses the "PythonXY" subdirectory
instead, e.g. "%AppData%\Python\Python35\Scripts". Note that you
should use "%AppData%" for the user's roaming application data because
the directory is relocatable.

The --user setup is rarely used when installing packages. Typically
packages are installed in the main site-packages and Scripts
directories. The installer has an option to update PATH to include
this Scripts directory.

You can also develop using venv virtual environments. You can symlink
or shell-shortcut to the activation script of a virtual environment.

> the "py" launcher does not help to find scripts that are installed into that 
> per-user location.

I dislike the idea of automatically searching script directories, but
there could be a command-line option for this.

> command line (aka "dos window") ?

The cmd shell is called the Command Prompt. It's a console application
used on NT versions of Windows (e.g. Windows XP to 10). Older systems
that extended DOS (e.g. Windows 98) used a DOS window and the classic
COMMAND.COM shell.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue29579] Windows Python 3.7 installer broken by README.txt renamed to README.rst

2017-02-18 Thread Steve Dower

Steve Dower added the comment:


New changeset d372cda5cd46712c4e59262ec1ab981773b20bff by GitHub in branch 
'3.6':
bpo-29579: Removes readme.txt from the installer. (#161)
https://github.com/python/cpython/commit/d372cda5cd46712c4e59262ec1ab981773b20bff


--

___
Python tracker 

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



[issue29579] Windows Python 3.7 installer broken by README.txt renamed to README.rst

2017-02-18 Thread Steve Dower

Steve Dower added the comment:


New changeset 52a7e92e3d38d3d003552db6795de75db2e4 by GitHub in branch 
'master':
bpo-29579: Removes readme.txt from the installer. (#160)
https://github.com/python/cpython/commit/52a7e92e3d38d3d003552db6795de75db2e4


--

___
Python tracker 

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



[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-18 Thread Anthony Zhang

Changes by Anthony Zhang :


--
pull_requests: +127

___
Python tracker 

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



[issue29595] Expose max_queue_size in ThreadPoolExecutor

2017-02-18 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


--
nosy: +Jim Fasarakis-Hilliard

___
Python tracker 

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



[issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike`

2017-02-18 Thread Berker Peksag

Changes by Berker Peksag :


--
components: +Library (Lib) -Tests
stage: needs patch -> patch review
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



[issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike`

2017-02-18 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


--
components: +Tests -Library (Lib)

___
Python tracker 

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



[issue11924] Pickle and copyreg modules don't document the interface

2017-02-18 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue29579] Windows Python 3.7 installer broken by README.txt renamed to README.rst

2017-02-18 Thread Steve Dower

Steve Dower added the comment:

Pull request is at https://github.com/python/cpython/pull/160 and backport at 
https://github.com/python/cpython/pull/161

--

___
Python tracker 

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



[issue29579] Windows Python 3.7 installer broken by README.txt renamed to README.rst

2017-02-18 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests: +126

___
Python tracker 

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



[issue29579] Windows Python 3.7 installer broken by README.txt renamed to README.rst

2017-02-18 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests: +125

___
Python tracker 

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



[issue11924] Pickle and copyreg modules don't document the interface

2017-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
versions: +Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue20823] Clarify copyreg.pickle() documentation

2017-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The phrase "*function* should return either a string or a tuple containing two 
or three elements." de-facto is outdated too. Since Python 2.3 a tuple returned 
by the function must have two to five elements.

copyreg.constructor() no longer does anything useful, and the constructor 
parameter of copyreg.pickle() is virtually ignored.

--
nosy: +serhiy.storchaka
stage:  -> patch review
type:  -> behavior
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.3

___
Python tracker 

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



[issue29503] Make embedded-Python detectable

2017-02-18 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> not a bug
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



[issue29525] Python 2.7.13 for Windows broken (from prompt)

2017-02-18 Thread Steve Dower

Steve Dower added the comment:

You should be able to update whatever package installed that module. 
Unfortunately, we can't guess what that would be, but it's probably worthwhile 
updating all the packages you have installed.

--
resolution:  -> not a bug
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



[issue29579] Windows Python 3.7 installer broken by README.txt renamed to README.rst

2017-02-18 Thread Steve Dower

Changes by Steve Dower :


--
assignee:  -> steve.dower

___
Python tracker 

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



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

2017-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +alexandre.vassalotti, serhiy.storchaka
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.7 -Python 3.4

___
Python tracker 

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



[issue29597] __new__ / __init__ calls during unpickling not documented correctly

2017-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is a duplicate of issue27635.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> pickle documentation says that unpickling may not call __new__

___
Python tracker 

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



[issue22807] uuid.uuid1() should use uuid_generate_time_safe() if available

2017-02-18 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:


New changeset 8c130d7f8114158f5b94749032ec0c17dba96f83 by GitHub in branch 
'master':
bpo-22807: Expose platform UUID generation safety information. (#138)
https://github.com/python/cpython/commit/8c130d7f8114158f5b94749032ec0c17dba96f83


--

___
Python tracker 

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



Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread Peter Otten
TTaglo wrote:

> i = 1
> f = open ('rosalind_ini5(1).txt')
> for line in f.readlines():
> if i % 2 == 0:
> print line
> i += 1
> 
> 
> How do i get output without breaks between the lines?

I'm late to the show, but here are a few unsolicited remarks to your code.

(1) The best way to open a file is

with open(filename) as f:
# use the file
# at this point the file is closed without the need to invoke 
# f.close() explicitly

(2) The readlines() method reads the complete file into a list. This can 
become a problem if the file is large. It is better to iterate over the file 
directly:

for line in f:
# use the line

(3) If you read the file into a list you can get all odd lines with

for odd_line in f.readlines()[1::2]:
   # use the odd line

(4) If you follow my advice from (2) and want to avoid the in-memory list 
there's an equivalent itertools.islice() function that you can use like 
this:

import itertools
for odd_line in itertools.islice(f, 1, None, 2):
# use the odd line

(5) sys.stdout.write() was already mentioned, but there is also a 
sys.stdout.writelines() meathod which takes a sequence of strings. With that 
your code may become

import itertools
import sys

with open('rosalind_ini5(1).txt') as f:
sys.stdout.writelines(itertools.islice(f, 1, None, 2))


-- 
https://mail.python.org/mailman/listinfo/python-list


How to access installed scripts on Windows?

2017-02-18 Thread ddbug
I am very perplexed by inability to tell the Windows installer (bdist_wininst 
or pip) where to install scripts (or "entry points").

By default (and I don't see other options) scripts go to 
%USERPROFILE%/Appdata/Roaming/Python/Scripts.

Ok. Now what? How the user is going to call these scripts: add this location to 
PATH? Then, should I add a custom script for this into the bdist_wininst 
installer?  It looks like the "py" launcher does not help to find scripts that 
are installed into that per-user location. 

What is the "best known good" method to easily run scripts installed in 
per-user location, from command line (aka "dos window") ?

Thanks,
Pavel A




-- 
https://mail.python.org/mailman/listinfo/python-list


[issue29597] __new__ / __init__ calls during unpickling not documented correctly

2017-02-18 Thread Max

New submission from Max:

According to the 
[docs](https://docs.python.org/3/library/pickle.html#pickling-class-instances):

> Note: At unpickling time, some methods like `__getattr__()`, 
> `__getattribute__()`, or `__setattr__()` may be called upon the instance. In 
> case those methods rely on some internal invariant being true, the type 
> should implement `__getnewargs__()` or `__getnewargs_ex__()` to establish 
> such an invariant; otherwise, neither `__new__()` nor `__init__()` will be 
> called.

It seems, however, that this note is incorrect. First, `__new__` is called even 
if `__getnewargs__` isn't implemented. Second, `__init__` is not called even if 
it is (while the note didn't say that `__init__` would be called when 
`__getnewargs__` is defined, the wording does seem to imply it).


class A:
def __new__(cls, *args):
print('__new__ called with', args)
return object.__new__(cls)

def __init__(self, *args):
print('__init__ called with', args)
self.args = args

def __getnewargs__(self):
print('called')
return ()

a = A(1)
s = pickle.dumps(a)
a = pickle.loads(s) # __new__ called, not __init__
delattr(A, '__getnewargs__') 
a = A(1)
s = pickle.dumps(a)
a = pickle.loads(s) # __new__ called, not __init__

--
assignee: docs@python
components: Documentation
messages: 288088
nosy: docs@python, max
priority: normal
severity: normal
status: open
title: __new__ / __init__ calls during unpickling not documented correctly
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



Re: How to inherit classmethod constructors?

2017-02-18 Thread Peter Otten
Daniel Andersson wrote:

> 
> I have a class "A" below, that have a very simple
> __init__ method, which only wants a "needle".
> 
> 
> class A:
> def __init__(self, needle):
> self.needle = needle
> 
> @classmethod
> def from_haystack(cls, haystack):
> # ...
> # Many lines of code (omitted here)
> # that process haystack to obtain a needle
> # ...
> # ...
> # The obtained needle is then used to
> # return an instance
> return cls(needle)
> 
> 
> The class also has a classmethod: "from_haystack"
> that is used as an alternative to __init__ for
> initalizing an instance.
> 
> My problem is that:
>   1. I'm not allowed to refactor A.
>   2. I need a class B which must inherit A.
>   3. B must use a haystack to initialize
>  itself.
>   4. Therefore, I want to reuse "from_haystack" from A
>  in some way so I don't have to repeat the code.
> 
> My naive solution was this:
> 
> 
> class B(A):
> def __init__(self, haystack, spam, eggs):
> super().from_haystack(haystack)  # Won't work
> self.spam = spam
> self.eggs = eggs
> 
> 
> The use of super() here will call "from_haystack" with
> cls = B, which won't work, since the return line will be
> "return B(needle)" and B can't handle that.
> 
> What is idiomatic solution to this problem?

If A is a heap class you can change the class after the from_haystack() 
invocation:

class B(A):
def __new__(cls, needle, spam, eggs):
inst = A.from_haystack(needle)
inst.__class__ = cls
return inst

def __init__(self, needle, spam, eggs):
super().__init__(needle)
self.spam = spam
self.eggs = eggs


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread TTaglo
Op zaterdag 18 februari 2017 18:55:46 UTC+1 schreef boB Stepp:
> On Sat, Feb 18, 2017 at 11:38 AM, TTaglo  wrote:
> > i = 1
> > f = open ('rosalind_ini5(1).txt')
> > for line in f.readlines():
> > if i % 2 == 0:
> > print line
> > i += 1
> >
> >
> > How do i get output without breaks between the lines?
> 
> If you use "print line," (Note the trailing comma.), this should
> suppress the line break that the print statement normally inserts.
> 
> Another suggestion might be to use enumerate() instead of using a
> manual counter in your for loop.
> 
> HTH!
> 
> 
> 
> -- 
> boB

thanks for the help ! 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread TTaglo
Op zaterdag 18 februari 2017 18:38:43 UTC+1 schreef TTaglo:
> i = 1
> f = open ('rosalind_ini5(1).txt')
> for line in f.readlines():
> if i % 2 == 0:
> print line
> i += 1
> 
> 
> How do i get output without breaks between the lines?
> 
> Result:
> 
> Other things just make you swear and curse
> 
> When you're chewing on life's gristle, don't grumble give a whistle
> 
> This will help things turn out for the best
> 
> Always look on the bright side of life

thank you all!
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue29237] Create enum for pstats sorting options

2017-02-18 Thread Ratnadeep Debnath

Ratnadeep Debnath added the comment:

I am taking up to create a patch/pull request for this to get it reviewed.

--
nosy: +rtnpro

___
Python tracker 

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



[issue16285] Update urllib quoting to RFC 3986

2017-02-18 Thread Ratnadeep Debnath

Ratnadeep Debnath added the comment:

I have started to work on this issue and get it merge ready.

--
nosy: +rtnpro

___
Python tracker 

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



How to inherit classmethod constructors?

2017-02-18 Thread Daniel Andersson

I have a class "A" below, that have a very simple
__init__ method, which only wants a "needle".


class A:
def __init__(self, needle):
self.needle = needle

@classmethod
def from_haystack(cls, haystack):
# ...
# Many lines of code (omitted here)
# that process haystack to obtain a needle
# ...
# ...
# The obtained needle is then used to
# return an instance
return cls(needle)


The class also has a classmethod: "from_haystack"
that is used as an alternative to __init__ for
initalizing an instance.

My problem is that:
  1. I'm not allowed to refactor A.
  2. I need a class B which must inherit A.
  3. B must use a haystack to initialize
 itself.
  4. Therefore, I want to reuse "from_haystack" from A
 in some way so I don't have to repeat the code.

My naive solution was this:


class B(A):
def __init__(self, haystack, spam, eggs):
super().from_haystack(haystack)  # Won't work
self.spam = spam
self.eggs = eggs


The use of super() here will call "from_haystack" with
cls = B, which won't work, since the return line will be
"return B(needle)" and B can't handle that.

What is idiomatic solution to this problem?
Thanks,

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread Wildman via Python-list
On Sat, 18 Feb 2017 09:38:32 -0800, TTaglo wrote:

> i = 1
> f = open ('rosalind_ini5(1).txt')
> for line in f.readlines():
> if i % 2 == 0:
> print line
> i += 1
> 
> 
> How do i get output without breaks between the lines?
> 
> Result:
> 
> Other things just make you swear and curse
> 
> When you're chewing on life's gristle, don't grumble give a whistle
> 
> This will help things turn out for the best
> 
> Always look on the bright side of life

In Python 3 you can do this:

print(line, end="")

For Python 2 use this:

import sys
  .
  .
  .
sys.stdout.write(line)

Don' forget...
f.close()

-- 
 GNU/Linux user #557453
The cow died so I don't need your bull!
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-18 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

> Any reason why you do omit mentioning these important facts in the issue ?

Both in the title of this issue and that PR, I mention "NDK r14 beta 2". I'm 
not sure what you're referring to. On IRC, irker states the title first and 
then the comment content. I believe people will read the title first to 
determine whether they're interested or not. On email notifications of b.p.o 
and Github updates, the title is used as the email subject, so people can 
determine whether they want to see this email fast.

> Maybe you think that Stephan, Victor and the other readers are aware of this ?

As explained above, I've already stated "beta" clearly

> What about the time they waste reading this issue and your PR when this issue 
> does not make sense with the NDK we are using (NDK r13) and is just a waste 
> of time now ?

For me, reading the title takes a few seconds. If a developer thinks there's no 
need to support beta platforms, they can just ignore it.

> Why do you publish a PR ?

This is a real issue. Usually NDK beta 2 is almost identical to the final 
release. For me it's good to fix things as soon as possible. There are some 
other examples for beta toolchains like issue1465, issue27806 or issue27596.

If you think issues on beta should be postponed until the final release, I can 
keep my patches locally and submit them later.

--

___
Python tracker 

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



Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread alister
On Sat, 18 Feb 2017 11:55:34 -0600, boB Stepp wrote:

> On Sat, Feb 18, 2017 at 11:38 AM, TTaglo  wrote:
>> i = 1 f = open ('rosalind_ini5(1).txt')
>> for line in f.readlines():
>> if i % 2 == 0:
>> print line
>> i += 1
>>
>>
>> How do i get output without breaks between the lines?
> 
> If you use "print line," (Note the trailing comma.), this should
> suppress the line break that the print statement normally inserts.
> 
> Another suggestion might be to use enumerate() instead of using a manual
> counter in your for loop.
> 
> HTH!

or simply strip the cr/lf of the end of each line



-- 
Smell from unhygenic janitorial staff wrecked the tape heads
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread boB Stepp
On Sat, Feb 18, 2017 at 11:38 AM, TTaglo  wrote:
> i = 1
> f = open ('rosalind_ini5(1).txt')
> for line in f.readlines():
> if i % 2 == 0:
> print line
> i += 1
>
>
> How do i get output without breaks between the lines?

If you use "print line," (Note the trailing comma.), this should
suppress the line break that the print statement normally inserts.

Another suggestion might be to use enumerate() instead of using a
manual counter in your for loop.

HTH!



-- 
boB
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue18423] Document limitations on -m

2017-02-18 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue10938] Provide links to system specific strftime/ptime docs

2017-02-18 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-18 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Closing this issue as 'later'.
Chi Hsuan Yen, I am still interested by your answers to my questions.

--
resolution:  -> later
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



print odd numbers of lines from tekst WITHOUT space between lines

2017-02-18 Thread TTaglo
i = 1
f = open ('rosalind_ini5(1).txt')
for line in f.readlines():
if i % 2 == 0:
print line
i += 1


How do i get output without breaks between the lines?

Result:

Other things just make you swear and curse

When you're chewing on life's gristle, don't grumble give a whistle

This will help things turn out for the best

Always look on the bright side of life
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-18 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> I've improved the patch and submitted it as PR 159. Now on Android:

This is confusing. Android NDK r14 has not been released yet.
We do not develop CPython for platform beta releases.
Unified headers, the reason for your proposed change, are only introduced in 
NDK r14.
Any reason why you do omit mentioning these important facts in the issue ?
Maybe you think that Stephan, Victor and the other readers are aware of this ?
What about the time they waste reading this issue and your PR when this issue 
does not make sense with the NDK we are using (NDK r13) and is just a waste of 
time now ?
Why do you publish a PR ?

--

___
Python tracker 

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-18 Thread STINNER Victor

STINNER Victor added the comment:

Previously, we asked to not include generated files in patches, like
configure. With the new dev process (github, travis), you must now include
generated files.

--

___
Python tracker 

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



[issue29453] Remove reference to undefined dictionary ordering in Tutorial

2017-02-18 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Added the following short sentence to the PR, which I believe makes the point 
clear: 

Note that the order in which the keyword arguments are printed is guaranteed to 
match the order in which they were provided in the function call.

--

___
Python tracker 

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-18 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Well, I have to commit changes to configure and pyconfig.h, otherwise Travis 
tests fail. Maybe .travis.yml should call autoreconf first.

--

___
Python tracker 

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-18 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I've improved the patch and submitted it as PR 159. Now on Android:

1. _locale is built
2. _locale has several symbols, including CODESET
3. _locale doesn't have nl_langinfo()

Basically _locale maps what langinfo.h does. On Android langinfo.h has several 
#defines like CODESET but nl_langinfo() is missing from langinfo.h and libc.so.

On my ASUS ZE500KL, both test_locale and test_site (see: issue28596) pass.

--

___
Python tracker 

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-18 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen :


--
pull_requests: +124

___
Python tracker 

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



[issue24241] webbrowser default browser detection and/or public API for _trylist.

2017-02-18 Thread David Steele

David Steele added the comment:

Jaysinh,

Thanks for the feedback. I'm adding the documentation now.

As I noted in github, I'm not sure what the preferred exception handling would 
be for xdg-settings.

--

___
Python tracker 

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



[issue24241] webbrowser default browser detection and/or public API for _trylist.

2017-02-18 Thread Jaysinh shukla

Jaysinh shukla added the comment:

Hello David,
I hope you are still working on https://github.com/python/cpython/pull/85 I 
tried to add few suggestions. Please write back on any confusions. Thanks!

--
nosy: +jaysinh.shukla

___
Python tracker 

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



[issue24241] webbrowser default browser detection and/or public API for _trylist.

2017-02-18 Thread David Steele

Changes by David Steele :


--
pull_requests: +123

___
Python tracker 

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



Re: PTH files: Abs paths not working as expected. Symlinks needed?

2017-02-18 Thread Cem Karan

On Feb 16, 2017, at 9:55 PM, Rustom Mody  wrote:

> On Friday, February 17, 2017 at 3:24:32 AM UTC+5:30, Terry Reedy wrote:
>> On 2/15/2017 7:42 AM, poseidon wrote:
>> 
>>> what are pth files for?
>> 
>> They are for extending (mainly) lib/site-packages.  
> 
> 
> Hey Terry!
> This needs to get into more public docs than a one-off post on a newsgroup/ML

+1!

This is the first I've heard of this, and it sounds INCREDIBLY useful!

Thanks,
Cem Karan
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23384] urllib.proxy_bypass_registry slow down under Windows if website has no reverse DNS and Fiddler is runing

2017-02-18 Thread Julia Dolgova

Changes by Julia Dolgova :


--
nosy: +juliadolgova

___
Python tracker 

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



[issue23890] assertRaises increases reference counter

2017-02-18 Thread Nick Coghlan

Nick Coghlan added the comment:

As Robert noted, this is a straight up error, where the clear_frames() call and 
deleting the exception traceback from the saved object aren't enough to drop 
all references to `callable_obj`.

The trick is that the cleanup code isn't accounting for __cause__ and 
__context__: it's only clearing and dropping the traceback for the topmost 
exception in the chain.

In Vjacheslav's example, there are *two* tracebacks to worry about: both the 
top level one (which is getting cleaned up) and the inner one from 
exc.__context__ which isn't being touched.

We could likely use a "traceback.clear_all_frames()" helper that walks an 
exception tree clearing *all* the traceback frames, both on the original 
exception, and on all the __cause__ and __context__ attributes.

(We can't just clear __cause__ and __context__, since those can be accessed and 
tested when using the context manager form and the `exception` attribute)

--
assignee: docs@python -> 
components:  -Documentation
nosy: +ncoghlan
type: enhancement -> behavior
versions: +Python 3.7

___
Python tracker 

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



[issue25452] Add __bool__() method to subprocess.CompletedProcess

2017-02-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue23890] assertRaises increases reference counter

2017-02-18 Thread Subhendu Ghosh

Changes by Subhendu Ghosh :


--
nosy: +subho

___
Python tracker 

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



[issue29595] Expose max_queue_size in ThreadPoolExecutor

2017-02-18 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
components: +Library (Lib)
versions: +Python 3.7

___
Python tracker 

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



[issue25452] Add __bool__() method to subprocess.CompletedProcess

2017-02-18 Thread Sayan Chowdhury

Sayan Chowdhury added the comment:

I am taking over to do the rest part required for this ticket.

--
nosy: +sayanchowdhury

___
Python tracker 

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



[issue18422] is_package missing so can't use -m

2017-02-18 Thread Nick Coghlan

Changes by Nick Coghlan :


--
stage:  -> resolved

___
Python tracker 

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



[issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike`

2017-02-18 Thread Sayan Chowdhury

New submission from Sayan Chowdhury:

I tested and found that the code already works with PathLike. I have created a 
PR which updates the test and documentation. I think the issue can be in 
Windows.

--
nosy: +sayanchowdhury

___
Python tracker 

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



[issue10938] Provide links to system specific strftime/ptime docs

2017-02-18 Thread Nick Coghlan

Changes by Nick Coghlan :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue29506] Incorrect documentation for the copy module

2017-02-18 Thread Nick Coghlan

Changes by Nick Coghlan :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue29549] Improve docstring for str.index

2017-02-18 Thread Nick Coghlan

Changes by Nick Coghlan :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike`

2017-02-18 Thread Nick Coghlan

Changes by Nick Coghlan :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue18423] Document limitations on -m

2017-02-18 Thread Sanyam Khurana

Changes by Sanyam Khurana :


--
pull_requests: +122

___
Python tracker 

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



[issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike`

2017-02-18 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +121

___
Python tracker 

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



  1   2   >