[issue36155] ./python -m test -m test_gc fails

2019-03-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This may be more complicated that it seems as these two statements are true at 
the same time:

l in gc.get_objects(generation=0)
True
p l in gc.get_objects(generation=2)
True

--

___
Python tracker 

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



[issue36155] ./python -m test -m test_gc fails

2019-03-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

But this only happens when running the test suite as ./python.exe -m test -m 
test_gc

--

___
Python tracker 

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



[issue36155] ./python -m test -m test_gc fails

2019-03-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ok, this is happening because there is a unittest.mock._ANY in the second 
generation.

--

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread Inada Naoki


Inada Naoki  added the comment:

How do you execute Python?
If you don't use terminal, please try executing Python from terminal.
And see what is output from Python in terminal.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue36155] ./python -m test -m test_gc fails

2019-03-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue36155] ./python -m test -m test_gc fails

2019-03-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

If I understand this correctly any combination that imports mock._ANY affects 
test_gc like below combination that uses mock._ANY causes test_gc to fail ?

./python.exe -m unittest unittest.test.testmock test.test_gc
[snip output]
--
Ran 404 tests in 8.551s

FAILED (failures=1, skipped=1)

--

___
Python tracker 

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



[issue36155] ./python -m test -m test_gc fails

2019-03-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yup, I was actually using:

./python.exe -m test  test_asyncio test_gc -m test_gc 

when I found out thst the core cause was mock._ANY :)

--

___
Python tracker 

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



[issue36155] ./python -m test -m test_gc fails

2019-03-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset d60a79a1015aa26ff7ee3166820ec43558911b60 by Pablo Galindo in 
branch 'master':
bpo-36155: Check for identity on test_gc.test_get_objects (GH-12116)
https://github.com/python/cpython/commit/d60a79a1015aa26ff7ee3166820ec43558911b60


--

___
Python tracker 

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



[issue36155] ./python -m test -m test_gc fails

2019-03-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ok, this one has been fun :)

Thanks for finding this one @xtreak!

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



[issue36155] ./python -m test -m test_gc fails

2019-03-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

No problem. Thanks for fix :)

I stumbled upon it due to a typo where I used -m instead of -v in python -m 
test -m test_gc instead of python -m test -v test_gc . Any suggestion on how 
you debugged it was mock ?

--

___
Python tracker 

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



[issue36155] ./python -m test -m test_gc fails

2019-03-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Well, unless there was a bug on the gc, the only way the list l could be on 
both lists is if in one of them there was something that was saying that is 
equal to it. To confirm I checked what was equal to l in the second generation 
and I saw it was mock.ANY 

:)

--

___
Python tracker 

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



[issue36155] ./python -m test -m test_gc fails

2019-03-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the explanation :)

--

___
Python tracker 

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



[issue36156] different method, but id function return same value.

2019-03-01 Thread lgj


New submission from lgj <929102...@qq.com>:

>>> class A:
... def a(self):
... return 0
... def a1(self):
... return 1
...
>>> a =A()
>>> id(a.a)
4316559496
>>> id(a.a1)
4316559496
>>> id(a)
4318155272
It' seems oops , according to the id function source code.
here is the description of builtin_id function in Python/bltinmodule.c
/* 
Return the identity of an object.

This is guaranteed to be unique among simultaneously existing objects.
(CPython uses the object's memory address.)
[clinic start generated code]*
/
It seems should return different value, but id(a.a) as same as 
id(a.a1), Is it a bug?

--
components: Library (Lib)
messages: 336912
nosy: lgj1993
priority: normal
severity: normal
status: open
title: different method, but id function return same value.
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



[issue31904] Python should support VxWorks RTOS

2019-03-01 Thread Peixing Xin


Change by Peixing Xin :


--
pull_requests: +12123

___
Python tracker 

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



[issue36152] IDLE: Remove close_when_done from colorizer close()

2019-03-01 Thread Cheryl Sabella


Cheryl Sabella  added the comment:


New changeset b9f0354efce95b7557bc43ea193c4b652cd28392 by Cheryl Sabella in 
branch 'master':
bpo-36152: IDLE: Remove unused parameter from colorizer (GH-12109)
https://github.com/python/cpython/commit/b9f0354efce95b7557bc43ea193c4b652cd28392


--

___
Python tracker 

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



[issue36152] IDLE: Remove close_when_done from colorizer close()

2019-03-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12124

___
Python tracker 

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



[issue26752] Mock(2.0.0).assert_has_calls() raise AssertionError in two same calls

2019-03-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

@guboi72 is right that signature for class constructor is used also for 
methods. Another possible solution would be that mock stores it's children in 
_mock_children dictionary so when a method is called then name can be used to 
get the relevant child mock which would have the signature set that can be used.

In the below program call().foo also uses the signature (a, b) of __init__ and 
in the call_matcher check name "foo" can be used to get the child mock from 
mock_class._mock_children that will have the signature set during 
create_autospec. This will give the signature (a) but it's little difficult to 
construct the name. It also needs to handle cases for inner classes like 
Foo.Bar.foo() where Bar is an inner class inside Foo.

from unittest.mock import *

class Foo:

def __init__(self, a, b):
pass

def foo(self, a):
pass


mock_class = create_autospec(Foo)
mock = mock_class(1, 2)
mock.foo(1)
print(mock_class._mock_children)
print(mock._mock_children)
mock_class.assert_has_calls([call(1, 2), call().foo(1)])
mock.assert_has_calls([call.foo(1)])


$ python3.7 ../backups/unittest_mock_spec_conflict.py
{'foo': }
{'foo': }
Traceback (most recent call last):
  File "../backups/unittest_mock_spec_conflict.py", line 17, in 
mock_class.assert_has_calls([call(1, 2), call().foo(1)])
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/mock.py",
 line 852, in assert_has_calls
) from cause
AssertionError: Calls not found.
Expected: [call(1, 2), call().foo(1)]
Actual: [call(1, 2), call().foo(1)]

A very rough hack that fixes the above case and explains my approach but not so 
robust.

diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 2ccf0d82ce..f0e917d57e 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -777,7 +777,17 @@ class NonCallableMock(Base):
 else:
 name, args, kwargs = _call
 try:
-return name, sig.bind(*args, **kwargs)
+if name:
+if name.startswith("()"):
+mock_name = "mock" + name # Handle call().foo where 
name is ().foo
+else:
+mock_name = "mock." + name # Handle call.foo where 
name is foo
+sig = self._mock_children.get(mock_name)
+
+if sig:
+return name, sig.bind(*args, **kwargs)
+else:
+return _call
 except TypeError as e:
 return e.with_traceback(None)
 else:

--
nosy: +cjw296, mariocj89
versions: +Python 3.7, Python 3.8 -Python 3.6

___
Python tracker 

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



[issue36156] different method, but id function return same value.

2019-03-01 Thread Inada Naoki


Inada Naoki  added the comment:

a.a creates temporal method object.  After id(a.a), it is removed.
So a.a and a.a1 are not "simultaneously existing objects" in your case.

Try this:

x = a.a
y = a.a1
id(x), id(y)

x and y are "simultaneously existing objects" now.

--
nosy: +inada.naoki
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



[issue36152] IDLE: Remove close_when_done from colorizer close()

2019-03-01 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue36156] different method, but id function return same value.

2019-03-01 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

bugs.python.org seems to be down at the moment, so please forgive me if 
this ticket has already been closed and I'm repeating what has already 
been said.

> This is guaranteed to be unique among simultaneously existing objects.

Note the *simultaneously existing* comment. Since the method objects a.a 
and a.a1 don't exist simultaneously, the interpreter is allowed to reuse 
the same ID for each.

(P.S. please, next time use less confusing names!)

Your code does this:

- fetch a.a, which returns a new method object;
- print the ID of that method object;
- throw away and garbage collect the method object;
- fetch a.a1, which returns a new method object;
- print the ID of that method object which happens
  to get the same value as the previous object;
- throw away and garbage collect the method object.

You can see the difference if you do this:

spam = a.a
eggs = a.a1
print(id(spam), id(eggs))

and you will get two different IDs.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue35859] Capture behavior depends on the order of an alternation

2019-03-01 Thread Ma Lin

Ma Lin  added the comment:

The PR11756 is prepared.
I force-pushed the patch in four steps, hope you can review it easier:
https://github.com/python/cpython/pull/11756/commits

🔴 Step 1, test-cases

Show the wrong behaviors before this fix, the corresponding test-case will be 
updated in next steps.

🔴 Step 2, MARK_PUSH(lastmark) macro bug

This bug was reported in this issue.

MARK_PUSH(lastmark) macro didn't protect MARK-0 if it was the only available 
mark.

Note that if skip this step and apply Step 3, it happens to pass the test. But 
this is indeed a bug that should be fixed.

🔴 Step 3, jump JUMP_MIN_UNTIL_3 needs LASTMARK_SAVE() and MARK_PUSH()

This bug was triggered by a pattern which provided by Serhiy Storchaka:
>>> re.match(r'(ab?)*?b', 'ab').group(1)
''
Expected result: 'a'

This is due to the lack of protection before JUMP.
sre has these JUMPs, the current protection is written in [], the purpose of 
this JUMP is written in ().

in op SRE_OP_MAX_UNTIL 🔹 (...)*
JUMP_MAX_UNTIL_1 [no protect] (try a repeat, to min limit of repeat)
JUMP_MAX_UNTIL_2 [LASTMARK_SAVE, MARK_PUSH] (try a repeat, until max limit of 
repeat)
JUMP_MAX_UNTIL_3 [no protect] (try the tail of this repeat)

in op SRE_OP_MIN_UNTIL 🔹 (...)*?
JUMP_MIN_UNTIL_1 [no protect] (try a repeat, to min limit of repeat)
JUMP_MIN_UNTIL_2 [LASTMARK_SAVE] (try the tail of this repeat)
JUMP_MIN_UNTIL_3 [no protect] (try a repeat, until max limit of repeat)

in op SRE_OP_REPEAT_ONE 🔹 .*
JUMP_REPEAT_ONE_1 [LASTMARK_SAVE] (try the tail of this repeat)
JUMP_REPEAT_ONE_2 [LASTMARK_SAVE] (try the tail of this repeat)

in op SRE_OP_MIN_REPEAT_ONE 🔹 .*?
JUMP_MIN_REPEAT_ONE [LASTMARK_SAVE] (try the tail of this repeat) 

in op SRE_OP_BRANCH 🔹 ...|...
JUMP_BRANCH [LASTMARK_SAVE in any case, MARK_PUSH if in a repeat] (try a branch)

in op SRE_OP_ASSERT 🔹 (?=...)
JUMP_ASSERT [no protect] (try to match a sub-pattern)

in op SRE_OP_ASSERT_NOT 🔹 (?!=...)
JUMP_ASSERT_NOT [no protect] (try to match a sub-pattern)

These protections have not been changed since commit caf1c9dfe779 (2003-4-27).
Why it came out like this? There is a note in the message of commit 
be733ee7fb7e (2003-4-20):

> Gustavo Niemeyer wrote:
> As a note. It seems that there are other places that require the
> "protection" of LASTMARK_SAVE()/LASTMARK_RESTORE(), and are just
> waiting for someone to find how to break them. Particularly, I
> believe that every recursion of SRE_MATCH() should be protected
> by these macros. I won't do that right now since I'm not completely
> sure about this, and we don't have much time for testing until
> the next release.

Now we found some test-cases to break them, it seems JUMP_MIN_UNTIL_3 should be 
protected.

I tried to summarize a rule of protection:

if is_backtrack_point: # may backtrack if the tail fail
LASTMARK_SAVE()
elif is_repeat_body:   # is a sub-pattern inside (...)* or (...)*?
LASTMARK_SAVE()
MARK_PUSH()

I did some experiments, it seems this rule works.
Since JUMP_MIN_UNTIL_3 is a repeat body, it needs protection, same as 
JUMP_MAX_UNTIL_2.

With this rule, JUMP_MAX_UNTIL_3 should LASTMARK_SAVE() as well, but this is 
not needed. sre uses stack to simulate recursive call, in fact JUMP_MAX_UNTIL_3 
is protected by JUMP_MAX_UNTIL_2 from the previous SRE_OP_MAX_UNTIL execution.

🔴 Step 4, JUMP_ASSERT_NOT needs LASTMARK_SAVE()

This bug is about negative assertion, initially reported in issue725149, but 
they didn't fix it for some reasons:

> Gustavo Niemeyer wrote:
> it changes the current behavior, which is also compatible to how
> perl works.
> ...
> This way, we can think further about this, and look for an elegant
> solution to fix that support, certainly including some algorithm
> to check for half-marked groups.

IMO we can fix it, here is two test-cases:

Case-A, negative assertion:
re.match(r'(?!(..)c)', 'ab').group(1)

Case-B, negative assertion in a repeat:
re.match(r'(?:(?!(ab)c).)*', 'ab').group(1)

Case-A Case-B
PHP 7.3.2   NULL   NULL
Java 11.0.2 null   null
Perl 5.26.1 "ab"   "ab"
Ruby 2.6.1  nilnil
Go 1.12 doesn't support lookaround
Rust 1.32.0 doesn't support lookaround
Node.js 10.15.1 undefined  undefined
regex 2019.2.21 None   None
re before patch "ab"   "b"
re after patch  None   None

In Case-A, sre looks compatible with Perl.
But in Case-B, sre is definitely wrong, so we can follow the mainstream 
behavior.

🔴 Interesting sidelights 1

Found a Perl bug:

perl -le 'print defined($1)?"\"$1\"":"undef",",",defined($2)?"\"$2\"":"undef" 
if "ab" =~ /((ab?)*?b)/'
"ab",undef

Expected result: "ab","a"

All other engines (except unpatched sre) return the correct result.

🔴 Interesting sidelights 2

>>> re.match(r'(((a)|b)*)', 'ab').groups()
('ab', 'b', 'a')

Maybe the correct result is ('ab', 'b', None), only Node.js 10.15.1 returns 
this.
All other engines re

[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:

TODO: check if _Py_ClearFileSystemEncoding() uses the right memory allocator. 
_Py_SetFileSystemEncoding() doesn't change temporarily the memory allocator.

--

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12125

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8058bdae3e5e1f77a202d9dc907b4189409c9b03 by Victor Stinner in 
branch 'master':
bpo-36146: Refactor setup.py: PyBuildExt.add() method (GH-12097)
https://github.com/python/cpython/commit/8058bdae3e5e1f77a202d9dc907b4189409c9b03


--

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12126

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset dfe884759d1f4441c889695f8985bc9feb9f37eb by Victor Stinner in 
branch 'master':
bpo-36142: Rework error reporting in pymain_main() (GH-12113)
https://github.com/python/cpython/commit/dfe884759d1f4441c889695f8985bc9feb9f37eb


--

___
Python tracker 

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



[issue36152] IDLE: Remove close_when_done from colorizer close()

2019-03-01 Thread miss-islington


miss-islington  added the comment:


New changeset 70852b1eb6fbcc41fe9cad042e9ca61c5148fbda by Miss Islington (bot) 
in branch '3.7':
bpo-36152: IDLE: Remove unused parameter from colorizer (GH-12109)
https://github.com/python/cpython/commit/70852b1eb6fbcc41fe9cad042e9ca61c5148fbda


--
nosy: +miss-islington

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12127

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread kellena


kellena  added the comment:

When I run python3 in a terminal window, I get the same pop-up window with 
"Python quit unexpectedly error." In the terminal, I get:

Fatal Python error: initfsencoding: unable to load the file system codec

ModuleNotFoundError: No module named 'encodings'


Current thread 0x00011422c5c0 (most recent call first):

Abort trap: 6

--

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 625dbf2567533e6001d57e5969fba75c1b6ece43 by Victor Stinner in 
branch 'master':
bpo-36146: Refactor setup.py: Add PyBuildExt.srcdir (GH-12124)
https://github.com/python/cpython/commit/625dbf2567533e6001d57e5969fba75c1b6ece43


--

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12128

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 95e2cbf32f8156c239b27dae558ba058d0f2d496 by Victor Stinner in 
branch 'master':
bpo-36142: Move command line parsing to coreconfig.c (GH-12123)
https://github.com/python/cpython/commit/95e2cbf32f8156c239b27dae558ba058d0f2d496


--

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread Inada Naoki


Inada Naoki  added the comment:

> Fatal Python error: initfsencoding: unable to load the file system codec
>
> ModuleNotFoundError: No module named 'encodings'

OK, this is the important part which describes what Python failed.

In this case, Python can't find it's very important standard library; 
'encodings'.

You may remove it, or you configured Python badly via environment variables.
Try `env | grep PYTHON` in your terminal.  Any environment variables
relating to Python is configured?

--

___
Python tracker 

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



[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue13055] Distutils tries to handle null versions but fails

2019-03-01 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +12129
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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5ec33a1c25a586552751ca35c85ab7ecb6b06ec3 by Victor Stinner in 
branch 'master':
bpo-36146: Split setup.py into subfunctions (GH-12125)
https://github.com/python/cpython/commit/5ec33a1c25a586552751ca35c85ab7ecb6b06ec3


--

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12130

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c991f2415d4eef663039a83125aa6aad81672680 by Victor Stinner in 
branch 'master':
bpo-36146: Don't run code at setup.py top level (GH-12127)
https://github.com/python/cpython/commit/c991f2415d4eef663039a83125aa6aad81672680


--

___
Python tracker 

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



[issue36116] test_multiprocessing_spawn fails on AMD64 Windows8 3.x

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:

https://buildbot.python.org/all/#/builders/32/builds/2219

FAIL: test_mymanager_context_prestarted 
(test.test_multiprocessing_spawn.WithManagerTestMyManager)
Re-running failed tests in verbose mode
Re-running test 'test_multiprocessing_spawn' in verbose mode
FAIL: test_mymanager_context_prestarted 
(test.test_multiprocessing_spawn.WithManagerTestMyManager)

--

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12131

___
Python tracker 

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



[issue36157] Document PyInterpreterState_Main().

2019-03-01 Thread Eric Snow


New submission from Eric Snow :

PyInterpreterState_Main() is a function in the public C-API that returns a 
pointer to the main interpreter's state.  The main interpreter is the first one 
created by the CPython runtime during startup (e.g. when the "python" command 
is run).

Documentation for PyInterpreterState_Main() should be on the "Initialization, 
Finalization, and Threads" page of the C-API docs, probably in the 
"Sub-interpreter support" section. [1]  It could also possibly go in the 
"Advanced Debugger Support" section. [2]

FYI, I added PyInterpreterState_Main() at PyCon US 2017 (commit 
f5df46d701d29baf738365da6fcf1b8a3ceabb71) when I merged Nick Coghlan's internal 
implementation of PEP 432.  So it has been available since 3.7.


[1] https://docs.python.org/3/c-api/init.html#sub-interpreter-support
[2] https://docs.python.org/3/c-api/init.html#advanced-debugger-support

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 336929
nosy: docs@python, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Document PyInterpreterState_Main().
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



[issue27321] Email parser creates a message object that can't be flattened

2019-03-01 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

@r.david.murray, it appears that all your requested changes have been addressed 
on the PR.  Please re-review this when you get a chance.  Thanks!

--
nosy: +cheryl.sabella
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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12132

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 91b9ecf82c3287b45f39158c5134a87414ff26bc by Victor Stinner in 
branch 'master':
bpo-36142: Add preconfig.c (GH-12128)
https://github.com/python/cpython/commit/91b9ecf82c3287b45f39158c5134a87414ff26bc


--

___
Python tracker 

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



[issue36153] Freeze support documentation is misleading.

2019-03-01 Thread Sridhar Iyer


Sridhar Iyer  added the comment:

Please find the attached python file where the issue is seen.
The cli to create an executable was:
$pyinstaller run_server_min.spec

Here are the contents of the file (this doesn't support multiple file uploads):

# -*- mode: python ; coding: utf-8 -*-

block_cipher = None


a = Analysis(['run_server_min.py'],
 pathex=[''],
 binaries=[],
 datas=[],
 hiddenimports=['sklearn.neighbors.typedefs', 
'sklearn.neighbors.quad_tree', 'sklearn.tree._utils', 'xgboost', 
'xgboost.libpath'],
 hookspath=['pyhooks'],
 runtime_hooks=[],
 excludes=[],
 win_no_prefer_redirects=False,
 win_private_assemblies=False,
 cipher=block_cipher,
 noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
 cipher=block_cipher)
exe = EXE(pyz,
  a.scripts,
  a.binaries,
  a.zipfiles,
  a.datas,
  [],
  name='run_server_min',
  debug=False,
  bootloader_ignore_signals=False,
  strip=False,
  upx=False,
  runtime_tmpdir=None,
  console=True )
=

$ pyinstaller run_server_min.spec
69 INFO: PyInstaller: 3.5.dev0+cb8d10af6
69 INFO: Python: 3.6.7
70 INFO: Platform: Linux-3.16.0-77-generic-x86_64-with-debian-jessie-sid
...

When your run ./dist/run_server_min that is generated, it'll spawn the process 
multiple times. The issue goes away when you add freeze_support on the top.

--
Added file: https://bugs.python.org/file48182/run_server_min.py

___
Python tracker 

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



[issue31689] random.choices does not work with negative weights

2019-03-01 Thread Ted Whalen


Ted Whalen  added the comment:

I think this should be reopened, as the behavior doesn't always raise an error, 
and, in fact, does something very unexpected:

Python 3.7.2 (default, Jan 13 2019, 12:50:01)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import Counter
>>> from random import choices
>>> Counter(choices("abcdefg", weights=(1,1,-1,1,1,0,1), k=1))
Counter({'a': 2569, 'b': 2514, 'e': 2487, 'g': 2430})

It's really not clear to me why supplying a negative weight for "c" should have 
any effect on "d".

--
nosy: +Ted Whalen

___
Python tracker 

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



[issue35178] Typo/trivial mistake in warnings.py (may be related to 2.x to 3.x conversion)

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset be7c460fb50efe3b88a00281025d76acc62ad2fd by Victor Stinner 
(Xtreak) in branch 'master':
bpo-35178: Fix warnings._formatwarnmsg() (GH-12033)
https://github.com/python/cpython/commit/be7c460fb50efe3b88a00281025d76acc62ad2fd


--

___
Python tracker 

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



[issue35178] Typo/trivial mistake in warnings.py (may be related to 2.x to 3.x conversion)

2019-03-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12133

___
Python tracker 

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



[issue36158] Regex search behaves differently in list comprehension

2019-03-01 Thread Matthew Drago


New submission from Matthew Drago :

Say for example i want to apply a regex on a list of strings. 

Using list comprehension as such results in the group method not being found.
```
name_regex = compile(r'\[\"([a-zA-Z\s]*)\"{1}')

named_entities = [name_regex.match(entity.trigger).group(1) for entity in 
entities[0]]
```
This unexpected behavior can also be observed when implementing this using a 
map.

```
list(map(lambda x: name_regex.search(x.trigger).group(), entities[0])) 
```

However using the traditional for loop implementation the group method is 
resolved.
```
named_entities = []
for entity in entities[0]:
   named_entities.append(name_regex.match(entity.trigger).group(1))
```

--
components: Regular Expressions
messages: 336936
nosy: Matthew Drago, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: Regex search behaves differently in list comprehension
type: 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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset cfe172dc6bd0a02d36db31ffabcc38f9320a4510 by Victor Stinner in 
branch 'master':
bpo-36146: Add TEST_EXTENSIONS to setup.py (GH-12129)
https://github.com/python/cpython/commit/cfe172dc6bd0a02d36db31ffabcc38f9320a4510


--

___
Python tracker 

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



[issue27640] add the '--disable-test-suite' option to configure

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:

I modified setup.py to add a new TEST_EXTENSIONS which allows to not build test 
extensions:

New changeset cfe172dc6bd0a02d36db31ffabcc38f9320a4510 by Victor Stinner in 
branch 'master':
bpo-36146: Add TEST_EXTENSIONS to setup.py (GH-12129)
https://github.com/python/cpython/commit/cfe172dc6bd0a02d36db31ffabcc38f9320a4510

setup.py should be modified manually, but it's a small step towards be able to 
build Python without tests ;-)

--

___
Python tracker 

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



[issue36146] Refactor setup.py

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, I splitted my giant PR 12068 into multiple small commits. So they are 
easier to review and understand ;-) I close the issue.

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



[issue33944] Deprecate and remove pth files

2019-03-01 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

On 01.03.2019 3:58, Steve Dower wrote
> Import hooks can always be injected by a package __init__.py before the 
> importer will try and resolve the module, so nothing is needed there.

I thought the flaw in this reasoning in 
https://bugs.python.org/issue33944#msg320277 was obvious and didn't want 
to bother people refuting it. Apparently not.

To do anything in __init__.py, that __init__.py itself needs to be 
already importable. This very well may not be the case -- in fact, 
import hooks were designed specifically for the scenarios where this is 
not the case.

Imagine e.g. loading modules from a cloud storage (why not?) -- so 
nothing on the system at all except the hook. Or, suggested earlier in 
this ticket, a union namespace where the code to import needs to be 
constructed on the fly.

> .pth files really only satisfy the "run at startup because I'm a dependency 
> of something that my user wants and don't make them opt-in to my changed 
> behaviour"

Startup code (custom or not) is not a dependency of anything. It rather 
customizes the environment in which the program specified by the user would 
run, _before_ any user code could be allowed to get control. It is not a part 
of the program to be run but rather of the environment that the user wants, and 
it needs to be implicit so the user can use the same commands and code (compare 
venv). This is a required feature because the stock Python startup logic cannot 
possibly provide all the customizations that a user may need (compare initrd).

.pth's are equivalent to sitecustomize but allow the user to manage the set of 
code chunks automatically using the packaging infrastructure (compare .d 
directories in UNIX). The fact that this feature is mixed up with and often 
supplements "real packages" that a program would explicitly use is actually 
incidental: a package with a .pth does not need to have any functionality 
intended for explicit use.

> which I don't like 

If you don't like something, there's always a specific reason -- though you may 
not understand it consciously. So the way to go is dig into it, find out what 
specific speck is putting you off -- only then can you be sure that you are 
concentrating on the right thing and won't throw the baby out with the 
bathwater. Try to change one trait in your mind's eye leaving all else intact 
-- will the feeling go away? If it will, you are on the right track; can the 
trait you chose be split further? You know you found it when you can't change 
any further part and change the feeling and you can say with confidence how 
exactly what it's doing misaligns with your moral compass.

We already identified a few real reasons: hard to see, hard to debug, 
encourages unreadable code, run in arbitrary order when the order matters (and 
IIRC I provided fixes for all). What else?

--

___
Python tracker 

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



[issue35478] multiprocessing: ApplyResult.get() hangs if the pool is terminated

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:

Pablo: since you worked on multiprocessing recently, did you see this bug? I'm 
not sure about my PR 11139...

If someone else wants to work on a fix, ignore my PR ;-)

--
nosy: +davin, pitrou

___
Python tracker 

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



[issue35178] Typo/trivial mistake in warnings.py (may be related to 2.x to 3.x conversion)

2019-03-01 Thread miss-islington


miss-islington  added the comment:


New changeset b94874f7e27cbc92e0aec8779ee98bcb16efb257 by Miss Islington (bot) 
in branch '3.7':
bpo-35178: Fix warnings._formatwarnmsg() (GH-12033)
https://github.com/python/cpython/commit/b94874f7e27cbc92e0aec8779ee98bcb16efb257


--
nosy: +miss-islington

___
Python tracker 

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



[issue35178] Typo/trivial mistake in warnings.py (may be related to 2.x to 3.x conversion)

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Tashrif Billah and  Karthikeyan Singaravelan for the fix!

Sadly, Python 3.6 now only accept security fixes, and so this bug cannot be 
fixed in the 3.6 branch anymore.

The workaround is the rename the last parameter of your customer formatmsg 
function to 'line' ;-)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8 -Python 3.6

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-03-01 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

On 01.03.2019 20:27, Ivan Pozdeev wrote:
> The fact that this feature is mixed up with and often supplements 
> "real packages" that a program would explicitly use is actually 
> incidental: a package with a .pth does not need to have any 
> functionality intended for explicit use.
>
Eureka! So, there are actually two kinds of packages: "functional 
packages" to be used explicitly and "environment packages" to customize 
the execution environment. The infrastructure just doesn't distinguish 
between them and allows a package to combine both types of functionality 
for convenience.

By this logic, pywin32's .pth is effectively a private import hook to 
allow for its nonstandard structure. It could be in a separate 
"environment package" that would be a dependency but that would 
complicate things for no real gain.

The caveat with "environment packages" is that there are no predefined 
dependencies between them and between them and "functional packages". 
Their required execution order rather depends on user's needs. E.g. the 
order of import hooks' registration would matter if more than one can 
serve a specific name, and the user may prefer any of the options; 
whether some import hook is required to import some installed packages 
depends on the way they are installed.

This is the same with any other plugin functionality, too. And I'm not 
aware of any general solution because a solution is very situational. 
The best we can do here that I see is to allow the user (or, you guessed 
it, yet another "environment package" for manageability) to specify load 
order dependencies between .pth's.

--

___
Python tracker 

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



[issue36158] Regex search behaves differently in list comprehension

2019-03-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Can you please add a short script with data for entities to try reproducing 
this?

>>> from re import compile
>>> name_regex = compile(r'\[\"([a-zA-Z\s]*)\"{1}')
>>> [name_regex.match(a).group(1) for a in ['["a"a]']]
['a']
>>> list(map(lambda a: name_regex.match(a).group(1), ['["a"a]']))
['a']

--
nosy: +xtreak

___
Python tracker 

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



[issue36159] Modify Formatter Class to handle arbitrary objects

2019-03-01 Thread Ross Biro


New submission from Ross Biro :

The only point in the string.Formatter class that really depends on string 
output is line 245: return ''.join(result), auto_arg_index.  

I'm currently working on a problem that would be much easier if I could get 
access to the result list instead of having that join called.

I propose creating another overridable method in string.Formatter, say oformat 
that calls _vformat and is called by vformat. oformat would have the guts of 
vformat and just return the result list.  vformat would then consist of the 
call ot oformat and the join.  See Below.  The recursive call to _vformat would 
also need some slight modification.

The work would not be difficult and I'm willing to do it, provided there is 
sufficient interest.

def vformat(self, format_string, args, kwargs):
result = self.oformat(format_string, args, kwargs)
return ''.join(result)

def oformat(self, format_string, args, kwargs):
used_args = set()
result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
self.check_unused_args(used_args, args, kwargs)
return result

--
components: Library (Lib)
messages: 336945
nosy: Ross Biro
priority: normal
severity: normal
status: open
title: Modify Formatter Class to handle arbitrary objects
type: enhancement
versions: Python 2.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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 62be763348d16ba90f96667aa0240503261393f0 by Victor Stinner in 
branch 'master':
bpo-36142: Remove _PyMain structure (GH-12120)
https://github.com/python/cpython/commit/62be763348d16ba90f96667aa0240503261393f0


--

___
Python tracker 

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



[issue36160] Multiple errors in test_site.py on sysconfig._CONFIG_VARS.clear() if run on its own

2019-03-01 Thread Ivan Pozdeev


New submission from Ivan Pozdeev :

Sample failure:

> cpython\branches\3.7>python.bat -m test.test_site

Running Debug|x64 interpreter...
E.s.
==
ERROR: test_addpackage (__main__.HelperFunctionsTests)
--
Traceback (most recent call last):
  File "C:\Users\Sasha\Documents\cpython\branches\3.7\lib\test\test_site.py", li
ne 77, in tearDown
sysconfig._CONFIG_VARS.clear()
AttributeError: 'NoneType' object has no attribute 'clear'

==
ERROR: test_addpackage_import_bad_exec (__main__.HelperFunctionsTests)
--
Traceback (most recent call last):
  File "C:\Users\Sasha\Documents\cpython\branches\3.7\lib\test\test_site.py", li
ne 77, in tearDown
sysconfig._CONFIG_VARS.clear()
AttributeError: 'NoneType' object has no attribute 'clear'



The reason is that `sysconfig._CONFIG_VARS' is None until the first call to 
`sysconfig.get_config_vars()'. When the suite is used in conjunction with the 
others, other tests have already called it by the time test_site.py gets 
control.

--
components: Tests
messages: 336947
nosy: Ivan.Pozdeev
priority: normal
severity: normal
status: open
title: Multiple errors in test_site.py on sysconfig._CONFIG_VARS.clear() if run 
on its own
type: behavior
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



[issue36160] Multiple errors in test_site.py on sysconfig._CONFIG_VARS.clear() if run on its own

2019-03-01 Thread Ivan Pozdeev


Change by Ivan Pozdeev :


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

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset b05b711a2cef6c6c381e01069dedac372e0b9fb2 by Eric Snow in branch 
'master':
bpo-33608: Use _Py_AddPendingCall() in _PyCrossInterpreterData_Release(). 
(gh-12024)
https://github.com/python/cpython/commit/b05b711a2cef6c6c381e01069dedac372e0b9fb2


--

___
Python tracker 

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



[issue36159] Modify Formatter Class to handle arbitrary objects

2019-03-01 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eric.smith

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread kellena


kellena  added the comment:

There isn't much. I downloaded this and installed it from python.org with the 
install wizard. Shouldn't all of the necessary environment variables have been 
added at that time?

$ env | grep PYTHON

PYTHONHOME=/usr/local/bin/python3

--

___
Python tracker 

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



[issue36124] Provide convenient C API for storing per-interpreter state

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:

Thinking about this, what is the key difference with the existing 
PyModule_GetState() function?  Is it just the return type (module-defined void 
* vs. a regular dict)?  Certainly it provides a C-only namespace that all 
extensions can share (like PyThreadState_Get() does), but I'm not sure that's 
desirable.

Anyway, I'd rather not add PyInterpreterState_GetDict() if it is essentially 
equivalent to PyModule_GetState().

--

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset bda918bf65a88560ec453aaba0758a9c0d49b449 by Eric Snow in branch 
'master':
bpo-33608: Simplify ceval's DISPATCH by hoisting eval_breaker ahead of time. 
(gh-12062)
https://github.com/python/cpython/commit/bda918bf65a88560ec453aaba0758a9c0d49b449


--

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:

I've merged the PR for hoisting eval_breaker before the ceval loop starts.  
@Raymond, see if that addresses the performance regression you've been seeing.

I'll close this issue after I've sorted out the buildbot issues David mentioned 
(on his Windows builders).

--

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread Brett Cannon


Brett Cannon  added the comment:

Yes, the Mac installer should have installed everything, but software isn't 
perfect. :) I would try installing again.

--
nosy: +brett.cannon, ned.deily, ronaldoussoren

___
Python tracker 

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



[issue36153] Freeze support documentation is misleading.

2019-03-01 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +davin, pitrou

___
Python tracker 

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



[issue35843] importlib.util docs for namespace packages innaccurate

2019-03-01 Thread Brett Cannon


Brett Cannon  added the comment:

Anyone have an opinion about the __getitem__ proposal? I'm fine with it but I 
wanted to make sure other import + namespace folks don't disagree.

--

___
Python tracker 

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



[issue36124] Provide convenient C API for storing per-interpreter state

2019-03-01 Thread Eric Snow


Change by Eric Snow :


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue36043] FileCookieJar constructor don't accept PathLike

2019-03-01 Thread miss-islington

miss-islington  added the comment:


New changeset 4b219ce81ed04234648a4ce4f0cb0865818abb38 by Miss Islington (bot) 
(Stéphane Wirtel) in branch 'master':
bpo-36043: FileCookieJar supports os.PathLike (GH-11945)
https://github.com/python/cpython/commit/4b219ce81ed04234648a4ce4f0cb0865818abb38


--
nosy: +miss-islington

___
Python tracker 

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



[issue36043] FileCookieJar constructor don't accept PathLike

2019-03-01 Thread Brett Cannon


Change by Brett Cannon :


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



[issue32387] Disallow untagged C extension import on major platforms

2019-03-01 Thread Brett Cannon


Brett Cannon  added the comment:

It's 3.8 time now. :) Should we try and resolve this?

--

___
Python tracker 

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



[issue36124] Provide convenient C API for storing per-interpreter state

2019-03-01 Thread Eric Snow


Change by Eric Snow :


--
keywords: +patch
pull_requests: +12135
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



[issue36124] Provide convenient C API for storing per-interpreter state

2019-03-01 Thread Eric Snow


Change by Eric Snow :


--
assignee:  -> eric.snow

___
Python tracker 

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



[issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname)

2019-03-01 Thread Thomas Wouters


New submission from Thomas Wouters :

(good first issue, I think.)

CPython currently uses a few functions that are thread-unsafe where thread-safe 
version exist, at least in glibc (crypt() and ttyname(), at least). This isn't 
an issue when looking at CPython in isolation because these calls are guarded 
by the GIL, but it can be a problem if the C functions are called from other 
code (in an extension module, or from an application embedding CPython).

I expect it to be uncommon to be the case with crypt() and ttyname(), so it's 
probably not important to fix, but I do think these would make good first 
issues. crypt(), in particular, is called from a very self-contained (and 
otherwise) module, and could do with some other enhancements (proper error 
handling, properly #including crypt.h).

I suggest a new contributor (or someone new to C) take this on and do something 
like the following, using crypt as an example:
 - Add configure.ac checks for crypt.h and crypt_r()
 - In Modules/_cryptmodule.c, if present, import crypt.h and use crypt_r.
 - Check for a NULL return and raise OSerror, but possibly only when using 
crypt_r() (for compatibility with systems where crypt() doesn't do the right 
thing on error, perhaps).
 - Add tests for the new error handling (crypt() on glibc will return an error 
on invalid salts).

For ttyname() (called from Modules/posixmodule.c), the change would be simpler 
(it already handles errors), but a choice will have to be made about the size 
of the buffer to use, and whether to use a static buffer (which would be 
protected by the GIL).

There may be other functions being used in posixmodule or other modules that 
could conflict with non-CPython uses of the thread-unsafe functions that we 
could switch to thread-safe versions, but other than manually looking I'm not 
sure yet how to find them.

--
components: Interpreter Core
keywords: easy (C)
messages: 336957
nosy: Mariatta, cheryl.sabella, twouters
priority: normal
severity: normal
stage: needs patch
status: open
title: Use thread-safe functions instead of unsafe ones (crypt, ttyname)

___
Python tracker 

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



[issue36162] error: implicit declaration of function 'sendfile' is invalid in C99

2019-03-01 Thread muhzi


New submission from muhzi :

I encountered yet another issue with cross compilation on android, it so 
happens that these errors occur only when I cross compile for non 64-bit archs. 
i.e. I could cross compile just fine for arm64 & x86_64 but the 32-bit version 
of these archs produces the following error during compilation:

./Modules/posixmodule.c:8457:19: error: implicit declaration of function 
'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret = sendfile(out, in, NULL, count);
  ^
./Modules/posixmodule.c:8457:19: warning: this function declaration is not a 
prototype [-Wstrict-prototypes]
./Modules/posixmodule.c:8470:15: error: implicit declaration of function 
'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret = sendfile(out, in, &offset, count);
  ^
./Modules/posixmodule.c:9057:14: error: implicit declaration of function 
'truncate' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
result = truncate(path->narrow, length);
 ^
./Modules/posixmodule.c:9057:14: note: did you mean 'ftruncate'?
/home/muhzi/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/unistd.h:220:5:
 note: 'ftruncate' declared here
int ftruncate(int __fd, off_t __length) __RENAME(ftruncate64) 
__INTRODUCED_IN(12);
^
./Modules/posixmodule.c:9057:14: warning: this function declaration is not a 
prototype [-Wstrict-prototypes]
result = truncate(path->narrow, length);


I attached pyconfig.h for reference, it seems that the configuration step went 
fine. I checked that these missing functions are able to have their 
corresponding headers included. Also figured after misplacing some include 
lines in posixmodule.c that when the preprocessor includes Python.h it fails to 
include definitions from successively included headers.

--
components: Cross-Build
files: pyconfig.h
messages: 336958
nosy: Alex.Willmer, muhzi, xdegaye
priority: normal
severity: normal
status: open
title: error: implicit declaration of function 'sendfile' is invalid in C99
versions: Python 3.7
Added file: https://bugs.python.org/file48183/pyconfig.h

___
Python tracker 

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



[issue36162] error: implicit declaration of function 'sendfile' is invalid in C99

2019-03-01 Thread muhzi


muhzi  added the comment:

Using the latest NDK r19. Here is my compilation steps for arm:

export PATH="$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH"
export CC="armv7a-linux-androideabi16-clang"
export CXX="$CC++"

export AR="arm-linux-androideabi-ar"
export LD="arm-linux-androideabi-ld"
export AS="arm-linux-androideabi-as"
export STRIP="arm-linux-androideabi-strip"
export RANLIB="arm-linux-androideabi-ranlib"
export READELF="arm-linux-androideabi-readelf"

export CFLAGS=""
export CXXFLAGS=$CFLAGS
export LDFLAGS="-pie"

export CONFIG_SITE="config.site"

./configure --host=armv7a-linux-androideabi --build=x86_64-linux-gnu 
--disable-ipv6
make
make altinstall DESTDIR=$INSTALL_DIR

--

___
Python tracker 

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



[issue29539] [smtplib] collect response data for all recipients

2019-03-01 Thread sls


sls  added the comment:

I closed my PR. I'd just rename "senderrs" to "mta_status" or so as 
aforementioned change means not just storing errors. 

FirefighterBlu3, do you open a PR for this? I'd like to see this moving into 
3.8 as we don't compile Python from source but using it from deb repos.

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-03-01 Thread Anthony Sottile


Anthony Sottile  added the comment:

I don't have time to look through the data today but I wrote a script to 
collect the usages of `.pth` from pypi.  I realized after I ran it that I 
skipped source distributions with `.zip` extension but otherwise it's pretty 
complete:

https://github.com/asottile/pth-file-investigation

There are ~132 packages using `.pth` features (not including setuptools 
namespace packages which I had to exclude since there were so many of them).  I 
was planning to classify these but didn't have time to do so.

Some "highlights" from scrolling through the list, two of them are mine 
(future-breakpoint, future-fstrings), at least one is guido's (pyxl3), ruamel's 
namespace-packaging appears to use .pth (ruamel.* (12 packages))

--

___
Python tracker 

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



[issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname)

2019-03-01 Thread Martin Panter

Martin Panter  added the comment:

In Issue 28503, “crypt_r” was added to Python 3.7 and 3.8+, and it looks like 
it is still there.

Regarding error handling for “crypt”, it is not documented, but the Python 
function returns None on error. You would have to consider backwards 
compatibility to use OSError. Perhaps add a new parameter like 
“crypt(raise_error=True)”?

--
nosy: +martin.panter

___
Python tracker 

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



[issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname)

2019-03-01 Thread Thomas Wouters


Thomas Wouters  added the comment:

Ah, looks like I missed crypt_r getting added in 3.7. Sorry about that. Yes, 
the error handling would be a behaviour change, a keyword argument may be a 
good solution. As it is, crypt() returns None, throwing away the *reason* for 
the failure (which is recorded in errno).

--

___
Python tracker 

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



[issue32129] IDLE app icon is blurry on macOS with Aqua Tk 8.6

2019-03-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 7eebbbd5b3907447eddadf5cb7cb1cc9230d15b2 by Terry Jan Reedy (Ned 
Deily) in branch 'master':
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. (GH-12031)
https://github.com/python/cpython/commit/7eebbbd5b3907447eddadf5cb7cb1cc9230d15b2


--

___
Python tracker 

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



[issue32129] IDLE app icon is blurry on macOS with Aqua Tk 8.6

2019-03-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12136
stage: commit review -> patch review

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread kellena


kellena  added the comment:

Sounds good. Maybe I didn't uninstall properly. What is the correct way to 
uninstall Python 3.7 on a Mac? Should I also uninstall version 2.7, the version 
that came with the Mac? Installing version 3.7 did not over-write version 2.7.

--

___
Python tracker 

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



[issue32129] IDLE app icon is blurry on macOS with Aqua Tk 8.6

2019-03-01 Thread Ned Deily


Ned Deily  added the comment:


New changeset 453100f60e3c297226eaf0b0b4eb8c817a73b5ce by Ned Deily in branch 
'2.7':
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Original 
patch by Kevin Walzer. (GH-12034)
https://github.com/python/cpython/commit/453100f60e3c297226eaf0b0b4eb8c817a73b5ce


--

___
Python tracker 

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



[issue32129] IDLE app icon is blurry on macOS with Aqua Tk 8.6

2019-03-01 Thread miss-islington


miss-islington  added the comment:


New changeset 243b2064ce4fb7f90e69f9a4fa9c7e7ec70eba17 by Miss Islington (bot) 
in branch '3.7':
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. (GH-12031)
https://github.com/python/cpython/commit/243b2064ce4fb7f90e69f9a4fa9c7e7ec70eba17


--
nosy: +miss-islington

___
Python tracker 

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



[issue33329] sigaddset() can fail on some signal numbers

2019-03-01 Thread Larry Hastings


Larry Hastings  added the comment:

These issues also occur on Python 3.4 and 3.5.  And I'm now upgraded to Ubuntu 
18.10 which I guess has the new version of glibc. The regression test suite for 
both 3.4 and 3.5 blocks forever on three tests (multiprocessing_fork, 
multiprocessing_forkserver, and multiprocessing_spawn).  This affects my 
ability as RM to run the regression test suite, not to mention affecting the 
fundamental usability and trustability of 3.4 and 3.5 releases.


Can I please get backports of this patch to 3.4 and 3.5?  Note that I consider 
this a release blocker for 3.4 and 3.5.  And I'd expected to tag 3.4.10rc1 and 
3.5.7rc1 in about twenty-four hours.  So I sure would appreciate a quick 
turnaround on this if folks are available--otherwise I'll have to slip the 
schedule.  Sorry for the late notice!

--
nosy: +larry, lukasz.langa
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open
versions: +Python 3.4, Python 3.5

___
Python tracker 

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



[issue33329] sigaddset() can fail on some signal numbers

2019-03-01 Thread Miro Hrončok

Miro Hrončok  added the comment:

I am not able to do PRs right now but here are the Fedora patches:

https://src.fedoraproject.org/rpms/python34/blob/master/f/00302-fix-multiprocessing-regression-on-newer-glibcs.patch
https://src.fedoraproject.org/rpms/python35/blob/master/f/00302-fix-multiprocessing-regression-on-newer-glibcs.patch


They seem quite identical to the applied 3.6 patch.

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-03-01 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Mar 1, 2019, at 09:27, Ivan Pozdeev  wrote:

> Startup code (custom or not) is not a dependency of anything. It rather 
> customizes the environment in which the program specified by the user would 
> run, _before_ any user code could be allowed to get control. It is not a part 
> of the program to be run but rather of the environment that the user wants, 
> and it needs to be implicit so the user can use the same commands and code 
> (compare venv). This is a required feature because the stock Python startup 
> logic cannot possibly provide all the customizations that a user may need 
> (compare initrd).
> 
> .pth's are equivalent to sitecustomize but allow the user to manage the set 
> of code chunks automatically using the packaging infrastructure (compare .d 
> directories in UNIX). The fact that this feature is mixed up with and often 
> supplements "real packages" that a program would explicitly use is actually 
> incidental: a package with a .pth does not need to have any functionality 
> intended for explicit use.
> 
> We already identified a few real reasons: hard to see, hard to debug, 
> encourages unreadable code, run in arbitrary order when the order matters 
> (and IIRC I provided fixes for all). What else?

The fact that .pth files are global and affect the entire Python installation.  
That’s not so bad in venvs where we have environmental isolation, but it’s 
really bad (IMHO) for the global Python interpreter.  Right now, there’s no 
control over the scope of such environmental customizations; it’s all or 
nothing.  Applications should be able to opt in or out of them, just like they 
can with individual packages (which must be imported in order to affect the 
interpreter state).  The trick then is how to define opt-in for applications 
*before* the interpreter gets to user code.

--

___
Python tracker 

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



[issue36154] Python quit unexpectedly error

2019-03-01 Thread Inada Naoki

Inada Naoki  added the comment:

You must not set PYTHON HOME. Python find it's home by itself.
But since PYTHONHOME is set, Python can't find it's home.

2019年3月2日(土) 4:45 kellena :

>
> kellena  added the comment:
>
> There isn't much. I downloaded this and installed it from python.org with
> the install wizard. Shouldn't all of the necessary environment variables
> have been added at that time?
>
> $ env | grep PYTHON
>
> PYTHONHOME=/usr/local/bin/python3
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue35808] Let's retire pgen

2019-03-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue35808] Let's retire pgen

2019-03-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 1f24a719e7be5e49b876a5dc7daf21d01ee69faa by Pablo Galindo in 
branch 'master':
bpo-35808: Retire pgen and use pgen2 to generate the parser (GH-11814)
https://github.com/python/cpython/commit/1f24a719e7be5e49b876a5dc7daf21d01ee69faa


--

___
Python tracker 

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



[issue36097] Use only public C-API in _xxsubinterpreters module.

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset bcfa450f210074e16feb761ae5b3e966a2532fcf by Eric Snow in branch 
'master':
bpo-36097: Use only public C-API in the_xxsubinterpreters module (adding as 
necessary). (#12003)
https://github.com/python/cpython/commit/bcfa450f210074e16feb761ae5b3e966a2532fcf


--

___
Python tracker 

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



[issue36097] Use only public C-API in _xxsubinterpreters module.

2019-03-01 Thread Eric Snow


Change by Eric Snow :


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



[issue35466] Use a linked list for the ceval pending calls.

2019-03-01 Thread Eric Snow


Eric Snow  added the comment:

At this point I'm not terribly interested in this. :)

--
resolution:  -> wont fix
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



[issue35859] Capture behavior depends on the order of an alternation

2019-03-01 Thread Ma Lin


Change by Ma Lin :


--
pull_requests: +12137

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-03-01 Thread David Bolen


David Bolen  added the comment:

If I can help with testing or builder access or anything just let me know.  It 
appears that I can pretty reliably trigger the error through just the 
individual tests (test_daemon_threads_shutdown_std{out,err}_deadlock) in 
isolation, which is definitely less tedious than a full buildbot run to test a 
change.

BTW, while not directly related since it was only just merged, and I won't 
pretend to have any real understanding of the changes here, I do have a 
question about PR 12024 ... it appears HEAD_UNLOCK is used twice in 
_PyInterpreterState_LookUpID.  Shouldn't one of those be HEAD_LOCK?

--

___
Python tracker 

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



  1   2   >