[issue33196] SEGV in mp.synchronize.Lock.__repr__ in spawn'ed proc if ctx mismatched

2018-03-31 Thread Arcadiy Ivanov

New submission from Arcadiy Ivanov :

While working on GH gevent/gevent#993 I've encountered a stall trying to read 
from an mp.Queue passed to mp.Process's target as an argument. Trying to print 
out the lock state in child process I encountered as SEGV in Lock's __repr__. I 
originally thought it was due to gevent/greenlet stack magic, but it wasn't. 

This happens when `fork` context Queue (default) is used with `spawn` context 
Process (obvious stupidity on my part, alas shouldn't crash).

Python 3.6.4 from PyEnv
Fedora 27

```
$ python test_lock_sigsegv.py 
Parent r_q: , , 

-11
```

```
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __new_sem_getvalue (sem=0x7fc877f54000, sval=sval@entry=0x7fffb130db9c) at 
sem_getvalue.c:38
38*sval = atomic_load_relaxed (>data) & SEM_VALUE_MASK;
...
#0  __new_sem_getvalue (sem=0x7fc877f54000, sval=sval@entry=0x7fffb130db9c) at 
sem_getvalue.c:38
#1  0x7f1116aeb202 in semlock_getvalue (self=) at 
/tmp/python-build.20171219170845.6548/Python-3.6.4/Modules/_multiprocessing/semaphore.c:531
```

At a minimum I think there should be a check trying to reduce arguments via 
incompatible context's process to prevent a SEGV.

Test attached.

--
components: Library (Lib)
files: test_lock_sigsegv.py
messages: 314762
nosy: arcivanov
priority: normal
severity: normal
status: open
title: SEGV in mp.synchronize.Lock.__repr__ in spawn'ed proc if ctx mismatched
type: crash
versions: Python 3.6
Added file: https://bugs.python.org/file47510/test_lock_sigsegv.py

___
Python tracker 

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



[issue33195] PyArg_Parse* should deprecate 'u' and 'z' family.

2018-03-31 Thread INADA Naoki

Change by INADA Naoki :


--
keywords: +patch
pull_requests: +6042
stage:  -> patch review

___
Python tracker 

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



[issue33195] PyArg_Parse* should deprecate 'u' and 'z' family.

2018-03-31 Thread INADA Naoki

New submission from INADA Naoki :

https://docs.python.org/3/c-api/arg.html

Py_UNICODE usage is not deprecated in this document.
Before thinking about raising warning, deprecate it in document first.

But... from when?  Can I backport the "deprecated" doc to 3.6 or 3.5?

--
assignee: docs@python
components: Documentation
messages: 314761
nosy: docs@python, inada.naoki
priority: normal
severity: normal
status: open
title: PyArg_Parse* should deprecate 'u' and 'z' family.
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue33185] Python 3.7.0b3 fails in pydoc where b2 did not.

2018-03-31 Thread Nick Coghlan

Nick Coghlan  added the comment:

It turns out pydoc's CLI is looking specifically for '' in sys.path, but *not* 
looking for "os.getcwd()".

The resulting sys.path manipulation then goes completely wrong for "python -m 
pydoc", since it ends up removing "scriptdir" from sys.path, and that's the 
directory containing "pydoc" and the rest of the standard library.

It surprised me that you were getting the misbehaviour for the direct pydoc 
command though, as for me, that's a separate script living in `*/bin`, so the 
misbehaviour doesn't happen (only the bin directory gets removed from sys.path, 
which is the desired behaviour).

It turns out that behaviour is due to a difference between venv and virtualenv, 
where the latter defines a shell alias to hide the filesystem level pydoc 
scripts installed system wide:

```
$ which pydoc   

pydoc ()


{   


python -m pydoc "$@"


}
```

and hence will encounter the problem.

So I think there are two changes needed here:

1. Update pydoc.cli() to search sys.path for "os.getcwd()" in addition to 
searching for the empty string.
2. Rewording the note in the porting guide to explicitly call out checks for 
"'' in sys.path" in start-up code as potentially requiring updates

--
assignee:  -> ncoghlan

___
Python tracker 

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



[issue33185] Python 3.7.0b3 fails in pydoc where b2 did not.

2018-03-31 Thread Nick Coghlan

Nick Coghlan  added the comment:

I guess this confirms our suspicion from issue 33053 that making "-m" no longer 
track the current working directory had the potential to pose some non-trivial 
compatibility risks :(

I can reproduce the issue in a 3.7 checkout without a virtual environment:

```
$ ./python -m pydoc itertools
No module named 'ast'
```

There's an odd discrepancy between the behaviour when running pydoc and the 
behaviour when running runpy, though:

```
$ ./python -im runpy
No module specified for execution
>>> import sys; print(len(sys.path)); print(sys.path)
5
['/home/ncoghlan/devel/py37', '/usr/local/lib/python37.zip', 
'/home/ncoghlan/devel/py37/Lib', 
'/home/ncoghlan/devel/py37/build/lib.linux-x86_64-3.7', 
'/home/ncoghlan/.local/lib/python3.7/site-packages']
>>>

$ ./python -im pydoc itertools
No module named 'ast'

>>> import sys; print(len(sys.path)); print(sys.path)
5
['.', '/home/ncoghlan/devel/py37', '/usr/local/lib/python37.zip', 
'/home/ncoghlan/devel/py37/build/lib.linux-x86_64-3.7', 
'/home/ncoghlan/.local/lib/python3.7/site-packages']
>>>
```

The path in the `runpy` case is correct, while the path in the `pydoc` case is 
missing the expected `Lib` directory (and hence can't import standard library 
modules), and has had a `.` inserted at the start of `sys.path`.

--

___
Python tracker 

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



[issue33194] Path-file objects does not have method to delete itself if its a file

2018-03-31 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

You're looking for 'Path.unlink'. Agreed though that the name makes it hard to 
find. (I guess it makes sense to old-school Unix greybeards, but Python does 
generally try to be useful for more people than just them...) There was some 
discussion on python-dev a few weeks ago about smoothing over some of these 
rough edges in the Path API, but it kinda fizzled out without anyone 
volunteering to do the work of going through and curating a good list of 
changes and writing down a case for each of them.

--
nosy: +njs

___
Python tracker 

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



[issue32419] Add unittest support for pyc projects

2018-03-31 Thread Bassem Girgis

Bassem Girgis  added the comment:

I Robert,

One use scenario is to run deployment tests for sourceless packages and to
ensure the integrity of the production environment. Very useful in
container environments!

In regards to the looking for the __init__ file, it is obvious that the
logic you mentioned is the reason behind that. However, if the unittest
code used a standard way to figure out "loadable" packages, whatever that
is, it would have captured the fact that python3 can indeed function with
all pyc files.

I would say the fix in here is a dirty one. A better way to solve it is to
call a standard utility which can detect if a package is loadable. This
would resolve this issue and help with any future changes in the standard
as well.

Best regards,
Bassem

Bassem Girgis, PhD

Email: brgir...@gmail.com

On Sat, Mar 31, 2018 at 8:52 PM, Robert Collins 
wrote:

>
> Robert Collins  added the comment:
>
> Oh, and why look for __init__ - in part, because it predates namespace
> packages, but also because unlike regular imports unittest will do negative
> things like reading the entire filesystem otherwise.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue33194] Path-file objects does not have method to delete itself if its a file

2018-03-31 Thread Marco Rougeth

New submission from Marco Rougeth :

Path has the method `.rmdir()` for removing the directory, but it doesn't have 
anything if it correspond to a file.

The `os.remove` could be used here, but I think it should have a more 
appropriate/explicit  name like `.rmfile()`.

If it make  sense, I'd be glad to work on it.

--
messages: 314756
nosy: rougeth
priority: normal
severity: normal
status: open
title: Path-file objects does not have method to delete itself if its a file
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue33193] Cannot create a venv on Windows when directory path contains dollar character

2018-03-31 Thread Stuart Cuthbertson

New submission from Stuart Cuthbertson :

I should clarify first that I haven't reproduced the following bug specifically 
with venv. I was asked to raise this here after raising an identical issue 
about virtualenv (https://github.com/pypa/virtualenv/issues/1154); a GitHub 
user told me this would also apply to venv. 

The bug with virtualenv is that it errors if passed a directory that contains a 
$ (dollar symbol). $ is a valid character for Windows directory names, 
filenames, and usernames. So running something simple like `python3 -m venv` 
(presumably) can fail in some valid Windows directories. 

The full error traceback for virtualenv is available at the above GitHub URL. A 
commenter in the virtualenv project (see 
https://github.com/pypa/virtualenv/issues/457#issuecomment-377159868) suggested 
that this happens because the directory path is passed as-is (with $) to 
distutils, and distutils is seeing the text following the $ as a placeholder 
and trying to replace it with a variable, which isn't found.

--
components: Windows
messages: 314755
nosy: Stuart Cuthbertson, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Cannot create a venv on Windows when directory path contains dollar 
character
type: crash
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



[issue32419] Add unittest support for pyc projects

2018-03-31 Thread Robert Collins

Robert Collins  added the comment:

Whats the use for *unittest* - a tool to help folk develop - to run a test 
which is only present in sourceless form?

--

___
Python tracker 

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



[issue32419] Add unittest support for pyc projects

2018-03-31 Thread Robert Collins

Robert Collins  added the comment:

Oh, and why look for __init__ - in part, because it predates namespace 
packages, but also because unlike regular imports unittest will do negative 
things like reading the entire filesystem otherwise.

--

___
Python tracker 

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



[issue24978] Contributing to Python 2x and 3x Documentation. Translation to Russian.

2018-03-31 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Adding a reference to PEP 545 for contributing documentation translations.

--
nosy: +csabella

___
Python tracker 

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



[issue33096] ttk.Treeview.insert() does not allow to insert item with "False" iid

2018-03-31 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset e80a232f2cfdab584133d9779c83885c5f9f1ba6 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-33096: Fix ttk.Treeview.insert. (GH-6228) (GH-6326)
https://github.com/python/cpython/commit/e80a232f2cfdab584133d9779c83885c5f9f1ba6


--

___
Python tracker 

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



[issue33132] Possible refcount issues in the compiler

2018-03-31 Thread miss-islington

miss-islington  added the comment:


New changeset 9e96e7b24e4d3ff4dce4f24c4e469cd5460712c9 by Miss Islington (bot) 
in branch '3.7':
bpo-33132: Fix more reference counting issues in the compiler. (GH-6323)
https://github.com/python/cpython/commit/9e96e7b24e4d3ff4dce4f24c4e469cd5460712c9


--

___
Python tracker 

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



[issue33192] asyncio should use signal.set_wakeup_fd on Windows

2018-03-31 Thread Nathaniel Smith

New submission from Nathaniel Smith :

I thought there was already a bug for this, but it came up in conversation 
again and I can't find one, so, here you go...

It looks like originally there was this bug for making control-C wake up the 
asyncio event loop in Windows: https://github.com/python/asyncio/issues/191

This required some changes to signal.set_wakeup_fd to work on Windows, which 
was done in bpo-22018.

But I guess the last step got lost in the shuffle: right now 
signal.set_wakeup_fd works fine on Windows, but asyncio doesn't actually use 
it. This means that on Windows you can't wake up this program using control-C:

>>> import asyncio
>>> asyncio.run(asyncio.sleep(1))

Both of the Windows event loops should register a wakeup socket with 
signal.set_wakeup_fd, and arrange for the loop to wake up when data arrives on 
that socket, and read from it until it's empty again. (And once the loop is 
awake, Python's normal control-C handling will kick in.) That will make 
control-C on Windows work similarly to how it does on Unix.

--
messages: 314749
nosy: asvetlov, giampaolo.rodola, njs, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: asyncio should use signal.set_wakeup_fd on Windows
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-03-31 Thread Jakub Wilk

Change by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue33132] Possible refcount issues in the compiler

2018-03-31 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6041

___
Python tracker 

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



[issue33132] Possible refcount issues in the compiler

2018-03-31 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset aa8e51f5ebb2a71c76059f050de01fc3c985376a by Serhiy Storchaka in 
branch 'master':
bpo-33132: Fix more reference counting issues in the compiler. (GH-6323)
https://github.com/python/cpython/commit/aa8e51f5ebb2a71c76059f050de01fc3c985376a


--

___
Python tracker 

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



[issue33096] ttk.Treeview.insert() does not allow to insert item with "False" iid

2018-03-31 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6040

___
Python tracker 

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



[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-03-31 Thread Nitish

Change by Nitish :


--
nosy: +nitishch

___
Python tracker 

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



[issue33132] Possible refcount issues in the compiler

2018-03-31 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 25c869edd665cba7187910c5b151a0016fec4754 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-33132: Fix reference counting issues in the compiler. (GH-6209). 
(GH-6321)
https://github.com/python/cpython/commit/25c869edd665cba7187910c5b151a0016fec4754


--

___
Python tracker 

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



[issue33132] Possible refcount issues in the compiler

2018-03-31 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6039

___
Python tracker 

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



[issue33132] Possible refcount issues in the compiler

2018-03-31 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6038

___
Python tracker 

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



[issue33132] Possible refcount issues in the compiler

2018-03-31 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6037

___
Python tracker 

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



[issue32419] Add unittest support for pyc projects

2018-03-31 Thread Bassem Girgis

Bassem Girgis  added the comment:

Please let me know what I need to do in order to close this issue and finally 
merge the code.

--

___
Python tracker 

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



[issue33169] importlib.invalidate_caches() doesn't clear all caches

2018-03-31 Thread Brett Cannon

Brett Cannon  added the comment:

OK, I will update importlib.machinery.PathFinder.invalidate_caches() to also 
drop None from sys.path_importer_cache (objects that are not None and do not 
define invalidate_caches() will be left alone just like they are today). I 
should hopefully be able to get to this before b4.

--
assignee:  -> brett.cannon
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



[issue28053] parameterize what serialization is used in multiprocessing

2018-03-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I'd like to know if the work here will be completed soon :-) This currently 
lacks documentation but also tests.

In particular, looking at the code (and that is supported by Will S' comment 
above), I feel the API isn't working as intended (i.e. setting the "reducer" 
property won't actually change the underlying parameters since the "reduction" 
module is imported eagerly).

--
nosy: +pitrou

___
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

2018-03-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Please note the PR here has some review comments that need addressing.
Also, it needs its conflicts with git master resolved.

I'm cc'ing Thomas Moreau, who has done a lot of work recently on the 
concurrent.futures internals.

--
assignee: davin -> 
nosy: +tomMoral
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue14119] Ability to adjust queue size in Executors

2018-03-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Issue 29595 has a more complete PR, so closing this issue as duplicate.

--
nosy: +pitrou
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Expose max_queue_size in ThreadPoolExecutor

___
Python tracker 

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



[issue33188] dataclass MRO entry resolution for type variable metaclasses: TypeError

2018-03-31 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6036

___
Python tracker 

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



[issue31544] gettext.Catalog title is not flagged as a class

2018-03-31 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
Removed message: https://bugs.python.org/msg314739

___
Python tracker 

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



[issue31455] ElementTree.XMLParser() mishandles exceptions

2018-03-31 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

New changeset c498cd8bf81fc47acf2f1f702e8b3bc9bd4aed65 by Serhiy Storchaka 
(scoder) in branch '2.7':
bpo-31544: Fix a reference leak to 'self' after the previous target error 
handling fixes. (GH-6318)
https://github.com/python/cpython/commit/c498cd8bf81fc47acf2f1f702e8b3bc9bd4aed65

--

___
Python tracker 

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



[issue31544] gettext.Catalog title is not flagged as a class

2018-03-31 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The correct issue for 0694b6a651ba2a53f6323ffb3b23358f43885815 and 
c498cd8bf81fc47acf2f1f702e8b3bc9bd4aed65 is issue31455.

--

___
Python tracker 

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



[issue31544] gettext.Catalog title is not flagged as a class

2018-03-31 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset c498cd8bf81fc47acf2f1f702e8b3bc9bd4aed65 by Serhiy Storchaka 
(scoder) in branch '2.7':
bpo-31544: Fix a reference leak to 'self' after the previous target error 
handling fixes. (GH-6318)
https://github.com/python/cpython/commit/c498cd8bf81fc47acf2f1f702e8b3bc9bd4aed65


--

___
Python tracker 

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



[issue33188] dataclass MRO entry resolution for type variable metaclasses: TypeError

2018-03-31 Thread Eric V. Smith

Eric V. Smith  added the comment:

Yeah, no need to change the API. I was over-generalizing.

--

___
Python tracker 

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



[issue33181] SimpleHTTPRequestHandler shouldn't redirect to directories with code 301

2018-03-31 Thread Matt Eaton

Matt Eaton  added the comment:

Adding some core team members to the nosy list to get their take on this as 
well.

--
nosy: +berker.peksag, eric.smith

___
Python tracker 

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



[issue33186] Memory corruption with urllib.parse

2018-03-31 Thread Ivan Zakharyaschev

Ivan Zakharyaschev  added the comment:

Actually, Alexey shared this problem with me orally first, and then asked to 
have a look at his report, and I felt that just describing the technical 
details about what is going on is not enough, and suggested to include a brief 
sentence which would state what kind of assumptions seemed to be broken to 
Alexey. And it was:

> a list contains elements that have never been appended.

And this statement actually appeared quite helpful for me: in a few hours after 
this statement was made, I got an idea that this statement might actually be 
not true in this case. And this quickly lead me to the demonstration what 
really happens here, and that it was correct Python behavior.

Without this brief formal statement of the broken assumptions, I had simply had 
no ideas (because I supposed that something was going wrong according to 
Alexey's words, and didn't question whether it is really wrong or we might 
expect these results under some conditions as correct results).

(Actually, I'm a fan of type-checking, and what is more, of languages with 
expressive types like Agda or Idris where the programmer is to make provable 
statements of the expected properties written down as types; sometimes, they 
can be derived automatically, but nevertheless my point is the attitude to 
programming, even without formal tools: think how the expected properties would 
be proved, how they would be decomposed into simpler statements during the 
proof. Well, this is offtopic here, so, Alexey, let's not continue this 
discussion here.)

--

___
Python tracker 

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



[issue33188] dataclass MRO entry resolution for type variable metaclasses: TypeError

2018-03-31 Thread Ivan Levkivskyi

Change by Ivan Levkivskyi :


--
keywords: +patch
pull_requests: +6035
stage:  -> patch review

___
Python tracker 

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



[issue31455] ElementTree.XMLParser() mishandles exceptions

2018-03-31 Thread Stefan Behnel

Stefan Behnel  added the comment:

PR 6318 fixes the reference leak for Py2.7.

--

___
Python tracker 

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



[issue31455] ElementTree.XMLParser() mishandles exceptions

2018-03-31 Thread Stefan Behnel

Change by Stefan Behnel :


--
pull_requests: +6034
stage: resolved -> patch review

___
Python tracker 

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



[issue32823] Regression in test -j behavior and time in 3.7.0b1

2018-03-31 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

python -m test -j0

--

___
Python tracker 

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



[issue31455] ElementTree.XMLParser() mishandles exceptions

2018-03-31 Thread Stefan Behnel

Stefan Behnel  added the comment:

Right, Zachary, thanks for noticing. Py2.7 is actually way more different than 
I thought, and I hadn't paid enough attention to that. Py3 does all of this in 
"__init__", whereas Py2 essentially implements "__new__" in C, which requires 
more cleanup.

BTW, the implementation in Py3 would also benefit from refactoring the error 
handling code and moving it all in one place. But it shouldn't suffer from the 
same kind of problem, at least.

--

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-03-31 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

posix_spawn() is not documented, it contains reference leaks (issue33191) and 
can cause crashes. It's style doesn't conform PEP 7.

The simplest fix requires changing the undocumented interface.

--
dependencies: +Refleak in posix_spawn
nosy: +serhiy.storchaka
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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