[issue34294] re.finditer and lookahead bug

2019-01-13 Thread Ma Lin


Ma Lin  added the comment:

Simplify the test-case, it seem the `state` is not reset properly.

Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47)
>>> import re
>>> re.findall(r"(?=(<\w+>)(<\w+>)?)", "")
[('', ''), ('', '')]

Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28)
>>> import re
>>> re.findall(r"(?=(<\w+>)(<\w+>)?)", "")
[('', ''), ('', '')]

--

___
Python tracker 

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



[issue35729] XML.etree bug

2019-01-13 Thread Igor Nowicki


New submission from Igor Nowicki :

Consider we have big XML file and we can't load it all into memory. We use then 
`iterparse` function from XML.etree.ElementTree module to parse it element by 
element.

Problem is, XML doesn't allow to run this smoothly and starts outputing wrong 
data after loading 16 kb (16*1024, found it after looking into source code). 
Having large number of children, we get the information that we have just a few.

To reproduce the problem, I created this example program. It makes simple xml 
file with progressively bigger files and tracks how many children of main 
objects there are counted. For small objects we have actual number, 100 
children. For bigger and bigger sizes we have smaller numbers, going down to 
just few.

--
components: Library (Lib)
files: find_records.py
messages: 333549
nosy: Igor Nowicki
priority: normal
severity: normal
status: open
title: XML.etree bug
type: performance
versions: Python 3.6
Added file: https://bugs.python.org/file48046/find_records.py

___
Python tracker 

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



[issue35729] XML.etree bug

2019-01-13 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +XML
nosy: +eli.bendersky, scoder, serhiy.storchaka

___
Python tracker 

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



[issue35707] time.sleep() should support objects with __float__

2019-01-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This can cause a loss of precision for Decimal.

If we want to support other numerical types with loss in double rounding, the 
most reliable way is to represent them as fractions (x.as_integer_ratio() or 
(x.numerator, x.denominator)) and use precise integer arithmetic.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35729] XML.etree bug

2019-01-13 Thread Stefan Behnel


Stefan Behnel  added the comment:

This is not a bug, it's normal, documented behaviour. The children are not 
guaranteed to be available during the "start" event. Only the tag itself is 
guaranteed to be there. The guarantee that the subtree is complete is only 
given for the "end" event.

See the big note in the documentation:
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.iterparse

--

___
Python tracker 

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



[issue35729] iterparse does not return the full subtree on "start" events

2019-01-13 Thread Stefan Behnel


Change by Stefan Behnel :


--
title: XML.etree bug -> iterparse does not return the full subtree on "start" 
events
type: performance -> behavior

___
Python tracker 

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



[issue35688] "pip install --user numpy" fails on Python from the Windows Store

2019-01-13 Thread mattip


mattip  added the comment:

The difference in search order between apps from the app store and desktop 
applications may be relevant

https://docs.microsoft.com/en-us/windows/desktop/Dlls/dynamic-link-library-search-order#alternate-search-order-for-windows-store-apps

--

___
Python tracker 

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



[issue35727] sys.exit() in a multiprocessing.Process does not align with Python behavior

2019-01-13 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

The same behavior on 3.8 and 3.5

--
nosy: +eamanu
versions: +Python 3.5, Python 3.8

___
Python tracker 

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



[issue35707] time.sleep() should support objects with __float__

2019-01-13 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> the most reliable way is to represent them as fractions (x.as_integer_ratio() 
> or (x.numerator, x.denominator))

I don't think that we can rely on non-dunder names like that. They are not 
reserved names, so classes can give them any semantics that they like. This is 
not just hypothetical: SageMath for example uses numerator() and denominator() 
methods, not properties.

If you really want to go through with this, probably a special method like 
__as_integer_ratio__ should be defined.

Anyway, I personally consider the double rounding for time.sleep() a non-issue. 
We are not trying to write a precise math library here, nobody will complain 
about sleeping a femtosecond too long.

--

___
Python tracker 

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



[issue35707] time.sleep() should support objects with __float__

2019-01-13 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> The correct code works for float and int (and maybe decimal.Decimal, I don't 
> recall!)

Not for Decimal! In fact sleep(Decimal("0.99")) is interpreted as sleep(0) 
because __int__ is used to convert.

--

___
Python tracker 

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



[issue35196] IDLE text squeezer is too aggressive and is slow

2019-01-13 Thread Tal Einat


Tal Einat  added the comment:


New changeset 39a33e99270848d34628cdbb1fdb727f9ede502a by Tal Einat in branch 
'master':
bpo-35196: Optimize Squeezer's write() interception (GH-10454)
https://github.com/python/cpython/commit/39a33e99270848d34628cdbb1fdb727f9ede502a


--

___
Python tracker 

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



[issue35196] IDLE text squeezer is too aggressive and is slow

2019-01-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11150, 11151, 11152

___
Python tracker 

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



[issue35196] IDLE text squeezer is too aggressive and is slow

2019-01-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11150, 11151

___
Python tracker 

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



[issue35196] IDLE text squeezer is too aggressive and is slow

2019-01-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11150

___
Python tracker 

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



[issue35196] IDLE text squeezer is too aggressive and is slow

2019-01-13 Thread miss-islington


miss-islington  added the comment:


New changeset 47bd7770229b5238a438703ee1d52da2e983ec9e by Miss Islington (bot) 
in branch '3.7':
bpo-35196: Optimize Squeezer's write() interception (GH-10454)
https://github.com/python/cpython/commit/47bd7770229b5238a438703ee1d52da2e983ec9e


--
nosy: +miss-islington

___
Python tracker 

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



[issue35674] Expose os.posix_spawnp()

2019-01-13 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


--
nosy: +izbyshev

___
Python tracker 

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



[issue35196] IDLE text squeezer is too aggressive and is slow

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11152

___
Python tracker 

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



[issue35196] IDLE text squeezer is too aggressive and is slow

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11151

___
Python tracker 

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



[issue35729] iterparse does not return the full subtree on "start" events

2019-01-13 Thread Ned Deily


Change by Ned Deily :


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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


New submission from Terry J. Reedy :

PR 10454 for #35196 added, among other things, more tests to test_squeezer.py.  
SqueezerTest.test_reload initially worked on Mac and personal Windows machines. 
It failed on Cheryl Sabella's personal Ubuntu machine because doubling the 
nominal font size did not necessarily exactly double the reported pixel size of 
'0'.  This was easily fixed by testing only that the size increased.

self.assertGreater(squeezer.zero_char_width, orig_zero_char_width)

It failed on CI Linux and Windows machines because the pixel size did not 
increase at all. This was fixed for the CI machines by directly assigning a new 
font tuple to text['font'] instead of involving the idleConf machinery.  
However, after merging, it failed with the same error that previously occurred 
on the CI machines.

AssertionError: 6 not greater than 6.

The initial fix will be to disable the assertion.

--
assignee: terry.reedy
components: IDLE
messages: 333558
nosy: taleinat, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: Fix squeezer test_reload.
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



[issue35428] xml.etree.ElementTree.tostring violates W3 standards allowing encoding='unicode' without error

2019-01-13 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch, patch, patch
pull_requests: +11153, 11154, 11155
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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch, patch
pull_requests: +11153, 11154
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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11154

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11155

___
Python tracker 

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



[issue35383] lib2to3 raises ParseError on argument called "print"

2019-01-13 Thread timokau


timokau  added the comment:

I disagree that this is "not a bug". While conversion from 2 to 3 is 2to3's 
main intention, the documentation advertises:

2to3 supporting library lib2to3 is, however, a flexible and generic library, so 
it is possible to write your own fixers for 2to3. lib2to3 could also be adapted 
to custom applications in which Python code needs to be edited automatically.
(https://docs.python.org/3.5/library/2to3.html#module-lib2to3)

And it is used for other purposes. See
- this sphinx bug: https://github.com/sphinx-doc/sphinx/issues/1641
- bower: https://pybowler.io/docs/basics-refactoring

--
nosy: +timokau

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Victor, a particular test assert fails only on Gentoo bots (see above).  
Questions:

1. Can we disable the assert only on those machines?

2. I sometimes see what look like debug prints in buildbot test logs.  Correct? 
 If so, stdout or stderr?

--
nosy: +vstinner

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 5bb146aaea1484bcc117ab6cb38dda39ceb5df0f by Terry Jan Reedy in 
branch 'master':
bpo-35730: Disable IDLE test_reload assertion. (GH-11543)
https://github.com/python/cpython/commit/5bb146aaea1484bcc117ab6cb38dda39ceb5df0f


--

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11156, 11157

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11156

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread miss-islington


miss-islington  added the comment:


New changeset 890d3fa10c68af6306cf6b989b2133978e6e7a12 by Miss Islington (bot) 
in branch '3.7':
bpo-35730: Disable IDLE test_reload assertion. (GH-11543)
https://github.com/python/cpython/commit/890d3fa10c68af6306cf6b989b2133978e6e7a12


--
nosy: +miss-islington

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11157

___
Python tracker 

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



[issue35715] ProcessPool workers hold onto return value of last task in memory

2019-01-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +bquinlan, pitrou

___
Python tracker 

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



[issue35731] Modify to support multiple urls in webbrowser.open

2019-01-13 Thread Arlen


New submission from Arlen :

Note: new to python, please provide any feedback

Currently webbrowser.open supports one url, and there is no fn for url 
batching. I am proposing modifying webbrowser.open to support something along 
these lines:

```
def open(*urls, new=0, autoraise=True):
...
browser = get(name)
actions = [browser.open(url, new, autoraise) for url in urls]
...

# usage
open('http://example.com', 'http://example2.com')
```

--
components: Library (Lib)
messages: 333563
nosy: arlenyu
priority: normal
severity: normal
status: open
title: Modify to support multiple urls in webbrowser.open
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I just realized that the Gentoo bots where this failed are, last I knew, the 
only *nix bots with X installed.  The non-Windows CI bots run the gui tests 
with an X simulator.  So Gentoo might not be the only distribution where this 
would fail.


Two debug prints that might help: the tk patch level (does Gentoo have 
something ancient?); the actual font and in particular the actual size 
resulting from ('Courier', 10/20).

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue35731] Modify to support multiple urls in webbrowser.open

2019-01-13 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report. Since you can do list comprehension over the URLs as in 
your example I don't see a good reason to change the current API to take 
multiple URLs.

[browser.open(url, new, autoraise) for url in urls]

--
nosy: +xtreak

___
Python tracker 

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



[issue35383] lib2to3 raises ParseError on argument called "print"

2019-01-13 Thread timokau


timokau  added the comment:

Also `print("a", file=sys.stderr)` *is* valid python2 provided that 
`print_function` is imported.

--

___
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-01-13 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

> To make a potentially viable concrete proposal here, I think a reasonable 
> first step would be to change the ".pth" file processing code in site.py to 
> emit PendingDeprecationWarning for the 'if line.startswith(("import ", 
> "import\t")):' branch.

PendingDeprecationWarning because you don’t think we can remove this 
functionality in 3.9?

> In addition to helping to determine the scope of the compatibility break 
> being discussed here, such a warning would also be usable as a debugging tool.
> 
> I'd also suggest updating "python -m site" to list any pth files that it 
> finds, and categorise them as simple sys.path additions (which are generally 
> fine), and arbitrary code (which can be problematic).

Great idea, +1

--

___
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-01-13 Thread Nick Coghlan


Nick Coghlan  added the comment:

I'm suggesting PendingDeprecationWarning because we can't *actually* deprecate 
anything until we provide a more transparent alternative that offers comparable 
functionality, and I haven't seen a credible proposal for a replacement yet.

So using PDW would truthfully indicate "We don't like this feature, and want to 
get rid of it as causing more problems than it solves, but also acknowledge 
that it is currently handling legitimate use cases that need to be addressed 
before we can remove it".

https://coverage.readthedocs.io/en/coverage-4.4.2/subprocess.html is one 
example I'm aware of that describes a legitimate use case for being able to run 
arbitrary code at software startup.

--

___
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-01-13 Thread Chris Billington

Chris Billington  added the comment:

coverage.py's documentation mentions:

> The sitecustomize.py technique is cleaner, but may involve modifying an 
> existing sitecustomize.py, since there can be only one. If there is no 
> sitecustomize.py already, you can create it in any directory on the Python 
> path.

> The .pth technique seems like a hack, but works, and is documented behavior. 
> On the plus side, you can create the file with any name you like so you don’t 
> have to coordinate with other .pth files. On the minus side, you have to 
> create the file in a system-defined directory, so you may need privileges to 
> write it.

This brings to mind the transition of many programs from using a single config 
file or startup script to using a directory of config/startup files 
parsed/executed in alphabetical order. Would a sitecustomize.d/ directory (with 
files within it executed in alphabetical order) as a replacement for executable 
code in .pth files be an improvement on the status quo?

--

___
Python tracker 

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



[issue35674] Expose os.posix_spawnp()

2019-01-13 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue35674] Expose os.posix_spawnp()

2019-01-13 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch, patch, patch
pull_requests: +11158, 11159, 11161
stage:  -> patch review

___
Python tracker 

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



[issue35674] Expose os.posix_spawnp()

2019-01-13 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch, patch, patch, patch
pull_requests: +11158, 11159, 11160, 11161
stage:  -> patch review

___
Python tracker 

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



[issue35674] Expose os.posix_spawnp()

2019-01-13 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch, patch
pull_requests: +11158, 11159
stage:  -> patch review

___
Python tracker 

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



[issue35679] pdb restart hooks

2019-01-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Hi Hernot,

I think I understand what you are indicating but I still find it a bit 
confusing. Could you provide a reproducer and document a bit more the expected 
and actual behaviour, maybe with some code snippets?

Thanks

--
nosy: +pablogsal

___
Python tracker 

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



[issue35537] use os.posix_spawn in subprocess

2019-01-13 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

> * On FreeBSD, if setting posix_spawn() "attributes" or execute posix_spawn() 
> "file actions" fails, posix_spawn() succeed but the child process exits 
> immediately with exit code 127 without trying to call execv(). If execv() 
> fails, posix_spawn() succeed, but the child process exit with exit code 127.
> * The worst seems to be: "In my test on Ubuntu 14.04, ./python -c "import 
> subprocess; subprocess.call(['/xxx'], close_fds=False, 
> restore_signals=False)" silently returns with zero exit code."

To clarify, in the Ubuntu example only the parent process returns with zero 
exit code. The child exits with 127, so the behavior is the same as on FreeBSD, 
as demonstrated by check_call():

$ ./python -c "import subprocess; subprocess.check_call(['/xxx'], 
close_fds=False, restore_signals=False)"
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/izbyshev/workspace/cpython/Lib/subprocess.py", line 348, in 
check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/xxx']' returned non-zero exit status 
127.

> According to Alexey Izbyshev, musl should be safe as well, but I don't know 
> how to test musl on my Fedora, nor how to check if Python is linked to musl, 
> nor what is the minimum musl version which is safe.

musl doesn't have an equivalent of __GLIBC__ macro by design as explained in 
its FAQ [1], and the same FAQ suggests to use something like "#ifndef __GLIBC__ 
portable_code() #else glibc_code()". So far musl-related fixes followed this 
advice (see PR 9288, PR 9224), but in this case it doesn't seem like a good 
idea to me. POSIX allows asynchronous error notification, so "portable" code 
shouldn't make assumptions about that, and technically old glibc and FreeBSD 
are conforming implementations, but not suitable as a replacement for 
_posixsubprocess.

Maybe we could use configure-time musl detection instead? It seems like 
config.guess has some support for musl[2], but it uses "ldd" from PATH and 
hence appears to work out-of-the-box only on musl-based distros like Alpine. 
See also [3].

Regarding the minimum musl version, in this case it's not important since the 
relevant change was committed in 2013[4], and given that musl is relatively 
young, such old versions shouldn't have users now. 

[1] https://wiki.musl-libc.org/faq.html
[2] 
https://github.com/python/cpython/blob/5bb146aaea1484bcc117ab6cb38dda39ceb5df0f/config.guess#L154
[3] https://github.com/RcppCore/Rcpp/pull/449
[4] 
https://git.musl-libc.org/cgit/musl/commit/?id=fb6b159d9ec7cf1e037daa974eeeacf3c8b3b3f1

--

___
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-01-13 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

> This brings to mind the transition of many programs from using a single 
> config file or startup script to using a directory of config/startup files 
> parsed/executed in alphabetical order. Would a sitecustomize.d/ directory 
> (with files within it executed in alphabetical order) as a replacement for 
> executable code in .pth files be an improvement on the status quo?

No, because the required execution order is governed by package 
interdependencies rather than names. SysVInit went around this by 
hand-picking number prefixes to files in rcN.d/ but this proved 
unmaintainable in the long run.

--

___
Python tracker 

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



[issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects

2019-01-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I have been playing with possible solutions for a while and the weak-reference 
solution seems not robust enough as there are too potential race conditions 
between the destruction of the weakreferences (the pool) and the handling code.

I would advocate again for using a strong reference. The reasons are:

* The rest of the stdlib is using this solution to link iterator objects and 
similar to their parents (lists, dicts, sets...etc all have strong references 
back to their parents).

* This solution is backwards compatible with the current behaviour.

* We have the new ResourceWarnigns to make clear that this behaviour is not 
supported.

--

___
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-01-13 Thread Antony Lee


Change by Antony Lee :


--
nosy:  -Antony.Lee

___
Python tracker 

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



[issue35732] Typo in library/warnings documentation

2019-01-13 Thread Antoine Wecxsteen


New submission from Antoine Wecxsteen :

Hello,

I believe there's a mistake in the documentation of library/warnings.

https://docs.python.org/3.8/library/warnings.html#warnings.warn

"This function raises an exception if the particular warning issued is changed 
into an error by the warnings filter see above."

I think "see above" should be enclosed in brackets (or maybe completely removed 
as there is already a "(see above)" in the same text block).

Regards.

--
assignee: docs@python
components: Documentation
messages: 333574
nosy: awecx, docs@python, eric.araujo, ezio.melotti, mdk, willingc
priority: normal
severity: normal
status: open
title: Typo in library/warnings documentation
versions: Python 2.7, Python 3.4, Python 3.5, 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



[issue33416] Add endline and endcolumn to every AST node

2019-01-13 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

FYI, I started working on this. I will have PR ready end of next week.

Serhiy, I don't think we should keep both this and issue22616 open. Which one 
would you prefer to close?

--

___
Python tracker 

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



[issue35732] Typo in library/warnings documentation

2019-01-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

That looks like an error indeed. Are you interested on making a PR for fixing 
this?

--
nosy: +pablogsal

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The corresponding 3.7 buildbots failed the same way, 6 not greater than 6, as 
the 3.8 buildbots.
https://buildbot.python.org/all/#/builders/108/builds/895/steps/5/logs/stdio
https://buildbot.python.org/all/#/builders/115/builds/888/steps/4/logs/stdio

One reason I am suspicious that something weird is going on is the width of 6.  
On my system, the Courier 10 and Courier 20 0 widths are 10 and 20.  The Times 
New Roman 0 width, on CI machines that failed, was 8 (to be doubled to 16).  6 
seems too small for Courier 10 0.

--

___
Python tracker 

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



[issue35693] test_httpservers fails

2019-01-13 Thread Jorge Ramos


Jorge Ramos  added the comment:

E:\RepoGiT\3.7>"E:\RepoGiT\3.7\PCbuild\amd64\python.exe"  -u -Wd -E -bb -m test 
 -v test_httpservers
== CPython 3.7.2+ (heads/3.7:e1259886ab, Jan 13 2019, 19:16:24) [MSC v.1916 64 
bit (AMD64)]
== Windows-10-10.0.17763-SP0 little-endian
== cwd: E:\RepoGiT\3.7\build\test_python_21704
== CPU count: 8
== encodings: locale=cp1252, FS=utf-8
Run tests sequentially
0:00:00 [1/1] test_httpservers
test_err (test.test_httpservers.RequestHandlerLoggingTestCase) ... ok
test_get (test.test_httpservers.RequestHandlerLoggingTestCase) ... ok
test_close_connection (test.test_httpservers.BaseHTTPRequestHandlerTestCase) 
... ok
test_date_time_string (test.test_httpservers.BaseHTTPRequestHandlerTestCase) 
... ok
test_extra_space (test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... ok
test_header_buffering_of_send_error 
(test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... ok
test_header_buffering_of_send_header 
(test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... ok
test_header_buffering_of_send_response_only 
(test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... ok
test_header_length (test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... ok
test_header_unbuffered_when_continue 
(test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... ok
test_html_escape_on_error 
(test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... ok
test_http_0_9 (test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... ok
test_http_1_0 (test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... ok
test_http_1_1 (test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... ok
test_request_length (test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... 
ok
test_too_many_headers (test.test_httpservers.BaseHTTPRequestHandlerTestCase) 
... ok
test_with_continue_1_0 (test.test_httpservers.BaseHTTPRequestHandlerTestCase) 
... ok
test_with_continue_1_1 (test.test_httpservers.BaseHTTPRequestHandlerTestCase) 
... ok
test_with_continue_rejected 
(test.test_httpservers.BaseHTTPRequestHandlerTestCase) ... ok
test_command (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_error_content_length (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_handler (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_head_via_send_error (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_header_close (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_header_keep_alive (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_internal_key_error (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_latin1_header (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_request_line_trimming (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_return_custom_status (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_return_explain_error (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_return_header_keep_alive (test.test_httpservers.BaseHTTPServerTestCase) 
... ok
test_send_blank (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_send_error (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_version_bogus (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_version_digits (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_version_invalid (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_version_none (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_version_none_get (test.test_httpservers.BaseHTTPServerTestCase) ... ok
test_browser_cache (test.test_httpservers.SimpleHTTPServerTestCase)
Check that when a request to /test is sent with the request header ... ok
test_browser_cache_file_changed 
(test.test_httpservers.SimpleHTTPServerTestCase) ... ok
test_browser_cache_with_If_None_Match_header 
(test.test_httpservers.SimpleHTTPServerTestCase) ... ok
test_get (test.test_httpservers.SimpleHTTPServerTestCase) ... FAIL
test_head (test.test_httpservers.SimpleHTTPServerTestCase) ... ok
test_html_escape_filename (test.test_httpservers.SimpleHTTPServerTestCase) ... 
skipped 'Can not create file .txt on current file system'
test_invalid_requests (test.test_httpservers.SimpleHTTPServerTestCase) ... ok
test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase)
Checks that the datetime returned in Last-Modified response header ... ok
test_path_without_leading_slash 
(test.test_httpservers.SimpleHTTPServerTestCase) ... 
E:\RepoGiT\3.7\lib\email\feedparser.py:89: ResourceWarning: unclosed 

  for ateof in reversed(self._eofstack):
ResourceWarning: Enable tracemalloc to get the object allocation traceback
FAIL
test_undecodable_filename (test.test_httpservers.SimpleHTTPServerTestCase) ... 
skipped 'undecodable name cannot be decoded on win32'
test_authorization (test.test_httpservers.CGIHTTPServerTestCase) ... ok
test_headers_and_content (test.test_httpservers.CGIHTTPServerTestCase) ... ok
test_invaliduri (test.test_httpservers.CGIHTTPServerTestCase) ... ok
test_issue19435 (test.test_httpservers.CGIHTTPServerTestCase) 

[issue34294] re.finditer and lookahead bug

2019-01-13 Thread Ma Lin


Change by Ma Lin :


--
keywords: +patch, patch
pull_requests: +11162, 11163
stage:  -> patch review

___
Python tracker 

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



[issue34294] re.finditer and lookahead bug

2019-01-13 Thread Ma Lin


Change by Ma Lin :


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

___
Python tracker 

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



[issue34294] re.finditer and lookahead bug

2019-01-13 Thread Ma Lin


Change by Ma Lin :


--
keywords: +patch, patch, patch
pull_requests: +11162, 11163, 11164
stage:  -> patch review

___
Python tracker 

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



[issue35733] isinstance(ast.Constant(value=True), ast.Num) should be False

2019-01-13 Thread Anthony Sottile


New submission from Anthony Sottile :

Noticing this in pyflakes

https://github.com/PyCQA/pyflakes/pull/408

--
messages: 333579
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: isinstance(ast.Constant(value=True), ast.Num) should be False
versions: Python 3.8

___
Python tracker 

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



[issue35733] isinstance(ast.Constant(value=True), ast.Num) should be False

2019-01-13 Thread Anthony Sottile


Change by Anthony Sottile :


--
keywords: +patch, patch
pull_requests: +11165, 11166
stage:  -> patch review

___
Python tracker 

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



[issue35733] isinstance(ast.Constant(value=True), ast.Num) should be False

2019-01-13 Thread Anthony Sottile


Change by Anthony Sottile :


--
keywords: +patch, patch, patch
pull_requests: +11165, 11166, 11167
stage:  -> patch review

___
Python tracker 

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



[issue35733] isinstance(ast.Constant(value=True), ast.Num) should be False

2019-01-13 Thread Anthony Sottile


Change by Anthony Sottile :


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

___
Python tracker 

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



[issue34294] re.finditer and lookahead bug

2019-01-13 Thread Ma Lin


Ma Lin  added the comment:

I tried to fix it, feel free to create a new PR if you don't want this one.

PR11546 has a small question, should `state->data_stack` be dealloced as well?

FYI, function `state_reset(SRE_STATE* state)` in file `_sre.c`:
https://github.com/python/cpython/blob/d4f9cf5545d6d8844e0726552ef2e366f5cc3abd/Modules/_sre.c#L340-L352

--

___
Python tracker 

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



[issue35734] ipaddress's _BaseV4._is_valid_netmask fails to detect invalid netmask like 255.254.128.0

2019-01-13 Thread ulin


New submission from ulin :

valid netmask like 255.0.0.0 255.128.0.0, but 255.254.128.0 is not valid, but 
ipaddress._BaseV4._is_valid_netmask fails to detect the latter.

Tested in Python 3.6.7, as the code stays the same, affects all after Python 
3.6.7.

--
components: Library (Lib)
files: test_ipaddress.py
messages: 333581
nosy: ulindog
priority: normal
severity: normal
status: open
title: ipaddress's _BaseV4._is_valid_netmask fails to  detect invalid netmask 
like 255.254.128.0
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48047/test_ipaddress.py

___
Python tracker 

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



[issue35734] ipaddress's _BaseV4._is_valid_netmask fails to detect invalid netmask like 255.254.128.0

2019-01-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects

2019-01-13 Thread tzickel


tzickel  added the comment:

+1

--

___
Python tracker 

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



[issue33416] Add endline and endcolumn to every AST node

2019-01-13 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This idea seems reasonable.  Most of the AST nodes have a span and it would be 
nice to know what that is.  I'm sure we will find use cases though I doubt that 
many compiler syntax errors would benefit (since a syntax error means that we 
don't have a completely matched grammar rule).

BTW, does this information have to be added by the parser or could there be am 
AST module function that deduces the end locations from the start location of 
next sibling node or from the parent node?  If so, it may still be possible get 
the benefit without slowing down or complicating the parser logic.

Do we know what other languages do (carry the full span info in the AST or 
deduce the span after the fact)?  I don't know what the best practices are in 
this regard.

One other thought:  We should be careful not to impair existing AST 
capabilities that support code rewriting and movement (i.e. refactoring tools). 
 The copy_location() and fix_missing_locations() functions would need to be 
updated as well.

--
nosy: +rhettinger

___
Python tracker 

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



[issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects

2019-01-13 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +davin

___
Python tracker 

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



[issue35734] ipaddress's _BaseV4._is_valid_netmask fails to detect invalid netmask like 255.254.128.0

2019-01-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pmoody

___
Python tracker 

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



[issue35733] isinstance(ast.Constant(value=True), ast.Num) should be False

2019-01-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue24780] unittest assertEqual difference output foiled by newlines

2019-01-13 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +11168, 11169
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



[issue24780] unittest assertEqual difference output foiled by newlines

2019-01-13 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +11168, 11169, 11170
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



[issue24780] unittest assertEqual difference output foiled by newlines

2019-01-13 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +11168
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



[issue24780] unittest assertEqual difference output foiled by newlines

2019-01-13 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

I have opened a PR for this.

--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue35710] Make dataclasses.field() accept another name for __init__ field's name

2019-01-13 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

"target" seems too general for the OP's use case.  "private=False" would be 
more focused.  General renaming occasionally has uses but is mostly an 
anti-pattern.  

Some thought also needs to be given to downstream effects of renaming (what 
shows up in help(), impact of renaming on type annotations, introspection 
challenges, what asdict() should do, whether the overall implementation would 
be made more complex, is the attribute now out of reach for __post_init__(), is 
this even within the scope of what dataclasses set out to do, etc).

--
nosy: +rhettinger

___
Python tracker 

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



[issue35733] isinstance(ast.Constant(value=True), ast.Num) should be False

2019-01-13 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

Added Serhiy since this seems to have been caused due to issue32892 and changes 
made in 6015cc50bc


➜  cpython git:(6015cc50bc) ./python.exe -c 'import ast; 
print(isinstance(ast.Constant(False), ast.Num))'
True
➜  cpython git:(6015cc50bc) git checkout 6015cc5~1
➜  cpython git:(913876d824) make > /dev/null
➜  cpython git:(913876d824) ./python.exe -c 'import ast; 
print(isinstance(ast.Constant(False), ast.Num))'
False

--
nosy: +xtreak

___
Python tracker 

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



[issue35537] use os.posix_spawn in subprocess

2019-01-13 Thread Kubilay Kocak


Change by Kubilay Kocak :


--
nosy: +koobs

___
Python tracker 

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



[issue33416] Add endline and endcolumn to every AST node

2019-01-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is up to you Ivan.

The end location can not be deduces from the start location of next sibling 
node or from the parent node. For example, the AST for the expression 
"foo.bar.baz" does not contain information for the end location of "foo.bar".

--

___
Python tracker 

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



[issue35735] Current "make test" status for AIX

2019-01-13 Thread Michael Felt


New submission from Michael Felt :

Hi all,

as we get closer to having the current tests all patched I want to have a place 
to post new "failures" - since the BOT process is unable to report regressions 
before all tests are passing for a time.

Initially, the tests run normally, and report two unexpected failures. However, 
the second pass does not complete - it is giving a segmentation error (repeated 
twice, starting third run shortly).

i.e., the tests test_eintr and test_importlib have PR that are waitig to be 
merged. the failure of test_os and test_xml_etree_c are new.

Tested: heads/master-dirty:5bb146aaea

 ./python  ../git/python3-3.8/Tools/scripts/run_tests.py
/data/prj/python/python3-3.8/python -u -W default -bb -E -m test -r -w -j 0 -u 
all,-largefile,-audio,-gui
== CPython 3.8.0a0 (heads/master-dirty:5bb146aaea, Jan 13 2019, 21:30:27) [C]
== AIX-1-00C291F54C00-powerpc-32bit big-endian
== cwd: /data/prj/python/python3-3.8/build/test_python_9109548
== CPU count: 8
== encodings: locale=ISO8859-1, FS=iso8859-1
Using random seed 9105159
Run tests in parallel using 10 child processes
0:00:01 [  1/418] test_nis passed
0:00:01 [  2/418] test_zipfile64 skipped (resource denied)
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long 
time to run
0:00:01 [  3/418] test_stringprep passed
...
0:10:23 [418/418/4] test_tools passed (4 min 31 sec)

== Tests result: FAILURE ==

390 tests OK.

4 tests failed:
test_eintr test_importlib test_os test_xml_etree_c

24 tests skipped:
test_dbm_gnu test_devpoll test_epoll test_gdb test_idle
test_kqueue test_msilib test_ossaudiodev test_readline test_spwd
test_sqlite test_startfile test_tcl test_tix test_tk
test_ttk_guionly test_ttk_textonly test_turtle test_unicode_file
test_unicode_file_functions test_winconsoleio test_winreg
test_winsound test_zipfile64

Re-running failed tests in verbose mode
...
Re-running test 'test_xml_etree_c' in verbose mode
test_bpo_31728 (test.test_xml_etree_c.MiscTests) ... ok
test_del_attribute (test.test_xml_etree_c.MiscTests) ... ok
test_iterparse_leaks (test.test_xml_etree_c.MiscTests) ... ok
test_length_overflow (test.test_xml_etree_c.MiscTests) ... skipped 'not enough 
memory: 2.0G minimum needed'
test_parser_ref_cycle (test.test_xml_etree_c.MiscTests) ... ok
test_setstate_leaks (test.test_xml_etree_c.MiscTests) ... ok
test_trashcan (test.test_xml_etree_c.MiscTests) ... ok
test_xmlpullparser_leaks (test.test_xml_etree_c.MiscTests) ... ok
test_alias_working (test.test_xml_etree_c.TestAliasWorking) ... ok
test_correct_import_cET (test.test_xml_etree_c.TestAcceleratorImported) ... ok
test_correct_import_cET_alias (test.test_xml_etree_c.TestAcceleratorImported) 
... ok
test_parser_comes_from_C (test.test_xml_etree_c.TestAcceleratorImported) ... ok
test_element (test.test_xml_etree_c.SizeofTest) ... ok
test_element_with_attrib (test.test_xml_etree_c.SizeofTest) ... ok
test_element_with_children (test.test_xml_etree_c.SizeofTest) ... ok

--

Ran 15 tests in 0.871s

OK (skipped=1)
test_all (test.test_xml_etree.ModuleTest) ... ok
test_sanity (test.test_xml_etree.ModuleTest) ... ok
test_delslice (test.test_xml_etree.ElementSlicingTest) ... ok
test_getslice_negative_steps (test.test_xml_etree.ElementSlicingTest) ... ok
test_getslice_range (test.test_xml_etree.ElementSlicingTest) ... ok
test_getslice_single_index (test.test_xml_etree.ElementSlicingTest) ... ok
test_getslice_steps (test.test_xml_etree.ElementSlicingTest) ... ok
test_setslice_negative_steps (test.test_xml_etree.ElementSlicingTest) ... ok
test_setslice_range (test.test_xml_etree.ElementSlicingTest) ... ok
test_setslice_single_index (test.test_xml_etree.ElementSlicingTest) ... ok
test_setslice_steps (test.test_xml_etree.ElementSlicingTest) ... ok
test_augmentation_type_errors (test.test_xml_etree.BasicElementTest) ... Fatal 
Python error: Segmentation fault

Current thread 0x0001 (most recent call first):
  File "/data/prj/python/git/python3-3.8/Lib/unittest/case.py", line 197 in 
handle
  File "/data/prj/python/git/python3-3.8/Lib/unittest/case.py", line 782 in 
assertRaises
  File "/data/prj/python/git/python3-3.8/Lib/test/test_xml_etree.py", line 1811 
in test_augmentation_type_errors
  File "/data/prj/python/git/python3-3.8/Lib/unittest/case.py", line 642 in run
  File "/data/prj/python/git/python3-3.8/Lib/unittest/case.py", line 702 in 
__call__
  File "/data/prj/python/git/python3-3.8/Lib/unittest/suite.py", line 122 in run
  File "/data/prj/python/git/python3-3.8/Lib/unittest/suite.py", line 84 in 
__call__
  File "/data/prj/python/git/python3-3.8/Lib/unittest/suite.py", line 122 in run
  File "/data/prj/python/git/python3-3.8/Lib/unittest/suite.py", line 84 in 
__call__
  File "/data/prj/python/git/python3-3.8/Lib/unittest/runner.py", line 176 in 
run
  File "/data/prj/python/git/python3-3.8/Lib/test/support/__init__.py", line 
1935 in _run_su