[issue28890] logging.handlers: Document that QueueListener is a daemon thread

2019-06-21 Thread Julien Castiaux


Julien Castiaux  added the comment:

Hello,

The purpose of the QueueListener is to provide a way to get messages sent by 
QueueHandlers. I was starting the QueueListener in is own mp.Process and was 
expecting the start() to hang. As it was not, the process was exiting logging a 
few messages or not depending on the threads schedule. I had a difficult time 
debugging it and ended up looking at the source code as the start() method was 
not stating it was starting a daemon thread.

The documentation now states it, I close the bug.
Regards,

--
resolution:  -> out of date

___
Python tracker 

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



[issue28890] logging.handlers: Document that QueueListener is a daemon thread

2019-06-21 Thread Vinay Sajip


Change by Vinay Sajip :


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



[issue37349] venv.EnvBuilder environmental variable hooks

2019-06-21 Thread Vinay Sajip


Vinay Sajip  added the comment:

> I'll take a stab at implementing this [custom_script_path]

I'll certainly look at a PR for this functionality.

--

___
Python tracker 

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



[issue37345] Add formal support for UDPLITE protococl

2019-06-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Sorry.
Please drop helper methods but keep IPPROTO_UDPLITE, UDPLITE_SEND_CSCOV, 
UDPLITE_RECV_CSCOV constants.

--

___
Python tracker 

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



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-21 Thread Vinay Sajip


Vinay Sajip  added the comment:

> It's stored in pyvenv.cfg.

Is it?

$ python3.8maint -m venv --prompt "foo bar" /tmp/venv
$ more /tmp/venv/pyvenv.cfg 
home = /home/vinay/projects/python/3.8
include-system-site-packages = false
version = 3.8.0
prompt = 'foo bar'

The source Python location is stored, but not, from what I can see, the venv 
path itself ... though of course that can be worked out from $PSScriptRoot or 
similar.

> How will this interact with EnvBuilder.install_scripts() (which explicitly 
> states that it performs textual substitution)?

If there's nothing to substitute (because the script source has no 
placeholders), that won't constitute a problem, AFAIK.

--

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> Is four months really an unreasonable timeline? I thought most of these 
> packages released more frequently than CPython.

I'm mostly worried about dependency chains. Right now, any project which 
depends on numpy cannot even test on 3.8b1 because numpy doesn't build.

--

___
Python tracker 

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



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2019-06-21 Thread Géry

Géry  added the comment:

I am having the same blocked signal issue on Windows when using Thread.join. 
This program does not print "interrupted" after pressing Ctrl+C:


import threading
import time


def f():
while True:
print("processing")
time.sleep(1)


if __name__ == "__main__":
try:
thread = threading.Thread(target=f)
thread.start()
thread.join()
except KeyboardInterrupt:
print("interrupted")


For reference, 2 years ago Nathaniel Smith gave an interesting explanation here:
https://mail.python.org/pipermail/python-dev/2017-August/148800.html.

--
nosy: +maggyero

___
Python tracker 

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



[issue37357] mbox From line wrongly detected

2019-06-21 Thread Andrew Bernard


New submission from Andrew Bernard :

When parsing an mbox file, the Python mailbox library is confused by the 
presence of lines starting with 'From' in the body of the text. A new 
fragmentary message item is created, but this is wrong. The following sample 
code and input demonstrates this. Replacing 'From' in the message body with, 
say, ' From' results in correct parsing.

This defect prevents correct import of mbox files into hyperkitty for GNU 
Mailman 3, as one instance where this is an impediment, as the message items 
become corrupt.

-- Python code
import sys
import mailbox

def main():
print('mailbox read test')
mbox = mailbox.mbox(sys.argv[1])
for msg in mbox:
print('~~')
print(msg)
print('~~')

if __name__ == "__main__":
main()


--- sample mbox with one message

>From  Fred Nurk  Wed, 8 Dec 1999 14:45:02 -0400
Date: Wed, 8 Dec 1999 14:45:02 -0400
From: Fred Nurk 
Subject:  Testing mbox in Python


 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce semper
 tempus augue at consectetur. Morbi eu nunc magna. Nulla placerat,
 eros in mollis finibus, dui risus ultrices tortor, non tincidunt nibh
 odio at augue. Quisque quis mauris neque. Curabitur ac accumsan
 neque. Maecenas sed mauris non justo sagittis finibus vel vel
 ex. Maecenas quis rutrum libero. Curabitur ex ante, tincidunt in
 velit at, egestas lobortis quam. Praesent tempus at dui ut
 volutpat. Nullam in rhoncus massa, id malesuada tortor. Suspendisse
 at cursus ex. Phasellus vitae pulvinar eros. Ut euismod dapibus
 libero, ultricies tempor leo accumsan ac. Etiam vestibulum, urna eget
 interdum eleifend, nulla nulla eleifend lacus, at lacinia neque nisi
 non velit.

>From sed vehicula venenatis dui at ultricies. Pellentesque vehicula
vulputate nibh nec aliquet. Vestibulum pretium velit id libero
porttitor, sed facilisis metus fermentum. Donec vestibulum, sapien non
convallis sodales, justo libero volutpat dui, ut luctus odio nisi eget
sapien. In viverra libero gravida arcu euismod, non sollicitudin massa
auctor. Pellentesque vitae laoreet nisi. In eros massa, pretium at
condimentum eu, molestie ut tortor. Suspendisse faucibus felis sem, et
fringilla urna consectetur molestie. Integer suscipit, orci sed
convallis maximus, velit purus tempus dui, id egestas tortor erat
auctor dui. Nulla fermentum tellus ut odio elementum, vel bibendum mi
imperdiet. Proin sed auctor purus. Orci varius natoque penatibus et
magnis dis parturient montes, nascetur ridiculus mus. Nullam non arcu
ex. Duis dapibus nunc in urna dapibus, sit amet interdum lectus
tincidunt.

Fred

--

--
components: Library (Lib)
messages: 346192
nosy: Andro
priority: normal
severity: normal
status: open
title: mbox From line wrongly detected
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



[issue37357] mbox From line wrongly detected

2019-06-21 Thread SilentGhost


Change by SilentGhost :


--
components: +email

___
Python tracker 

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



[issue37357] mbox From line wrongly detected

2019-06-21 Thread SilentGhost


Change by SilentGhost :


--
nosy: +barry, maxking, r.david.murray

___
Python tracker 

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



[issue37358] Use vectorcall for functools.partial

2019-06-21 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

functools.partial already has some optimizations to use vectorcall (formerly 
known as fastcall) for its onward calls, so it makes a lot of sense to also use 
vectorcall when being called.

--
components: Library (Lib)
messages: 346193
nosy: Mark.Shannon, jdemeyer, petr.viktorin, vstinner
priority: normal
severity: normal
status: open
title: Use vectorcall for functools.partial
type: performance
versions: Python 3.9

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Petr Viktorin


Petr Viktorin  added the comment:

> scientific projects that depend on it may lag longer as rebuilds and releases 
> will need to happen on PyPI, conda, and conda-forge.

Keep in mind that binary artifacts (wheels, Conda/distro packages) should not 
be affected. They need to be re-built for Python 3.8 *either way*, because the 
ABI changed.

The only artifacts that putting tp_print back in helps are sdists that include 
pre-generated Cython output, plus possibly projects that pin Cython to an older 
version.

Specifically, for any platform without a C compiler installed, users aren't 
helped by putting tp_print back in.

So:

(1) Status-quo (keep everything as is in 3.8b1):
  - binary/compiled distributions need to be re-built (*1)
  - sdists need to be re-generated with an up-to-date Cython (*2)
  - projects that pin Cython need to update it.
  + pure source distributions (where compiling involves running Cython) works 
as before (*3)
  + type objects do not waste memory
  + Cython can implement vectorcall optimizations for past Python versions 
(before 3.8)

(2) Apply PR 14193:
  - binary/compiled distributions still need to be re-built (*1)
  + sdists DO NOT need to be re-generated (*2)
  + projects that pin Cython DO NOT need to update it.
  + pure source distributions (where compiling involves running Cython) works 
as before (*3)
  - type objects get 8 bytes larger
  + Cython can implement vectorcall optimizations for past Python versions 
(before 3.8)

(3) Put back tp_print the way it was in 3.7:
  - binary/compiled distributions still need to be re-built (*1)
  + sdists DO NOT need to be re-generated (*2)
  + projects that pin Cython DO NOT need to update it.
  + pure source distributions (where compiling involves running Cython) works 
as before (*3)
  - type objects get 8 bytes larger
  - Cython can NOT implement vectorcall optimizations for past (pre-3.8) Python 
versions

*1: applicable to most wheel consumers, conda users, etc.
*2: applicable to sdist consumers with a compiler
*3: should be applicable to Conda/Fedora/Debian/... packagers (not so much end 
users)

> Is four months really an unreasonable timeline? I thought most of these 
> packages released more frequently than CPython.

Note that maintainers of these packages need to take an action (build wheels) 
anyway to support Python 3.8 (on compiler-less platforms). They need to test, 
and ideally even read "Porting to Python 3.8" and adjust the code.
Is re-generating Cython output, and bumping the version, too much of an *added* 
burden here?

If a project doesn't release 3.8 wheels by Python 3.8.0rc1, we don't get 
feedback on it from PyPI users (but Conda & Linux distros should be unaffected, 
if they run Cython on build).

--

___
Python tracker 

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



[issue37356] Name of 64-bit OpenSSL v1.1.1 DLLs

2019-06-21 Thread Phil Thompson


Phil Thompson  added the comment:

I think I was incorrect in saying the suffix was the default when building 
v1.1.1 from source, so any problem I have (trying to share the DLL with 
different pre-built packages) is not a Python problem. Sorry for the noise.

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



[issue37347] Reference-counting problem in sqlite

2019-06-21 Thread Aleksandr Balezin


Aleksandr Balezin  added the comment:

Because destructor can be registered only for particular functions. For example 
sqlite3_progress_handler() can't register destructor.

--

___
Python tracker 

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



[issue32252] test_regrtest leaves a test_python_* directory in TEMPDIR

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

This issue has been fixed in a more generic way: when using -jN, child 
processes reuse the temporary directory of the main process, and then main 
process ensures that the temporary directory is always removed:

commit 3c93153f7db5dd9b06f229e61978fd9199b3c097
Author: Victor Stinner 
Date:   Tue May 14 15:49:16 2019 +0200

bpo-36915: regrtest always remove tempdir of worker processes (GH-13312)

I close the issue. Moreover, the initial issue has been fixed.

Thanks for the report Xavier :-)

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



[issue37359] test_regrtest: test_list_cases() fails on x86 Gentoo Installed with X 3.x

2019-06-21 Thread STINNER Victor


New submission from STINNER Victor :

The root issue is likely related to "RuntimeWarning: tests may fail, unable to 
create temporary directory '/buildbot/tmp/tmpdir/test_python_28144': [Errno 17] 
File exists".

I don't know if a previous buildbot run forgot to remove this directory, or if 
it's a race condition in test_regrtest?

https://buildbot.python.org/all/#/builders/103/builds/2679

FAIL: test_list_cases (test.test_regrtest.ArgsTestCase)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/test_regrtest.py",
 line 915, in test_list_cases
self.assertEqual(output.splitlines(), all_methods)
AssertionError: Lists differ: ['tes[73 chars]hod2', 
"/buildbot/buildarea/cpython/3.x.ware-g[307 chars]th:'] != ['tes[73 chars]hod2']

First list contains 2 additional elements.
First extra element 2:
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/support/__init__.py:1058:
 RuntimeWarning: tests may fail, unable to create temporary directory 
'/buildbot/tmp/tmpdir/test_python_28144': [Errno 17] File exists: 
'/buildbot/tmp/tmpdir/test_python_28144'"

  ['test_regrtest_noop8.Tests.test_method1',
-  'test_regrtest_noop8.Tests.test_method2',
?  ^

+  'test_regrtest_noop8.Tests.test_method2']
?  ^

-  
'/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/support/__init__.py:1058:
 '
-  'RuntimeWarning: tests may fail, unable to create temporary directory '
-  "'/buildbot/tmp/tmpdir/test_python_28144': [Errno 17] File exists: "
-  "'/buildbot/tmp/tmpdir/test_python_28144'",
-  '  with temp_dir(path=name, quiet=quiet) as temp_path:']

--

--
components: Tests
messages: 346198
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_regrtest: test_list_cases() fails on x86 Gentoo Installed with X 3.x
versions: Python 3.9

___
Python tracker 

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



[issue37356] Name of 64-bit OpenSSL v1.1.1 DLLs

2019-06-21 Thread Phil Thompson


Phil Thompson  added the comment:

A clarification...

It seems the suffix is added when configured as VC-WIN64A but omitted when 
configured as VC-WIN64A-masm.

...still not a Python problem.

--

___
Python tracker 

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



[issue37360] Building without OpenPTY and without stropts.h

2019-06-21 Thread Nick Papior


New submission from Nick Papior :

When trying to compile Python without OpenPTY and without stropts.h the 
compilation fails at Modules/posixmodule.c.

Apparently there is a failed logic in the def's.

It goes something like this:

#ifdef HAVE_OPENPTY
...
#elif defined(HAVE__GETPTY)
...
#else
...
#if !defined(__CYGWIN__) && !defined(HAVE_DEV_PTC)
ioctl(slave_fd, I_PUSH, "ptem"); /* push ptem */
...
#endif
#endif

However, in the top of the file there is:
#if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX)
#ifdef HAVE_PTY_H
#include 
#else
#ifdef HAVE_LIBUTIL_H
#include 
#else
#ifdef HAVE_UTIL_H
#include 
#endif /* HAVE_UTIL_H */
#endif /* HAVE_LIBUTIL_H */
#endif /* HAVE_PTY_H */
#ifdef HAVE_STROPTS_H
#include 
#endif


However, if stropts.h is not present (then I_PUSH isn't either) then the logic 
fails if OpenPTY isn't present as well... :(

This came up when I tried to compile Python using Intel compiler suite on our 
cluster.
It succesfully compiles using GNU, but fails with Intel due to this rare hickup.

If you need additional details, please let me now!

--
messages: 346200
nosy: nickpapior
priority: normal
severity: normal
status: open
title: Building without OpenPTY and without stropts.h
type: compile error
versions: Python 2.7, Python 3.7

___
Python tracker 

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



[issue37357] mbox From line wrongly detected

2019-06-21 Thread Andrew Bernard


Change by Andrew Bernard :


--
resolution:  -> not a bug

___
Python tracker 

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



[issue37357] mbox From line wrongly detected

2019-06-21 Thread Andrew Bernard


Andrew Bernard  added the comment:

Not really a bug. Results from problems with the loose mbix format and lack of 
standards. Nothing Python can do about it.

--

___
Python tracker 

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



[issue37348] Optimize PyUnicode_GetString for short ASCII strings

2019-06-21 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +14105
pull_request: https://github.com/python/cpython/pull/14283

___
Python tracker 

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



[issue37348] Optimize PyUnicode_GetString for short ASCII strings

2019-06-21 Thread Inada Naoki


Inada Naoki  added the comment:

> I don't understand how _PyUnicodeWriter could be slow. It does not 
> overallocate by default. It's just wrapper to implement efficient memory 
> management.

I misunderstood _PyUnicodeWriter.  I thought it caused one more allocation, but 
it doesn't.

But _PyUnicodeWriter is still slow, because gcc and clang are not smart enough 
to optimize _PyUnicodeWriter_Init() & _PyUnicodeWriter_Prepare().

See this example:

```
#define PY_SSIZE_T_CLEAN
#include 

#define S(s) (s),strlen(s)

int
main(int argc, char *argv[])
{
Py_Initialize();

for (int i=0; i<1; i++) {
//PyObject *s = PyUnicode_FromString("aa");
PyObject *s = _PyUnicode_FromASCII(S("aa"));
Py_DECREF(s);
}
return 0;
}
```

PyUnicode_FromString() takes about 4 sec on my machine.  _PyUnicode_FromASCII() 
is about 2 sec.
By skipping _PyUnicodeWriter for ASCII string (GH-14283), 
PyUnicode_FromString() takes about 3 sec.

```
$ time ./x  # PyUnicode_FromString

real0m4.085s
user0m4.081s
sys 0m0.004s

$ time ./y  # PyUnicode_FromString (skip _PyUnicode_Writer, GH-14283)

real0m2.988s
user0m2.988s
sys 0m0.000s

$ time ./z  # _PyUnicode_FromASCII
$ time ./z

real0m1.975s
user0m1.975s
sys 0m0.000s
```

--

___
Python tracker 

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



[issue37348] Optimize PyUnicode_GetString for short ASCII strings

2019-06-21 Thread Inada Naoki


Inada Naoki  added the comment:

Another micro benchmark:

```
$ ./python-master -m pyperf timeit -o m1.json 'b=b"foobar"' -- 'b.decode()'
.
Mean +- std dev: 93.1 ns +- 2.4 ns

$ ./python -m pyperf timeit -o m2.json 'b=b"foobar"' -- 'b.decode()'
.
Mean +- std dev: 83.1 ns +- 2.6 ns

$ ./python -m pyperf compare_to m1.json m2.json
Mean +- std dev: [m1] 93.1 ns +- 2.4 ns -> [m2] 83.1 ns +- 2.6 ns: 1.12x faster 
(-11%)
```

--

___
Python tracker 

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



[issue37360] Building without OpenPTY and without stropts.h

2019-06-21 Thread Nick Papior


Nick Papior  added the comment:

FYI:

The problem arises since Intel adds a library path to:

../clck/2019.2.1/lib/intel64/

which has libutil.so!

This means that the Intel compiler *may* not find OpenPTY since that may 
optionally be placed in libutil.so...
Simply removing the path from the env means Intel compilers functions again ;)

*sigh*

--

___
Python tracker 

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



[issue37298] IDLE: Revise html to tkinker converter for help.html

2019-06-21 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

tl;dr I think it's a difference in the CSS for the HTML5 writer. 



In the HTMLTranslator class for docutils writer [1], I found the following 
docstring, specifically the line "The html5_polyglot writer solves this using 
CSS2.".

"""
The html4css1 writer has been optimized to produce visually compact
lists (less vertical whitespace).  HTML's mixed content models
allow list items to contain "body elements" or
"just text" or even "textand body
elementscombined", each with different effects.  It would
be best to stick with strict body elements in list items, but they
affect vertical spacing in older browsers (although they really
shouldn't).
The html5_polyglot writer solves this using CSS2.

Here is an outline of the optimization:

- Check for and omit  tags in "simple" lists: list items
  contain either a single paragraph, a nested simple list, or a
  paragraph followed by a nested simple list.  This means that
  this list can be compact:

  - Item 1.
  - Item 2.

  But this list cannot be compact:

  - Item 1.

This second paragraph forces space between list items.

  - Item 2.

- In non-list contexts, omit  tags on a paragraph if that
  paragraph is the only child of its parent (footnotes & citations
  are allowed a label first).

- Regardless of the above, in definitions, table cells, field bodies,
  option descriptions, and list items, mark the first child with
  'class="first"' and the last child with 'class="last"'.  The stylesheet
  sets the margins (top & bottom respectively) to 0 for these elements.

The ``no_compact_lists`` setting (``--no-compact-lists`` command-line
option) disables list whitespace optimization.
"""

In the HTMLTranslator class for the base [2], I found this comment:
# Do not omit  tags
# 
#
# The HTML4CSS1 writer does this to "produce
# visually compact lists (less vertical whitespace)". This writer
# relies on CSS rules for"visual compactness".
#
# * In XHTML 1.1, e.g. a  element may not contain
#   character data, so you cannot drop the  tags.
# * Keeping simple paragraphs in the field_body enables a CSS
#   rule to start the field-body on a new line if the label is too long
# * it makes the code simpler.

Since both comments are a few years old, I think it's in the CSS.


[1] 
https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docutils/writers/html4css1/__init__.py
[2] 
https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docutils/writers/_html_base.py

--

___
Python tracker 

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



[issue37298] IDLE: Revise html to tkinker converter for help.html

2019-06-21 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Adding on to my last post, it's not in the CSS, but it's that Sphinx 2.0 
switches from a default of HTML4 to HTML5.  The docutils comments explain the 
difference between the two.

https://github.com/sphinx-doc/sphinx/commit/a3cdd465ecf018fa5213b6b2c1c4e495973a2896

--

___
Python tracker 

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



[issue20443] __code__. co_filename should always be an absolute path

2019-06-21 Thread Nick Coghlan


Nick Coghlan  added the comment:

Perhaps `os._abspath_for_import`? If importlib finds it, then it can handle 
making early paths absolute itself, otherwise it will defer doing that until it 
has the full external import system bootstrapped. (importlib does try to make 
all paths absolute as it loads modules - it's just that some early modules 
aren't loaded that way)

--

___
Python tracker 

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



[issue37361] urllib3: TypeError: unsupported operand type(s) for -=: 'Session' and 'int' in Retry class

2019-06-21 Thread Andreas Jung


New submission from Andreas Jung :

Python 3.7.3

The following code is support to add a retry to the requests module.

"total" is correctly initialized with 5 here but internally self.total becomes 
an instation of "Session"


import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry


def requests_retry_session(
retries=5,
backoff_factor=5,
status_forcelist=(500, 502, 504),
):
session = requests.Session()
retry = Retry(
total=retries,
backoff_factor=backoff_factor,
status_forcelist=status_forcelist,
)
import pdb; pdb.set_trace()
print(retry.total)
adapter = HTTPAdapter(max_retries=retry)
session.mount('http://', adapter)
session.mount('https://', adapter)
return session


s = requests.Session()
response = requests_retry_session(s).get('https://www.foo.com/')
print(response.status_code)

Traceback (most recent call last):
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/urllib3-1.24.2-py3.7.egg/urllib3/connectionpool.py",
 line 600, in urlopen
chunked=chunked)
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/urllib3-1.24.2-py3.7.egg/urllib3/connectionpool.py",
 line 343, in _make_request
self._validate_conn(conn)
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/urllib3-1.24.2-py3.7.egg/urllib3/connectionpool.py",
 line 839, in _validate_conn
conn.connect()
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/urllib3-1.24.2-py3.7.egg/urllib3/connection.py",
 line 344, in connect
ssl_context=context)
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/urllib3-1.24.2-py3.7.egg/urllib3/util/ssl_.py",
 line 347, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/opt/python-3.7.3/lib/python3.7/ssl.py", line 412, in wrap_socket
session=session
  File "/opt/python-3.7.3/lib/python3.7/ssl.py", line 853, in _create
self.do_handshake()
  File "/opt/python-3.7.3/lib/python3.7/ssl.py", line 1117, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed: self signed certificate (_ssl.c:1056)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bin/zopepy", line 303, in 
exec(compile(__file__f.read(), __file__, "exec"))
  File "foo.py", line 28, in 
response = requests_retry_session(s).get('https://www.foo.com/')
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/requests-2.21.0-py3.7.egg/requests/sessions.py",
 line 546, in get
return self.request('GET', url, **kwargs)
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/requests-2.21.0-py3.7.egg/requests/sessions.py",
 line 533, in request
resp = self.send(prep, **send_kwargs)
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/requests-2.21.0-py3.7.egg/requests/sessions.py",
 line 646, in send
r = adapter.send(request, **kwargs)
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/requests-2.21.0-py3.7.egg/requests/adapters.py",
 line 449, in send
timeout=timeout
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/urllib3-1.24.2-py3.7.egg/urllib3/connectionpool.py",
 line 638, in urlopen
_stacktrace=sys.exc_info()[2])
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/urllib3-1.24.2-py3.7.egg/urllib3/util/retry.py",
 line 348, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Session' and 'int'

--
components: Library (Lib)
messages: 346208
nosy: ajung
priority: normal
severity: normal
status: open
title: urllib3: TypeError: unsupported operand type(s) for -=: 'Session' and 
'int' in Retry class
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



[issue37361] urllib3: TypeError: unsupported operand type(s) for -=: 'Session' and 'int' in Retry class

2019-06-21 Thread Andreas Jung


Change by Andreas Jung :


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



[issue37361] urllib3: TypeError: unsupported operand type(s) for -=: 'Session' and 'int' in Retry class

2019-06-21 Thread Andreas Jung


Andreas Jung  added the comment:

invalid

--

___
Python tracker 

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



[issue37361] urllib3: TypeError: unsupported operand type(s) for -=: 'Session' and 'int' in Retry class

2019-06-21 Thread SilentGhost


Change by SilentGhost :


--
resolution:  -> not a bug
type:  -> behavior

___
Python tracker 

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



[issue37358] Use vectorcall for functools.partial

2019-06-21 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
keywords: +patch
pull_requests: +14106
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14284

___
Python tracker 

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



[issue37335] Add 646 ASCII alias to locale coercion tests.

2019-06-21 Thread Jakub Kulik


Change by Jakub Kulik :


--
pull_requests: +14107
pull_request: https://github.com/python/cpython/pull/14285

___
Python tracker 

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



[issue37071] HTMLParser mistakenly inventing new tags while parsing

2019-06-21 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Thank you for the report.

Looking at the BeautifulSoup source, there is a comment about this scenario:
# Unlike other parsers, html.parser doesn't send separate end tag
# events for empty-element tags. (It's handled in
# handle_startendtag, but only if the original markup looked like
# .)
#
# So we need to call handle_endtag() ourselves. Since we
# know the start event is identical to the end event, we
# don't want handle_endtag() to cross off any previous end
# events for tags of this name.


HTMLParser itself produces output such as:
>>> class MyParser(HTMLParser):
... def handle_starttag(self, tag, attrs):
... print(f'start: {tag}')
... def handle_endtag(self, tag):
... print(f'end: {tag}')
... def handle_data(self, data):
... print(f'data: {data}')
...
>>> parser = MyParser()
>>> parser.feed('')
start: p
start: test
end: p

My suggestion would be to try a different parser in BeautifulSoup [1] to handle 
this.  Even if we wanted to modify HTMLParser, any such change would probably 
be backwards incompatible.

[1] https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


New submission from STINNER Victor :

Currently, test_gdb fails if gdb logs messages on stderr which are 
"unexpected". I don't understand the rationale for that: Python is not supposed 
to test gdb. It's only supposed to check that python-gdb.py commands work as 
expected: stderr should be ignored.

In the past, I was lazy and just added more and more patterns to ignore on 
stderr, but this approach doesn't work in the long term: gdb evolves 
frequently, and there are always new messages.

Attached PR modify test_gdb to ignore stderr, except of "PC not saved" pattern 
used to skip test_gdb on a special case: bpo-34007.

# bpo34007: Sometimes some versions of the shared libraries that
# are part of the traceback are compiled in optimised mode and the
# Program Counter (PC) is not present, not allowing gdb to walk the
# frames back. When this happens, the Python bindings of gdb raise
# an exception, making the test impossible to succeed.
if "PC not saved" in err:
raise unittest.SkipTest("gdb cannot walk the frame object"
" because the Program Counter is"
" not present")

--
components: Tests
messages: 346211
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_gdb must not fail on "unexpected" messages written into stderr
versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue36888] Create a way to check that the parent process is alive for deamonized processes

2019-06-21 Thread Pierre Glaser


Change by Pierre Glaser :


--
pull_requests: +14108
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/14286

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +14109
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14287

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

> In the past, I was lazy and just added more and more patterns to ignore on 
> stderr, but this approach doesn't work in the long term: gdb evolves 
> frequently, and there are always new messages.

A recent example: test_gdb fails on Fedora because a warning which should not 
prevent to test python-gdb.py commands:

"Missing separate debuginfo for /lib/ld-linux-aarch64.so.1"

Moreover, Fedora also suggests a command to install missing package in this 
case:

"Try: dnf --enablerepo='*debug*' install ..."

https://bugzilla.redhat.com/show_bug.cgi?id=1721483

--

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:

FWIW, I agree totally with Petr's analysis.

Jeroen's analysis ignores some points, has technical inaccuracies (nobody can 
use a static type compiled for 3.7 with 3.8), and is based on precedents that 
do not apply to this situation. (All of which I've mentioned above, but I 
assume nobody is reading the whole repetitive thread anymore.)

--

___
Python tracker 

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



[issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1

2019-06-21 Thread Matej Cepl


Matej Cepl  added the comment:

I don't think this has been really fixed, see attached log,even with the patch 
applied I am still getting:

[ 6220s] ==
[ 6220s] FAIL: test_pyobject_freed_is_freed 
(test.test_capi.PyMemMallocDebugTests)
[ 6220s] --
[ 6220s] Traceback (most recent call last):
[ 6220s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/test_capi.py", line 730, i
n test_pyobject_freed_is_freed
[ 6220s] self.check_pyobject_is_freed('check_pyobject_freed_is_freed')
[ 6220s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/test_capi.py", line 721, i
n check_pyobject_is_freed
[ 6220s] assert_python_ok('-c', code, PYTHONMALLOC=self.PYTHONMALLOC)
[ 6220s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/support/script_helper.py",
 line 157, in assert_python_ok
[ 6220s] return _assert_python(True, *args, **env_vars)
[ 6220s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/support/script_helper.py",
 line 143, in _assert_python
[ 6220s] res.fail(cmd_line)
[ 6220s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/support/script_helper.py", 
line 70, in fail
[ 6220s] raise AssertionError("Process return code is %d\n"
[ 6220s] AssertionError: Process return code is 1
[ 6220s] command line: ['/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/python', 
'-X', 'faulthandler', '-c', '\nimport gc, os, sys, _testcapi\n# Disable the GC 
to avoid crash on GC collection\ngc.disable()\ntry:\n
_testcapi.check_pyobject_freed_is_freed()\n# Exit immediately to avoid a 
crash while deallocating\n# the invalid object\nos._exit(0)\nexcept 
_testcapi.error:\nos._exit(1)\n']

--
Added file: https://bugs.python.org/file48431/log.txt.gz

___
Python tracker 

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



[issue37359] test_regrtest: test_list_cases() fails on x86 Gentoo Installed with X 3.x

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

Related change:

commit 3c93153f7db5dd9b06f229e61978fd9199b3c097
Author: Victor Stinner 
Date:   Tue May 14 15:49:16 2019 +0200

bpo-36915: regrtest always remove tempdir of worker processes (GH-13312)

--

___
Python tracker 

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



[issue36210] correct AIX logic in setup.py for (non-existant) optional extensions

2019-06-21 Thread Nick Coghlan


Nick Coghlan  added the comment:


New changeset 08970cb03c61f62f4f69e7769d0075fa66bb86aa by Nick Coghlan (Michael 
Felt) in branch 'master':
bpo-36210: update optional extension handling for AIX (GH-12202)
https://github.com/python/cpython/commit/08970cb03c61f62f4f69e7769d0075fa66bb86aa


--
nosy: +ncoghlan

___
Python tracker 

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



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:

One thing to note is that if we sign this file, it'll have to bypass the text 
substitution step completely to avoid modifying line endings or encoding. So 
there could be code changes in venv too.

This would be a great contribution from a PowerShell expert, and might be worth 
advertising (Twitter) for one. File parsing can get tricky quickly, but there 
are a few clever ways to approach it. We also need to set a minimum PowerShell 
version to support, as plenty of its features aren't available on base Windows 
7 installs.

--

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> based on precedents that do not apply to this situation

I'm curious what you mean here...

--

___
Python tracker 

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



[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

I reported the issue to docutils. In fact, docutils FileInput class was already 
fixed to prevent the deprecation warning, but there was no release yet:
https://sourceforge.net/p/docutils/bugs/363/

--

___
Python tracker 

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



[issue37244] test_multiprocessing_forkserver: test_resource_tracker() failed on x86 Gentoo Refleaks 3.8

2019-06-21 Thread Pierre Glaser


Change by Pierre Glaser :


--
keywords: +patch
pull_requests: +14110
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14288

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Nick Coghlan


Nick Coghlan  added the comment:

It isn't the actively maintained projects that publish wheel files that I'm 
worried about fixing - it's the sdist only projects that would otherwise only 
need recompilation to work on the new Python version.

With this fixed, and the PyCode_New -> PyCode_New + PyCode_WithPosArgs fix from 
bpo-37221 merged, then that long tail will get another few years of life, and 
will start emitting deprecation warnings for the part that's actually going to 
go away in Python 3.9 (i.e. the tp_print slot).

My opinion would be different if tp_print had actually been emitting compile 
time warnings for the past 10 years, but it hasn't been - we just haven't been 
using it for anything.

--

___
Python tracker 

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



[issue30905] Embedding should have public API for interactive mode

2019-06-21 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread Dave Malcolm


Dave Malcolm  added the comment:

I think when I wrote this I was over-optimistically thinking that we could just 
add more patterns, but if it's becoming a pain, then your approach looks good 
to me.

--
nosy: +dmalcolm

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:

> I'm curious what you mean here...

msg345409

--

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:

> With this fixed, and the PyCode_New -> PyCode_New + PyCode_WithPosArgs fix 
> from bpo-37221 merged, then that long tail will get another few years of 
> life, and will start emitting deprecation warnings for the part that's 
> actually going to go away in Python 3.9 (i.e. the tp_print slot).

By definition (as unmaintained packages), that's a few more years until death. 
Nobody is looking at their compile time warnings (that would require 
maintenance ;) ), so nothing will happen until it actually breaks. Keeping the 
field for one more version makes less sense than keeping it forever.

--

___
Python tracker 

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



[issue37221] PyCode_New API change breaks backwards compatibility policy

2019-06-21 Thread Nick Coghlan

Nick Coghlan  added the comment:

I'm happy with the change in https://github.com/python/cpython/pull/13959, but 
we need sign-off from Łukasz as release manager on bumping the 
Py_VERSION_SERIAL a bit early so Cython can reliably detect that this change 
has been reverted without having to check for the existence of the 
PyCode_NewWithPosArgs symbol.

Alternatively, if my proposal at https://github.com/cython/cython/pull/3009 to 
check directly for PyCode_NewWithPosOnlyArgs in the Cython module setup code is 
accepted, then we wouldn't need to bump the version number early, and could 
merge the PR as soon as the What's New conflict is resolved.

--

___
Python tracker 

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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Eric Snow


Change by Eric Snow :


--
nosy: +steve.dower

___
Python tracker 

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



[issue37293] concurrent.futures.InterpreterPoolExecutor

2019-06-21 Thread Eric Snow


Eric Snow  added the comment:

FWIW, performance benefits when subinterpreters stop sharing the GIL are not 
the only benefit.  In fact, PEP 554 is specifically written to avoid that 
consideration, focusing on the benefits of the concurrency model (i.e. CSP).  
So I wouldn't call this pointless even without per-interpreter GIL. :)

(Of course, this *would* be blocked on acceptance and implementation of PEP 
554.)

--
stage:  -> needs patch

___
Python tracker 

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



[issue37293] concurrent.futures.InterpreterPoolExecutor

2019-06-21 Thread Eric Snow


Eric Snow  added the comment:

@Davin, we've spoken before about something similar for multiprocessing, IIRC. 
:)

--
nosy: +davin

___
Python tracker 

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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:

Thanks! Well spotted.

--

___
Python tracker 

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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:


New changeset 08286d52b29de604a4b187bf1f0d4209e39c926c by Steve Dower (Zackery 
Spytz) in branch 'master':
bpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)
https://github.com/python/cpython/commit/08286d52b29de604a4b187bf1f0d4209e39c926c


--

___
Python tracker 

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



[issue37363] Additional PEP578 hooks

2019-06-21 Thread Steve Dower


New submission from Steve Dower :

We should also (see whether we should) add audit hooks for the following 
modules:
* configparser
* crypt
* ensurepip
* ftplib
* glob
* http
* imaplib
* nntplib
* pdb
* poplib
* runpy
* shutil
* smtpd
* smtplib
* socketserver
* sqlite3
* telnetlib
* webbrowser
* xmlrpc

All of these seem likely to have interesting events (specifically, they can all 
be misused in scenarios where the impact would not be obvious without extra 
information).

--
messages: 346229
nosy: christian.heimes, steve.dower
priority: normal
severity: normal
stage: needs patch
status: open
title: Additional PEP578 hooks
type: enhancement
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2019-06-21 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +14111
pull_request: https://github.com/python/cpython/pull/14152

___
Python tracker 

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



[issue37364] Use io.open_code for .pth files

2019-06-21 Thread Steve Dower


New submission from Steve Dower :

Since .pth files may contain executable code, we should open them using 
io.open_code().

--
messages: 346230
nosy: christian.heimes, steve.dower
priority: normal
severity: normal
stage: needs patch
status: open
title: Use io.open_code for .pth files
type: behavior
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue37364] Use io.open_code for .pth files

2019-06-21 Thread Christian Heimes


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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14112
pull_request: https://github.com/python/cpython/pull/14289

___
Python tracker 

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



[issue37365] RecursionError not caught explicitly may crash with "Aborted (core dumped)"

2019-06-21 Thread Adrien


New submission from Adrien :

This is an issue that I first saw repoted by @remi.lapeyre on issue36272: 
https://bugs.python.org/issue36272#msg337843
It also be reported some years ago: https://stackoverflow.com/a/54171640/2291710
I searched but I did not find any existing issue, so I open a new one, I hope 
this is not a duplicate.

It's easily reproducible:


def rec():
try:
rec()
except Exception:
rec()
rec()


It will kill the CPython interpreter (@remi.lapeyre provided explanation in the 
issue I linked).

Of course, this is a contrived example. Still, I guess CPython should avoid to 
crash in any situation. This is a tricky edge case: by doing `except 
Exception:` one could expect to correctly handle all kind of errors without 
being aware that in some situation the "RecursionError" need to be managed too.

Particularly, the fix in issue36272 solely patches "StreamHandler": 
https://github.com/python/cpython/blob/65f64b1903ae85b97a30f514bbc1b7ce940c3af2/Lib/logging/__init__.py#L1082-L1102
There is many other handlers that are still affected, every time you see 
"except Exception" in "emit()": 
https://github.com/python/cpython/blob/65f64b1903ae85b97a30f514bbc1b7ce940c3af2/Lib/logging/handlers.py

Finally, it should also be noted that the "except RecursionError" workaround 
implies that loggers are not longer able to catch recursive erros in "write()" 
or "format()" without re-raising the RecursionError and (probably) halting the 
program.
It may happen for example that a faulty implementation of a custom Handler or 
LogRecord attribute cause a RecursionError. Thanks to the "raiseExceptions = 
false" logging option, this would usually be caught and a message printed on 
stderr without killing the app.

--
messages: 346232
nosy: Delgan
priority: normal
severity: normal
status: open
title: RecursionError not caught explicitly may crash with "Aborted (core 
dumped)"
type: crash

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:


New changeset f8dd77d36067fd7be614edde1e5e9e7467c450dc by Steve Dower (Paul 
Monson) in branch 'master':
bpo-36511: Fix -u parameters for ARM32 tests (GH-14280)
https://github.com/python/cpython/commit/f8dd77d36067fd7be614edde1e5e9e7467c450dc


--

___
Python tracker 

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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:


New changeset 6c7947713a40851e123493ca0fe8f2791d7ed2a6 by Steve Dower in branch 
'3.8':
bpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)
https://github.com/python/cpython/commit/6c7947713a40851e123493ca0fe8f2791d7ed2a6


--

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-06-21 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14113
pull_request: https://github.com/python/cpython/pull/14290

___
Python tracker 

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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Steve Dower


Change by Steve Dower :


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



[issue37348] Optimize PyUnicode_GetString for short ASCII strings

2019-06-21 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +14114
pull_request: https://github.com/python/cpython/pull/14291

___
Python tracker 

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



[issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch

2019-06-21 Thread Mariatta


Change by Mariatta :


--
pull_requests: +14115
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14282

___
Python tracker 

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



[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-06-21 Thread Brett Cannon


Brett Cannon  added the comment:

> Would it be appropriate to change the "choose" method to "choice"? 

Yep, just make sure the tests still pass before and after the change. :)

> should the name of "test_pkgimport" instead be "test_pkg_import"?

Since things are moving it's fine to rename the file.

> would it be best to perform all of these changes within separate pull 
> requests, or are they minor enough to be combined into one?

Separate are easier to review.

--

___
Python tracker 

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



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-21 Thread Brett Cannon


Brett Cannon  added the comment:

> How will this interact with EnvBuilder.install_scripts() (which explicitly 
> states that it performs textual substitution)?

It won't, so that would have to change as well. As you mentioned, Paul, I don't 
know who even uses the functionality through a subclass, but since this is a 
security consideration I think it's worth changing.

> Is it?

Sorry, misread what you were asking. You're right it's not stored, but it can 
be worked out in other ways, e.g. from the location of pyvenv.cfg or 
Activate.ps1, etc.

> So there could be code changes in venv too.

Yep, hence making the issue now so that others talking about adding more 
substitution ideas know that there's talk going the other way and removing the 
substitution abilities.

> This would be a great contribution from a PowerShell expert, and might be 
> worth advertising (Twitter) for one.

Already have a co-worker interested in working on it.

--

___
Python tracker 

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



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-21 Thread Brett Cannon


Change by Brett Cannon :


--
versions: +Python 3.9

___
Python tracker 

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



[issue37348] Optimize PyUnicode_GetString for short ASCII strings

2019-06-21 Thread Inada Naoki


Inada Naoki  added the comment:

PR 14291 seems simpler than PR 14283.  But PR 14283 is faster because 
_PyUnicodeWriter is a learge struct.

master: 3.7sec
PR 14283: 2.9sec
PR 14291: 3.45sec

compiler: gcc (Ubuntu 8.3.0-6ubuntu1) 8.3.0
without LTO, without PGO

--

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Carol Willing


Carol Willing  added the comment:

Thanks Petr for the wonderful summary.

Of the pros/cons that you mention (if I am understanding correctly), I think 
that the issue comes down to sdist consumers and regeneration.

1. If sdist consumers will need to regenerate an sdist?
2. How many sdist consumers will likely be impacted?
3. If impacted, how difficult would the regeneration be for a scientist who is 
moderately comfortable with compilation?
4. Is there any guidance or information that can be given to sdist consumers?

Do we have any good metrics/insights on Question 2 and 3?

---

While TypeObject size, updating a pinned version, and vectorcall optimization 
for prior versions are considerations, I believe that they are secondary:

- Typeobject size: Nice to have a smaller size but probably not a concern of 
the sdist consumer or general user.
- Update a pinned Cython version: General expectation is it should work with 
the environment which it was pinned within. There should not be an expectation 
that the pinned version will work if other parts of the environment change.
- vectorcall optimization extends to prior versions: While perhaps nice to 
have, it is likely more an added benefit instead of an implicit contract or 
expectation.

--

___
Python tracker 

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



[issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch

2019-06-21 Thread miss-islington


miss-islington  added the comment:


New changeset 52c4a4fb816d51a36c02b043d6fd5eeb875411d6 by Miss Islington (bot) 
(Mariatta) in branch '3.8':
[3.8] bpo-32924: Fix the Show Source url in 3.8 documentation. (GH-14282)
https://github.com/python/cpython/commit/52c4a4fb816d51a36c02b043d6fd5eeb875411d6


--
nosy: +miss-islington

___
Python tracker 

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



[issue30202] Update test.test_importlib.test_abc to test find_spec()

2019-06-21 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset a0d73a143af404deecb9c4fcdbd3ddbafd96b41b by Brett Cannon (Joannah 
Nanjekye) in branch 'master':
bpo-30202 : Update test.test_importlib.test_abc to test find_spec() (GH-12847)
https://github.com/python/cpython/commit/a0d73a143af404deecb9c4fcdbd3ddbafd96b41b


--

___
Python tracker 

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



[issue24214] UTF-8 incremental decoder doesn't support surrogatepass correctly

2019-06-21 Thread Roufique Hossain


Change by Roufique Hossain :


--
nosy: +roufique7

___
Python tracker 

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



[issue37298] IDLE: Revise html to tkinker converter for help.html

2019-06-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you for the research, including the crucial commit!  What I understand 
from the quotes:

1. Sphinx 2 writes HTML5 by default.  The html5 writers always writes 
paragraphs because they are required by the xhtml used by html5.

2. Firefox, for instance, displays the result the same as before either because 
it either has the logic to avoid extra blank lines when reading html5 or 
because this is taken care of by revised css (this is unclear from the quotes). 

To deal with html5, our converter would have to ignore the s that the html4 
writer omitted, by adding logic for the cases used in idle.rst.  Not fun.

Reading the commit (3rd line) revealed a new sphinx configuration option: 
html4_writer, defaulting to False.  When I switched from building html with my 
3.6 install with sphinx 1.8.1 to 3.7 with 2.something, and added "-D 
html4_writer=1" to a direct call of sphinx-build, I indeed got html without 
added s.  The only different was the irrelevant omission of '\n' between 
list item header and text in the html file.  Example:
  -New File
  -Create a new file editing window.
  +New FileCreate a new file editing window.

Setting SPHINXOPTS should work when using 'Doc/make.bat html'.  I will prepare 
a PR documenting our parser requirement and include the neutral html changes.

--

___
Python tracker 

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



[issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
keywords: +patch
pull_requests: +14117
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14292

___
Python tracker 

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



[issue37302] Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
keywords: +patch
pull_requests: +14116
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14292

___
Python tracker 

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



[issue37323] test_asyncio: test_debug_mode_interop() fails using -Werror

2019-06-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
keywords: +patch
pull_requests: +14118
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14293

___
Python tracker 

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



[issue37365] RecursionError not caught explicitly may crash with "Aborted (core dumped)"

2019-06-21 Thread Ned Deily


Ned Deily  added the comment:

Thank you for the report.  The issue of the interpreter not being able to 
gracefully handle a stack overflow error is an old one: see, for example 
Issue18075 or Issue35542.  So far, no one has proposed a solution and, as can 
be seen in Issue18075, workarounds someimes produce unexpected side-effects 
that can be more problematic than the stack overflow segfault.  I'm going to 
close this as a duplicate of Issue18075.  If anyone has further suggestions for 
solutions, please continue the discussion there.

--
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Infinite recursion tests triggering a segfault

___
Python tracker 

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



[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.5, Python 3.6

___
Python tracker 

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



[issue37302] Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions

2019-06-21 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

The PR is ready for review.

--

___
Python tracker 

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



[issue37302] Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
type:  -> enhancement

___
Python tracker 

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



[issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

I have no idea why the test fails on this specific server, whereas it pass on 
our large fleet of buildbots which test various libc and various compilers and 
platforms.

I cannot investigate if I cannot reproduce the failure. Someone should run the 
test in a debugger to see the content of the memory after free.

Python is not used with malloc, except for debug or testing. In thr meanwhile 
you can skip this test for malloc, since it seems to work with pymalloc. The 
same test is run on malloc and on pymalloc.

--

___
Python tracker 

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



[issue37366] Add an "onitem" callback parameter to shutil.rmtree()

2019-06-21 Thread Jeffrey Kintscher


New submission from Jeffrey Kintscher :

Add an "onitem" callback paramter to shutil.rmtree() that, if provided, gets 
called for each directory entry as it is encountered.  This allows the caller 
to perform any required special handling of individual directory entries (e.g. 
unmounting a mount point, closing a file, shutting down a named pipe, etc.) 
before rmtree() attempts to remove them.

This enhancement is related to issue #36422.

--
components: Library (Lib)
messages: 346245
nosy: Jeffrey.Kintscher
priority: normal
severity: normal
status: open
title: Add an "onitem" callback parameter to shutil.rmtree()
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue37366] Add an "onitem" callback parameter to shutil.rmtree()

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +giampaolo.rodola, josh.r, max, paul.moore, riccardomurri, 
serhiy.storchaka, steve.dower, tarek, tim.golden, zach.ware

___
Python tracker 

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



[issue37366] Add an "onitem" callback parameter to shutil.rmtree()

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


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



[issue37302] Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
versions: +Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37367] octal escapes applied inconsistently throughout the interpreter and lib

2019-06-21 Thread Dan Snider


New submission from Dan Snider :

At present, the bytecode compiler can generate 512 different unicode 
characters, one for each integral from the range [0-511), 512 being the total 
number of syntactically valid permutations of 3 octal digits preceded by a 
backslash. However, this does not match the regex compiler, which raises an 
error regardless of the input type when it encounters an an octal escape 
character with a decimal value greater than 255. On the other hand... the bytes 
literal:

>>> b'\407'

is somehow valid, and can lead to extremely difficult bugs to track down, such 
as this nonsense:

>>> re.compile(b'\407').search(b'\a')


I propose that the regex parser be augmented, enabling for unicode patterns the 
interpretation of three character octal escapes from the range(256, 512), while 
the bytecode parser be adjusted to match the behavior of the regex parser, 
raising an error for bytes literals > b"\400", rather than truncating the 9th 
bit.

--
messages: 346246
nosy: bup
priority: normal
severity: normal
status: open
title: octal escapes applied inconsistently throughout the interpreter and lib

___
Python tracker 

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



[issue37367] octal escapes applied inconsistently throughout the interpreter and lib

2019-06-21 Thread SilentGhost


Change by SilentGhost :


--
components: +Regular Expressions
nosy: +ezio.melotti, mrabarnett, serhiy.storchaka
versions: +Python 3.9

___
Python tracker 

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



[issue37348] Optimize PyUnicode_FromString for short ASCII strings

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

I'm confused by the issue title: PyUnicode_GetString() doesn't exist, it's 
PyUnicode_FromString() :-) I changed the title.

--
title: Optimize PyUnicode_GetString for short ASCII strings -> Optimize 
PyUnicode_FromString for short ASCII strings

___
Python tracker 

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



[issue24214] UTF-8 incremental decoder doesn't support surrogatepass correctly

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 1: 
> invalid continuation byte

Python is right: b'f\xf1\xf6rd' is not a valid UTF-8 string:

$ python3
Python 3.7.3 (default, May 11 2019, 00:38:04) 
>>> b'f\xf1\xf6rd'.decode()
Traceback (most recent call last):
  File "", line 1, in 
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 1: invalid 
continuation byte

This change is deliberate: it makes UTF-8 incremental decoder correct (respect 
the UTF-8 standard). I close the issue.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue37368] test_asyncio: test_create_server_ssl_match_failed() failed on s390x SLES 3.x and logged an unraisable exception

2019-06-21 Thread STINNER Victor


New submission from STINNER Victor :

https://buildbot.python.org/all/#/builders/16/builds/3290

test_create_server_ssl_match_failed 
(test.test_asyncio.test_events.PollEventLoopTests) ...

/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py:321:
 ResourceWarning: unclosed transport 
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Warning -- Unraisable exception
Exception ignored in: 
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py",
 line 322, in __del__
self.close()
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py",
 line 317, in close
self._ssl_protocol._start_shutdown()
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py",
 line 591, in _start_shutdown
self._abort()
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py",
 line 732, in _abort
self._transport.abort()
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/selector_events.py",
 line 660, in abort
self._force_close(None)
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/selector_events.py",
 line 711, in _force_close
self._loop.call_soon(self._call_connection_lost, exc)
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/base_events.py",
 line 711, in call_soon
self._check_closed()
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/base_events.py",
 line 504, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/selector_events.py:684:
 ResourceWarning: unclosed transport <_SelectorSocketTransport closing fd=7>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Task was destroyed but it is pending!
task: 
 wait_for=()]>>

ok

--
components: Tests, asyncio
messages: 346249
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: test_asyncio: test_create_server_ssl_match_failed() failed on s390x SLES 
3.x and logged an unraisable exception
versions: Python 3.9

___
Python tracker 

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



[issue37352] Typo in documentation: "to making it easy"

2019-06-21 Thread Mark Rice


Mark Rice  added the comment:

Hi, first time on here. And new to the python bug tracker. But, the sentence 
might read fine as is, or could be tweaked to say "with an eye toward making it 
easily tested..." as Zach suggested. It is what my internal grammar alarm 
jumped to automatically.

--
nosy: +mrice88

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14120
pull_request: https://github.com/python/cpython/pull/14296

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e56a123fd0acaa295a28b98d2e46d956b97d1263 by Victor Stinner in 
branch 'master':
bpo-37362: test_gdb now ignores stderr (GH-14287)
https://github.com/python/cpython/commit/e56a123fd0acaa295a28b98d2e46d956b97d1263


--

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14119
pull_request: https://github.com/python/cpython/pull/14295

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

> I think when I wrote this I was over-optimistically thinking that we could 
> just add more patterns, but if it's becoming a pain, then your approach looks 
> good to me.

Well, I tried hard to fit into this approach: over the years, I added more and 
more patterns... but it's a painful work: first a CI break, I add more patterns 
and then I have to backport the change to all branches. As I wrote, I'm not 
convinced of the purpose of getting a failure in this case. Python doesn't get 
any benefit from this.

Anyway, I merged my change. Thanks for your approval ;-)

--

___
Python tracker 

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



  1   2   >