[issue22702] to improve documentation for join() (str method)

2017-05-26 Thread Nick Coghlan

Nick Coghlan added the comment:

Raymond, I went ahead and accepted the patch to remove the "iterable iterable" 
phrasing by only referencing the parameter name and dropping the link to the 
term definition.

Do you think that's sufficient to fully resolve the request here, or would you 
prefer to see further changes made?

--

___
Python tracker 

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



[issue22702] to improve documentation for join() (str method)

2017-05-26 Thread Nick Coghlan

Nick Coghlan added the comment:


New changeset 08e2f355d04d3cbea5751ce1275306ee3f569b32 by Nick Coghlan (Sanyam 
Khurana) in branch 'master':
bpo-22702: Clarify documentation of str.join & bytes.join (GH-156)
https://github.com/python/cpython/commit/08e2f355d04d3cbea5751ce1275306ee3f569b32


--

___
Python tracker 

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



[issue19180] some RFC references could be updated

2017-05-26 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



[issue30444] Add ability to change "-- more --" text in pager module

2017-05-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

pydoc.pager() is not a public API. This is an internal function of the pydoc 
module. The stdlib does not have a benefit from adding this feature.

--
nosy: +serhiy.storchaka

___
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-05-26 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



[issue30468] Propagate zipfile.py pypy issue #905 patch to CPython 3.7

2017-05-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The reason of using bytes concatenating rather than accumulating in the list, 
is that in most cases one of arguments is an empty bytes object (appending to 
the empty buffer or uncompressing a file with large compression block), and 
this case is optimized in CPython. In mos cases there is at most one nontrivial 
bytes concatenation per read operation, and using b''.join() is slower in that 
case.

--

___
Python tracker 

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



[issue30468] Propagate zipfile.py pypy issue #905 patch to CPython 3.7

2017-05-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

2017-05-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

After some investigations this idea no longer looks good to me.

The table of 256 32-bit integers will take at least 44 lines. This is too 
large. It is easier to check the algorithm than all these numbers. The error 
even in one digit can break all, but for testing we should check every element 
of the table. In any case we would need a generating code, either for 
generating the sources, or for testing.

Current generating code is 25% faster than the code used in 2.7, and 
(surprisingly!) Python 3.7 is 50% faster than Python 2.7 in the computation of 
the same code. On my computer the generating takes 1 ms (the startup time of 
the interpreter is 50 ms), and the table is generated only if ZIP file 
decryption is used, and only once.

--
resolution: not a bug -> rejected

___
Python tracker 

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



[issue30486] Allow setting cell value

2017-05-26 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> lisroach

___
Python tracker 

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



[issue30486] Allow setting cell value

2017-05-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1  I don't see any reason this can't be writeable.

--

___
Python tracker 

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



[issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7

2017-05-26 Thread Martin Panter

Martin Panter added the comment:

I think the simplest way forward would be to add the word “Unicode” back in. 
You could look at making a Git Hub pull request for this if you want. Hopefully 
somebody else can merge it though, because I probably won’t be in a position to 
do so for a while.

--

___
Python tracker 

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



[issue11874] argparse assertion failure with brackets in metavars

2017-05-26 Thread paul j3

paul j3 added the comment:

Any changes here including the latest pull request might conflict with

http://bugs.python.org/issue29553

Argparser does not display closing parentheses in nested mutex groups

If someone uses nested mutually exclusive groups (which I don't think they 
should, but anyways ...), the usage formatter gets confused by the nested 
brackets, and weeds out the wrong one(s).

That issue hasn't been settle yet; my feeling is that fixing this assertion 
error properly is more important.

--

___
Python tracker 

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



[issue30393] test_readline hangs

2017-05-26 Thread Martin Panter

Martin Panter added the comment:

Perhaps if you ran the tests in verbose mode, that could narrow down which test 
it hangs at. Also, if you can capture a KeyboardInterrupt stack trace, that may 
help. Not sure if it works with your build setup, but maybe you can run 
something like

./python -m unittest -v test.test_readline

Not too long ago, I added some tests that run a child process in a 
pseudoterminal (see the “run_pty” function). There were a few platform specific 
problems getting that working, so there is a good chance your problem may be 
related.

I wonder if test hangs when you don’t use “--enable-optimizations”?

--
nosy: +martin.panter
stage:  -> test needed

___
Python tracker 

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



[issue30486] Allow setting cell value

2017-05-26 Thread Lisa Roach

Lisa Roach added the comment:

This idea makes sense to me. I'll see if I can put together the code for it.

--
nosy: +lisroach

___
Python tracker 

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



[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

2017-05-26 Thread Martin Panter

Changes by Martin Panter :


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



[issue11874] argparse assertion failure with brackets in metavars

2017-05-26 Thread wim glenn

Changes by wim glenn :


--
pull_requests: +1912

___
Python tracker 

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



[issue30490] Allow pass an exception to the Event.set method

2017-05-26 Thread pfreixes

Changes by pfreixes :


--
pull_requests: +1911

___
Python tracker 

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



[issue30490] Allow pass an exception to the Event.set method

2017-05-26 Thread pfreixes

New submission from pfreixes:

Having the Event as the way to synchronize 1:N coroutines, the none happy path 
should be able to be expressed making possible call the `set_exception` for 
each future related to each waiter.

As an example the following code trying to implement a way to avoid the dogpile 
effect for a DNS cache. If the coro that holds the event fails, the original 
exception is also broadcasted to the waiters.


if key in throttle_dns_events:
yield from throttle_dns_events[key].wait()
else:
throttle_dns_events[key] = Event(loop=loop)
try:
addrs = yield from \
resolver.resolve(host, port, family=family)
cached_hosts.add(key, addrs)
throttle_dns_events[key].set()
except Exception as e:
# any DNS exception, independently of the implementation
# is set for the waiters to raise the same exception.
throttle_dns_events[key].set(exc=e)
raise
finally:
throttle_dns_events.pop(key)

--
components: asyncio
messages: 294572
nosy: pfreixes, yselivanov
priority: normal
severity: normal
status: open
title: Allow pass an exception to the Event.set method
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



[issue30468] Propagate zipfile.py pypy issue #905 patch to CPython 3.7

2017-05-26 Thread Shubha Ramani

Shubha Ramani added the comment:

Upon comparing the PyPy changes from attached diff to the latest cpython3 
github, I don't find a need for improvement. Looks like cpython3 zipfile.py has 
the same changes and the read() method in class 
ZipExtFile(io.BufferedIOBase) is vastly improved compared to what pypy had. In 
fact it has been completely re-written.

The CPython 2.7 version of this bug was promptly closed as a duplicate:
http://bugs.python.org/issue30467

Perhaps the changes from CPython3 are not being backported to CPython2 ?

This bug can be closed because CPython3 has no issues.

--

___
Python tracker 

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



[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

2017-05-26 Thread Shubha Ramani

Shubha Ramani added the comment:

This is not needed after all jkloth explained. Please feel free to close.

--

___
Python tracker 

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



[issue11588] Add "necessarily inclusive" groups to argparse

2017-05-26 Thread Pedro

Pedro added the comment:

Just voicing my support for this. I was also looking for a solution on 
StackOverflow and ended up here.

--
nosy: +pgacv2

___
Python tracker 

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



[issue30392] default webbrowser fails on macOS Sierra 10.12.5

2017-05-26 Thread Erik Simmler

Changes by Erik Simmler :


--
nosy: +tgecho

___
Python tracker 

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



[issue30463] Add __slots__ to ABC convenience class

2017-05-26 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue22729] `wait` and `as_completed` depend on private api

2017-05-26 Thread Nathaniel Manista

Nathaniel Manista added the comment:

gRPC Python is strongly affected by this as well. We use grpc.Future objects 
(https://github.com/grpc/grpc/blob/e5f99b587338164230b0b2121d242fb015c2ae5a/src/python/grpcio/grpc/__init__.py#L50)
 to represent RPCs taking place asynchronously. Despite our grpc.Futures being 
interface-compatible with concurrent.futures.Future objects, we (in our tests) 
and our users (in their applications) cannot make use of the 
concurrent.futures.as_completed function 
(https://github.com/grpc/grpc/blob/e5f99b587338164230b0b2121d242fb015c2ae5a/src/python/grpcio_tests/tests/unit/_rpc_test.py#L388
 shows the "wrapping" that has to be done to work around the problem).

It's not at all clear why as_completed shouldn't work with any future objects 
that are public-interface-compatible with concurrent.futures.Future objects.

I would be happy to reimplement the function if my change would be accepted. I 
part ways with this issue's original reporter in that I don't see the need to 
widen the public API any further with a "remove_done_callback" method... but 
maybe I'm missing some small detail?

--
nosy: +Nathaniel Manista

___
Python tracker 

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



[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

2017-05-26 Thread Jeremy Kloth

Jeremy Kloth added the comment:

See bpo-10030 (and pr #550).  It removed that function in favor of the current 
approach.

Also, that current code does not generate *every* time, but just once.  Note 
that the computed value is stored in a global cache.

--
nosy: +jkloth

___
Python tracker 

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



[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1910

___
Python tracker 

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



[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Stefan Behnel

Stefan Behnel added the comment:

Patch replaced by pull request.
https://github.com/python/cpython/pull/1823

--

___
Python tracker 

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



[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Stefan Behnel

Changes by Stefan Behnel :


Removed file: http://bugs.python.org/file46906/lxml_elpath_empty_prefix.patch

___
Python tracker 

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



[issue30488] Documentation for subprocess.STDOUT needs clarification

2017-05-26 Thread Eryk Sun

Changes by Eryk Sun :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> subprocess.Popen(stderr=STDOUT) fails to redirect subprocess 
stderr to stdout

___
Python tracker 

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



[issue30489] Add CmdLineTest to standard library

2017-05-26 Thread Santiago Castro

New submission from Santiago Castro:

I see that you use some helpers to test command line utilities 
(https://hg.python.org/cpython/file/default/Lib/test/test_cmd_line_script.py) 
that would be useful to Python programmers. Please, consider to add them to the 
standard library (or somewhere) to reuse them.

--
messages: 294565
nosy: Santiago Castro
priority: normal
severity: normal
status: open
title: Add CmdLineTest to standard library
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30482] socket.getservbyname(), socket.getservbyport(), socket.getprotobyname() are not threadsafe

2017-05-26 Thread Doug Freed

Doug Freed added the comment:

It already checks for gethostbyname_r, but the comments in socketmodule.c 
mention that configure seems to get it wrong.  Those comments are probably old, 
though, so perhaps that can be revisited as well.

--

___
Python tracker 

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



[issue13349] Non-informative error message in index() and remove() functions

2017-05-26 Thread Brett Cannon

Brett Cannon added the comment:

A potential compromise would be if ValueError gained a 'value' attribute. That 
would allow for the exception message to be static but still provide the 
information for introspection later if desired to figure out exactly what 
object led to the cause of the ValueError. If I remember correctly previous 
objections to this idea was worry about memory, though, so it seems attaching 
more information about the trigger of a ValueError will inevitably lead to more 
cost somehow.

--

___
Python tracker 

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



[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

2017-05-26 Thread Shubha Ramani

Shubha Ramani added the comment:

It looks like _GenerateCRCTable() is already implemented here:

https://svn.python.org/projects/python/trunk/Lib/zipfile.py

The question is, why isn't it implemented here ?

https://github.com/python/cpython/blob/master/Lib/zipfile.py

--

___
Python tracker 

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



[issue13349] Non-informative error message in index() and remove() functions

2017-05-26 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue30471] "as" keyword in comprehensions

2017-05-26 Thread Brett Cannon

Brett Cannon added the comment:

I've created https://github.com/python/peps/pull/267 to clarify things a bit 
better in PEP 42, Dávid .

--

___
Python tracker 

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



[issue30488] Documentation for subprocess.STDOUT needs clarification

2017-05-26 Thread Max

New submission from Max:

The documentation states that subprocess.STDOUT is:

Special value that can be used as the stderr argument to Popen and indicates 
that standard error should go into the same handle as standard output.

However, when Popen is called with stdout=None, stderr=subprocess.STDOUT, 
stderr is not redirected to stdout and continues to be sent to stderr.

To reproduce the problem:

$ python >/dev/null -c 'import subprocess;\
subprocess.call(["ls", 
"/404"],stderr=subprocess.STDOUT)'

and observe the error message appearing on the console (assuming /404 directory 
does not exist).

This was reported on SO 5 years ago: 
https://stackoverflow.com/questions/11495783/redirect-subprocess-stderr-to-stdout.

The SO attributed this to a documentation issue, but arguably it should be 
considered a bug because there seems to be no reason to make subprocess.STDOUT 
unusable in this very common use case.

--
components: Interpreter Core
messages: 294560
nosy: max
priority: normal
severity: normal
status: open
title: Documentation for subprocess.STDOUT needs clarification
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30145] Create a How to or Tutorial documentation for asyncio

2017-05-26 Thread Eric Appelt

Changes by Eric Appelt :


--
nosy: +Eric Appelt

___
Python tracker 

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



[issue30145] Create a How to or Tutorial documentation for asyncio

2017-05-26 Thread Yury Selivanov

Yury Selivanov added the comment:

A while ago, Eric Appelt stepped forward to help with the asyncio 
documentation.  Here's my response to his email in which we discuss
the direction for the new docs.

On May 24, 2017 at 1:04:56 PM, Eric Appelt (eric.app...@gmail.com) wrote:
> Hi Yury,
> 
> I (briefly) went through the curio and trio tutorials and wanted to
> summarize a few thoughts. I'm going to go through them again slowly and
> actually do the exercises, but a few things that I found notable:
> 
> Both Curio and Trio start with an emphasis of tasks, spawning tasks at
> various points, and then later joining them. Trio even has a "nursery"
> async context manager where you spawn tasks inside and then they are all
> joined on exit. Following various exchanges, I understand that the
> coroutine is to be the preferred abstraction layer for use in the
> application developer, i.e. one would generally be using
> asyncio.gather(...) rather than create_task as the routine way of invoking
> concurrency. If that's correct, I would expect an asyncio tutorial to be a
> bit more focused on using gather, but I expect that manipulating tasks is
> of enough interest that it deserves some discussion.

What I like about Trio documentation is that it tries to explain 
async/await first, gradually paving the way to more advanced concepts
and the library API.

I’m going to propose a concrete structure for the revamped documentation.
It’s not something set in stone, let’s discuss and potentially 
restructure it:

1. Tutorial
 a/ Why async IO?
 b/ async/await in Python
 c/ Simple example in asyncio (Tasks + sleep) + explanation
 d/ An example of using aiohttp
 e/ How asyncio works and what is the event loop
 f/ Tasks, asyncio.gather, wait_for, cancellation

2. Advanced Tutorial
 a/ A short primer on network IO
 b/ Let’s implement a memcache driver using streams!
 c/ Let’s implement a memcache driver with transports!

3. API reference — there are a few things we’ll need to restructure
there.


In more detail:

1a - we need to answer the question of why would you even bother
learning asyncio and async/await.  What are the benefits?  When do
you want to use asyncio and when you really shouldn’t.

1b - we need to explain async/await in a friendly way.  In particular,
you don’t need to understand the details of the async/await protocol 
etc.  What you need to know is that there are two types of functions
in Python: regular functions and coroutines.  Coroutines can be
paused and resumed in: `await`, `async with`, and `async for` 
statements.  Fundamentally, this is all you need to know about
async/await in Python. You simply use `await` for coroutines, that’s
it.

1c - A simple example similar to
https://curio.readthedocs.io/en/latest/tutorial.html#getting-started

1d - Here I propose to just use aiohttp to implement a simple
web client or hello-world-server.  I think it can be a valuable
early tutorial point to show people a real example, something they
will actually need and use asyncio for.  It’s not a problem to
use some non-standard library in the tutorial.

1e - Here we’ll need to discuss some fundamental asyncio building
blocks: event loop, callbacks, Future, and Task.  Briefly, the point
is to get the user familiar with the terminology and give them a
high-level understanding of how things work.

1f - All high-level asyncio primitives that everyone needs to know:
Tasks, gather, wait_for, etc.  No more than 5 API functions should
be covered here, culminating in a simple example.


2a - Now we are entering the “advanced” part of the tutorial.  Let’s
explain sockets and selectors and how we tie them to callbacks using
the loop.

2b - I propose to take a simple protocol like Memcache or 
Redis and simply implement it using the streams API.  We’ll only
need two methods: set and get; and in the end we’ll teach the user
how things really work and how to design async APIs.

2c - Same as 1h but with Transports and Protocols.  Explain how
to decouple protocol parser from the IO and the benefits of that.
Show that the end result is faster than 1h, and not that much
more complex.


3 - We’ll need to restructure the current API reference a bit.  Things
that we will cover in the tutorial won’t be needed to be explained 
in detail again.  The idea is to get a simple to digest, concise
API reference.

Some things are currently documented in several different places. Like
event loops / policies, I believe we have three different pages 
covering them.  Some things aren’t needed to be fully covered at all,
like `AbstractEventLoop`.

Anyways, I think that ‘3’ is an easy part. The hard part is the
tutorial because it’s completely new.


> 
> Curio has a nice discussion of tasks that consume lots of CPU time
> crunching numbers, and the cooperative nature of coroutine multitasking,
> which I think is helpful.

Yes, I agree.  Maybe this should go to 1a.

> 
> Trio starts with a nice discussion of “regular” and “async” functions, good
> 

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Stefan Behnel

Stefan Behnel added the comment:

Agreed that this should be added. I think the key should be None, though, not 
the empty string. I attached a quick patch for lxml's corresponding file. It's 
mostly the same for ET.

--
keywords: +patch
Added file: http://bugs.python.org/file46906/lxml_elpath_empty_prefix.patch

___
Python tracker 

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



[issue30486] Allow setting cell value

2017-05-26 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



[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-05-26 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage:  -> patch review

___
Python tracker 

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



[issue30433] Devguide lacks instructions for building docs

2017-05-26 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks Caleb.

This has been addressed in the Dev Guide PR 
https://github.com/python/devguide/pull/206 and it has been merged.

--
nosy: +Mariatta
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
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



[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-05-26 Thread Caleb Hattingh

New submission from Caleb Hattingh:

Under guidance from zware during Pycon sprints, I've changed the Doc/ Makefile 
to automatically create a virtual environment and install Sphinx, all as part 
of the `make html` command.

--
assignee: docs@python
components: Documentation
messages: 294556
nosy: cjrh, docs@python, willingc, zach.ware
priority: normal
pull_requests: 1909
severity: normal
status: open
title: DOC: automatically create a venv and install Sphinx when running make
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



[issue30433] Devguide lacks instructions for building docs

2017-05-26 Thread Caleb Hattingh

Caleb Hattingh added the comment:

The PR has been merged by Mariatta so I think this can be closed.

--

___
Python tracker 

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



[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2017-05-26 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



[issue30486] Allow setting cell value

2017-05-26 Thread Antoine Pitrou

New submission from Antoine Pitrou:

There are use cases for setting a cell value.  One such use case is for 
(un)pickling recursive closures (see heroic workaround here: 
https://github.com/cloudpipe/cloudpickle/pull/90/files#diff-d2a3618afedd4e124c532151eedbae09R74
 ).  Other use cases may include tinkering around and general education value.

There also doesn't seem to be, AFAICS, any counter-indication to being able to 
do so.  It's already possible in C using PyCell_Set(), which is a public API.  
It just lacks an API in Python land.  For example `cell_contents` could become 
a read/write property...

--
components: Interpreter Core
messages: 294554
nosy: benjamin.peterson, gvanrossum, ncoghlan, pitrou, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: Allow setting cell value
type: enhancement
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



[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I agree that this is a recurring irritant.

--
nosy: +eli.bendersky, rhettinger, scoder
type: behavior -> enhancement
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



[issue13349] Non-informative error message in index() and remove() functions

2017-05-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

See http://bugs.python.org/issue30477 for why I think this shouldn't be done.  
In short, the IndexError may be part of control flow (looping over successive 
matches) rather than an error (this patch adds a time/space cost with no 
benefit in those cases).  The repr itself may be large resulting in an unusable 
error message.  The repr may be expensive to compute for some objects.

--
nosy: +rhettinger

___
Python tracker 

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



[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2017-05-26 Thread Barry Davis

Barry Davis added the comment:

I think this is the same issue I'm getting.
I'm hitting it when compiling python 3.6.2 compiled with gcc-4.8.4.
This wasn't occasional, it was every time I tried.
As a feeble workaround I was compiling in parallel, then in serial when it 
fails, although I'm now hitting the same issue when building uwsgi-2.0.15.

I'm building on a 56 core system so that might make me more likely to hit the 
issue.

--
nosy: +Barry Davis

___
Python tracker 

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



[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2017-05-26 Thread Barry Davis

Changes by Barry Davis :


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



[issue30479] improve asyncio debugging

2017-05-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue30477] tuple.index error message improvement

2017-05-26 Thread Martin Panter

Martin Panter added the comment:

Also discussed in Issue 13349

--
nosy: +martin.panter
superseder:  -> Non-informative error message in index() and remove() functions

___
Python tracker 

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




[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Ben Wainwright

New submission from Ben Wainwright:

The findall method for ElementTree.Element handles namespace prefixes by 
tokenising the path and inserting the full namespace in braces based on entries 
in a dictionary.

Unfortunately, this does not work for a namespace without a prefix, so if you 
have files containing namespaces with and without prefixes, you still need to 
manually add the namespace url for the unprefixed path.

The function xpath_tokenizer checks to see if tokens contain a colon and only 
adds in the namespace url in that instance.

This could be changed to add the url if their is a colon, or if there is not, 
and the empty string key is present in the namespaces dictionary.

--
components: Library (Lib), XML
messages: 294549
nosy: ben.wainwright
priority: normal
severity: normal
status: open
title: Element.findall(path, dict) doesn't insert null namespace
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue30484] Garbage Collector can cause Segfault whilst iterating dictionary items

2017-05-26 Thread Jim Wright

New submission from Jim Wright:

We discovered this issue whilst using h5py (HDF5 python library) under python 
3.5.2 on Ubuntu 16.04.2 x86_64.  The construct used is very dubious, and I will 
separately be raising an issue with the h5py team.  However I thought you might 
like to know there is a possible way to cause a segmentation violation using 
pure python.

There appears to be a new implementation of dictionaries in 3.6 vs 3.5, so I 
compiled up 3.6.1 and it also segfaults, but not so obviously related to the 
dictionary iteration (both stack traces are included below).

Regards, Jim.



$ cat segfault.py 
#!/usr/bin/python3

class CyclicObject:
def __init__(self, key, register):
self.key = key
self.self = self
self.register = register
self.register[self.key] = None

def __del__(self):
del self.register[self.key]

while True:
register = { }
objs = set([CyclicObject(i, register) for i in range(1)])

while len(objs) > 0:
objs.remove(next(iter(objs)))

try:
list(register.items())
except RuntimeError as err:
print(err)



$ python3 --version
Python 3.5.2

$ gdb --args python3 segfault.py
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1

(gdb) r
Starting program: /usr/bin/python3 segfault.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
dictionary changed size during iteration
dictionary changed size during iteration
dictionary changed size during iteration

Program received signal SIGSEGV, Segmentation fault.
dictiter_iternextitem.lto_priv () at ../Objects/dictobject.c:3158
3158../Objects/dictobject.c: No such file or directory.

(gdb) bt
#0  dictiter_iternextitem.lto_priv () at ../Objects/dictobject.c:3158
#1  0x0059f024 in listextend.lto_priv () at ../Objects/listobject.c:855
#2  0x0058fd1c in list_init.lto_priv () at ../Objects/listobject.c:2314
#3  0x0055d17c in type_call.lto_priv () at ../Objects/typeobject.c:905
#4  0x005b7167 in PyObject_Call () at ../Objects/abstract.c:2165
#5  0x00528d06 in do_call (nk=, na=, 
pp_stack=0x7fffd9b0, func=) at ../Python/ceval.c:4936
#6  call_function (oparg=, pp_stack=0x7fffd9b0) at 
../Python/ceval.c:4732
#7  PyEval_EvalFrameEx () at ../Python/ceval.c:3236
#8  0x0052d2e3 in _PyEval_EvalCodeWithName () at ../Python/ceval.c:4018
#9  0x0052dfdf in PyEval_EvalCodeEx () at ../Python/ceval.c:4039
#10 PyEval_EvalCode (co=, globals=, 
locals=) at ../Python/ceval.c:777
#11 0x005fd2c2 in run_mod () at ../Python/pythonrun.c:976
#12 0x005ff76a in PyRun_FileExFlags () at ../Python/pythonrun.c:929
#13 0x005ff95c in PyRun_SimpleFileExFlags () at 
../Python/pythonrun.c:396
#14 0x0063e7d6 in run_file (p_cf=0x7fffdc20, filename=0xa73280 
L"segfault.py", fp=0xad19a0) at ../Modules/main.c:318
#15 Py_Main () at ../Modules/main.c:768
#16 0x004cfe41 in main () at ../Programs/python.c:65
#17 0x77811830 in __libc_start_main (main=0x4cfd60 , argc=2, 
argv=0x7fffde38, init=, fini=, 
rtld_fini=, 
stack_end=0x7fffde28) at ../csu/libc-start.c:291
#18 0x005d5f29 in _start ()



$ ./python --version
Python 3.6.1

$ gdb --args ./python ./segfault.py 
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1

(gdb) r
Starting program: ./python ./segfault.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
dictionary changed size during iteration
dictionary changed size during iteration
dictionary changed size during iteration
dictionary changed size during iteration
dictionary changed size during iteration

Program received signal SIGSEGV, Segmentation fault.
_PyObject_Alloc (ctx=0x0, elsize=28, nelem=1, use_calloc=0) at 
Objects/obmalloc.c:1258
1258if ((pool->freeblock = *(block **)bp) != NULL) {

(gdb) bt
#0  _PyObject_Alloc (ctx=0x0, elsize=28, nelem=1, use_calloc=0) at 
Objects/obmalloc.c:1258
#1  _PyObject_Malloc (ctx=0x0, nbytes=28) at Objects/obmalloc.c:1437
#2  0x00490732 in _PyLong_New (size=1) at Objects/longobject.c:196
#3  PyLong_FromLong (ival=) at Objects/longobject.c:254
#4  0x00542fda in _PyEval_EvalFrameDefault (f=, 
throwflag=) at Python/ceval.c:3060
#5  0x0053d671 in PyEval_EvalFrameEx (throwflag=0, f=0x77fa1648) at 
Python/ceval.c:718
#6  _PyFunction_FastCall (co=, args=, nargs=1, 
globals=globals@entry=0x77f452d0) at Python/ceval.c:4880
#7  0x0053e521 in fast_function (kwnames=0x0, nargs=, 
stack=, func=0x77eae510) at Python/ceval.c:4915
#8  call_function (pp_stack=pp_stack@entry=0x7fffd920, oparg=oparg@entry=1, 
kwnames=kwnames@entry=0x0) at Python/ceval.c:4819
#9  0x00542c17 in _PyEval_EvalFrameDefault (f=, 
throwflag=) at Python/ceval.c:3284
#10 0x0053e015 in PyEval_EvalFrameEx (throwflag=0, 

[issue27115] IDLE/tkinter: in simpledialog, != [OK] click

2017-05-26 Thread Louie Lu

Louie Lu added the comment:

We can solve this problem by two ways.

One is to add set_line_and_column() to the end of goto_line_event(), but this 
will make Return trigger set_line_and_column twice.

Another is to change the bind event in simpledialog from "" to 
"" to prevent editor use the KeyRelease event. But I think 
this will have some backward-compatibility problem, maybe we should add a 
parameter to control buttonbox bind on "" or "".

Then we can add set_line_and_column() to the end of the goto_line_event(), and 
have no problem about trigging twice.

--
nosy: +louielu

___
Python tracker 

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



[issue24484] multiprocessing cleanup occasionally throws exception

2017-05-26 Thread Marcin Słowik

Marcin Słowik added the comment:

I can confirm, I have managed to accidentally reproduce this issue on a custom 
build of 3.6.0 on RHEL.
sys.version:
'3.6.0 (default, Jan 18 2017, 11:23:11)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)]'

The issue popped out of nowhere, on a code that was working w/out any hiccups 
on multiple systems; after an insignificant change was made to an unrelated 
part of code.

I managed to "patch it up" by forcingly closing and joining all Queues before 
letting the main process to stop.

Unfortunately, I cannot share the repro code (it's a) too large, b) closed), 
but I can confirm the issue was still open in 3.6.0.

--
nosy: +Marandil

___
Python tracker 

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



[issue30482] socket.getservbyname(), socket.getservbyport(), socket.getprotobyname() are not threadsafe

2017-05-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The configure.ac script should check for the availability of gethostbyname_r 
and friends, like it already does for other functions.

--
nosy: +haypo, pitrou
stage:  -> needs patch
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2017-05-26 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy:  -pitrou

___
Python tracker 

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



[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2017-05-26 Thread Marcel H

Marcel H added the comment:

I want to see this fixed in python3.x as well, please :) the patch should be 
the same

--
nosy: +Marcel H2
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue30471] "as" keyword in comprehensions

2017-05-26 Thread Dávid Nemeskey

Dávid Nemeskey added the comment:

The truth is, I was thinking about going to the list, but according to PEP 42 
(https://www.python.org/dev/peps/pep-0042/), this space was one of the places 
new features could be requested:

"""
Note

This PEP has been rejected as obsolete. All new feature requests should either 
go to the Python bug tracker [1] or the python-ideas [2] mailing list. The rest 
of this document is retained for historical purposes only.
"""

Going to the list, then.

--

___
Python tracker 

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



[issue30481] lib/socket.py, line 330, Treated 'file' as a socket object, instead of int

2017-05-26 Thread Mohamad amin Khakzadan

Mohamad amin Khakzadan added the comment:

sorry, my code have bug.

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



[issue30483] urllib.parse.parse_qsl does not handle unicode data properly

2017-05-26 Thread Abhilash Raj

New submission from Abhilash Raj:

After decoding percentage encoded `name` and `values` in the query string, it 
tries to `_coerce_result` or encode the result to ascii (which is the value of 
_implicit_encoding).

```
  File "/usr/lib/python3.6/urllib/parse.py", line 691, in parse_qsl
value = _coerce_result(value)
  File "/usr/lib/python3.6/urllib/parse.py", line 95, in _encode_result
return obj.encode(encoding, errors)
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 1: 
ordinal not in range(128)
```

As seen in the partial traceback above, it breaks things when trying to parse 
unicode encode query string values.

--
messages: 294541
nosy: maxking
priority: normal
severity: normal
status: open
title: urllib.parse.parse_qsl does not handle unicode data properly
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



[issue30482] socket.getservbyname(), socket.getservbyport(), socket.getprotobyname() are not threadsafe

2017-05-26 Thread Doug Freed

New submission from Doug Freed:

On at least Linux (and probably most other UNIXes, except OS X), the C 
functions getservbyname(), getservbyport(), and getprotobyname() are not 
threadsafe.  CPython's wrappers around these functions in the socket module do 
nothing to cover up this fact.  Simple reproduction script for getservbyname 
(others similar):

```
import threading
import socket

def getservbyname_loop(service, port):
while True:
result = socket.getservbyname(service)
if result != port:
raise RuntimeError("thread-safety broken, got %d, 
expected %d" % (result, port))

thread1 = threading.Thread(target=getservbyname_loop, args=("ssh", 22))
thread2 = threading.Thread(target=getservbyname_loop, args=("smtp", 25))
thread1.start()
thread2.start()
```

One of the threads will throw the RuntimeError, saying it got the port number 
the other thread should have gotten.

Naive fix: a lock (eg, just use the netdb_lock already created in the module)

Proper fix: use the libc's reentrant variant if available, and fall back to 
locking if not (see gethostbyname_ex() implementation for example).

I'd be happy to work on this, but as I don't have access to anything other than 
Linux and OS X at the moment, it would be helpful if platform maintainers could 
chime in on what if any reentrant variants of these functions exist on their 
platforms so we can have a more proper fix.

--
components: Extension Modules
messages: 294540
nosy: dwfreed
priority: normal
severity: normal
status: open
title: socket.getservbyname(), socket.getservbyport(), socket.getprotobyname() 
are not threadsafe
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30481] lib/socket.py, line 330, Treated 'file' as a socket object, instead of int

2017-05-26 Thread Mohamad amin Khakzadan

New submission from Mohamad amin Khakzadan:

When I network programming, I got this problem:

  File "ft.py", line 43, in SendFile
sent=conn.sendfile(fd.fileno(), offset)
  File "D:\Program Files\Python\Python35-32\lib\socket.py", line 391, in 
sendfile
return self._sendfile_use_send(file, offset, count)
  File "D:\Program Files\Python\Python35-32\lib\socket.py", line 330, in 
_sendfile_use_send
file_read = file.read
AttributeError: 'int' object has no attribute 'read'


file_read = file.read
 ^
'file' is fd.fileno() not a socket object


socket.sendfile() documentation:
https://docs.python.org/3/library/socket.html#socket.socket.sendfile

--
components: Windows
messages: 294539
nosy: Mohamad amin Khakzadan, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: lib/socket.py, line 330, Treated 'file' as a socket object, instead of 
int
type: compile error
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



[issue30480] samefile and sameopenfile fail for WebDAV mapped drives

2017-05-26 Thread Eryk Sun

New submission from Eryk Sun:

os.path.samefile (used by shutil copyfile and move), os.path.sameopenfile, and 
pathlib.samefile rely on os.path.samestat (from genericpath.py), which compares 
corresponding st_dev and st_ino values. POSIX assures that the tuple (st_dev, 
st_ino) is unique. Windows makes no such assurance for the combination of the 
volume serial number (st_dev) and file index number (st_ino). The volume serial 
number isn't required to be unique or even non-zero ([MS-FSCC] 2.5.9), and the 
file index number may also be zero if the file system doesn't support it 
([MS-FSCC] 2.4.20).

[MS-FSCC]: File System Control Codes
https://msdn.microsoft.com/en-us/library/cc231987

A WebDAV network drive exemplifies both cases. The volume serial number is 
zero, as is the file index number for every file and directory. Thus samestat() 
is true for every comparison on the drive, whether for a file or directory, and 
also when comparing files mounted on different WebDAV drives.

This isn't a common problem, but I think it's severe enough to warrant a 
separate Windows implementation of samefile and sameopenfile. If the 
corresponding st_dev and st_ino values are equal and either is zero, it should 
compare the final paths via _getfinalpathname. The latter would need to be 
modified to support passing a file descriptor for use with sameopenfile.

--
components: Windows
messages: 294538
nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: test needed
status: open
title: samefile and sameopenfile fail for WebDAV mapped drives
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30477] tuple.index error message improvement

2017-05-26 Thread schen

schen added the comment:

What is the rationale for the inconsistency between tuples and lists here?

().index(0)
ValueError: tuple.index(x): x not in tuple

[].index(0)
ValueError: 0 is not in list

In this simple artificial case, it seems clear to me that the list version 
(which is similar to the proposed change) is superior.

However, it is often not sufficient to use such cases as the basis for making a 
decision. Raymond raises some very good points.

In particular, I noticed that printing the repr quickly becomes unwieldy for 
more complex objects. For example, I tried the following:
[].index(''.join(chr(randrange(97, 97+26)) for _ in range(1000)))
[].index(Counter(randrange(10) for _ in range(1)))

--
nosy: +schen

___
Python tracker 

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



[issue30479] improve asyncio debugging

2017-05-26 Thread Tarek Ziadé

New submission from Tarek Ziadé:

This is a very useful trick to understand why the loop cleanup generates  a lot 
of "Exception ignored in: "

https://github.com/python/asyncio/issues/423#issuecomment-268882753

Could we consider including it in Task.__del__ ?

--
components: asyncio
messages: 294536
nosy: tarek, yselivanov
priority: normal
severity: normal
status: open
title: improve asyncio debugging
type: enhancement
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



[issue30472] [Selenium 3.4.2-geckodriver 0.16.1] Python 3.6.1 unable to initialize webdriver with "marionette" set to True

2017-05-26 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-05-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I could imagine people wanting to build old releases.  But we have Windows 
binaries up here:
https://www.python.org/ftp/python/

Therefore I don't think it's a problem to discontinue svn.python.org once new 
releases are migrated to github (but only once those new releases are out).

--
nosy: +pitrou

___
Python tracker 

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



[issue30472] [Selenium 3.4.2-geckodriver 0.16.1] Python 3.6.1 unable to initialize webdriver with "marionette" set to True

2017-05-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This is the bug tracker for Python itself.  What you're having is an issue with 
selenium, which is a third-party library.  I recommend you post your issue on 
the selenium bug tracker instead.

--
nosy: +pitrou

___
Python tracker 

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



[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-05-26 Thread Benjamin Peterson

Benjamin Peterson added the comment:

How far along are you with removing the svn.python.org dependency. Does  Jan 1 
2018 sound okay for the end of svn.python.org?

I think a PEP is up to you. Doesn't seem like something that needs to be 
approved.

--

___
Python tracker 

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