[issue34013] Inconsistent SyntaxError for print

2018-06-30 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Related issue that introduced the error message if you would like to take a 
look at the implementation : https://bugs.python.org/issue30597

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue33986] asyncio: Typo in documentation: BaseSubprocessTransport -> SubprocessTransport

2018-06-30 Thread Bumsik Kim


Bumsik Kim  added the comment:

As a note, BaseSubprocessTransport is used for implementation of 
SubprocessTransport. BaseSubprocessTransport is not exposed outside of the 
module.

--

___
Python tracker 

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



[issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues

2018-06-30 Thread Nick Coghlan


Nick Coghlan  added the comment:

I've updated the PR to match my current understanding of the situation with 
Debian 8 and Ubuntu 14.04.

--
stage: needs patch -> commit review

___
Python tracker 

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



[issue34015] doc Add link to Descriptor HowTo Guide in Data Model

2018-06-30 Thread Andrés Delfino

Change by Andrés Delfino :


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

___
Python tracker 

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



[issue34015] doc Add link to Descriptor HowTo Guide in Data Model

2018-06-30 Thread Andrés Delfino

New submission from Andrés Delfino :

IMHO, it would be useful to make the Descriptor HowTo Guide more discoverable. 
As far as I can see, we are not linking to it from anywhere except the HOWTO 
index. Section 3.3.2.2., "Implementing Descriptors", in "Data Model" seems to 
be the most appropriate place.

--
assignee: docs@python
components: Documentation
messages: 320821
nosy: adelfino, docs@python
priority: normal
severity: normal
status: open
title: doc Add link to Descriptor HowTo Guide in Data Model
type: enhancement
versions: Python 2.7, 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



[issue34014] loop.run_in_executor should propagate current contextvars

2018-06-30 Thread Viktor Kovtun


Viktor Kovtun  added the comment:

`ProcessPoolExecutor as executor is not so popular in real world` - as executor 
for asyncio

--

___
Python tracker 

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



[issue34014] loop.run_in_executor should propagate current contextvars

2018-06-30 Thread Viktor Kovtun


Viktor Kovtun  added the comment:

What about to check instance of executor and depending on that propagate 
contextvars or not?

As well to raise RuntimeError for ProcessPoolExecutor with provided context?

I assume, that ProcessPoolExecutor as executor is not so popular in real world, 
but I can not provide any stats.

Different behavior is defiantly at least weird, but do not support natively 
what is technically expected also strange.

https://docs.python.org/3.7/library/contextvars.html#asyncio-support `Context 
variables are natively supported in asyncio` is hard for end users.

Each use case of contextvars + run_in_executor will produce copy-paste 
boilerplate

As for me it is very similar to the `asyncio.get_event_loop()` history

--

___
Python tracker 

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



[issue34014] loop.run_in_executor should propagate current contextvars

2018-06-30 Thread Yury Selivanov


Yury Selivanov  added the comment:

As a workaround you can subclass the ThreadPoolExecutor and set it as a default 
executor.

--

___
Python tracker 

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



[issue34014] loop.run_in_executor should propagate current contextvars

2018-06-30 Thread Yury Selivanov


Yury Selivanov  added the comment:

I considered enabling that, but in the end decided not to. The reason is that 
it's possible to use a ProcessPoolExecutor with run_in_execuror(), and context 
cars currently don't support pickling (and probably never will). We can't have 
a single api that sometimes works with contextvars and sometimes doesn't.

So this is a "won't fix".

--

___
Python tracker 

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



[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-06-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Lorenz, welcome!  Please sign CLA so we can review and merge this.

--

___
Python tracker 

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



[issue34014] loop.run_in_executor should propagate current contextvars

2018-06-30 Thread Viktor Kovtun


Change by Viktor Kovtun :


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

___
Python tracker 

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



[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-06-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

f:\dev\3x>python -m test test_script_helper
...
test_script_helper failed

f:\dev\3x> git pr 8034
...
Switched to branch 'pr_8034'

f:\dev\3x>python -m test test_script_helper
...
== Tests result: SUCCESS ==

--

___
Python tracker 

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



[issue34014] loop.run_in_executor should propagate current contextvars

2018-06-30 Thread Viktor Kovtun


New submission from Viktor Kovtun :

PEP 567 supports copying context into another threads, but for asyncio users 
each call `run_in_executor` requires explicit context propagation

For end users expected behavior that context is copied automatically

--
components: asyncio
messages: 320814
nosy: asvetlov, hellysmile, yselivanov
priority: normal
severity: normal
status: open
title: loop.run_in_executor should propagate current contextvars
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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread Ned Deily


Ned Deily  added the comment:

nosying Julien

--
nosy: +mdk, ned.deily

___
Python tracker 

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



[issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr()

2018-06-30 Thread Błażej Michalik

Błażej Michalik  added the comment:

It was nearly 2 years ago when we needed it, and we avoided the issue by 
overriding get_names(). I'll have to find the code in which this was used to 
answer your question.

I guess we could've modified the class definition, however weirdly would that 
look.

But then again, shouldn't the commands that are runnable from inside .cmdloop() 
be auto-completable and visible in 'help'? IMHO it does make some intuitive 
sense, or at least it seems less surprising.

--

___
Python tracker 

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



[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-06-30 Thread Lorenz Mende


Lorenz Mende  added the comment:

I confirm the issue too.
I am running the tests on a win 10 Ver 1709, clean build.

Most likely the issue is caused by the changes from commit 
fa9a502a387a26ba116840d35ae4a30f672e78ad
at test.support.script_helper
The function in test was altered to support a different behaviour when run from 
CI. The related tests were not changed.

As I am relativly new to python-dev: Does the bot/ user machines differ in the 
existence of PYTHONHOME? (Then the passing of the bot runs are plausible)

The tests are modified/ one added. PR attached.

--
nosy: +LorenzMende

___
Python tracker 

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



[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-06-30 Thread Lorenz Mende


Change by Lorenz Mende :


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

___
Python tracker 

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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The change is also in 3.6.6, released the same day as 3.7.0.  It was done 
intentionally, without, as far as I know, consulting Python doc users.  Users 
were previously free to select the max line width they wanted.

On https://github.com/python/python-docs-theme/issues/4, on April 26, Julien 
Palard noted that the change was made in sphinx-doc and was automatically 
incorporated into python-docs when the sphinx-doc version was updated.  So a 
new python-docs-theme issue would have to be opened to avoid or modify the 
change.  Issue 4 ended there, though I have added a note.

I see about what roelschroeven does, 80 char lines, but the 50 char line are 
pretty bad.

Anyway, this tracker is for patching the cpython repository.  This should only 
be left open if there is a possibility of patching the code that generates the 
chm file to, for instance, remove max-lines.

Side-notes: 'Python x.y Manuals' open full-screen.  I think part-screen would 
be better.  'Python 3.7 Module Docs' is duplicated under Python 3.7.

I believe a chm replacement could be written with HTMLParser and tkinter.  IDLE 
parses a subset of the html used in our docs to display a local (html-encoded) 
copy of https://docs.python.org/3/library/idle.html in a tk Text (without the 
sidebar).  The result is nearly identical to what I see in Firefox.  (At 
present, astral chars would have to be replaces by their escapes.)

--
nosy: +terry.reedy
versions: +Python 3.6, Python 3.8

___
Python tracker 

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



[issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional

2018-06-30 Thread paul j3


paul j3  added the comment:

`parse_intermixed_args` was added in v 3.7.

https://docs.python.org/3/library/argparse.html#intermixed-parsing

https://stackoverflow.com/questions/50916124/allow-positional-command-line-arguments-with-nargs-to-be-seperated-by-a-flag

--

___
Python tracker 

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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread Steve Dower


Steve Dower  added the comment:

> I want to deprecate chm because it uses legacy HTML ...

Agreed, but not without a replacement.

--

___
Python tracker 

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



[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2018-06-30 Thread Eryk Sun


Eryk Sun  added the comment:

Sebastian, the problem in this case is that 
startupinfo.lpAttributeList['handle_list'] contains the duplicated 
standard-handle values from the previous call, which were closed and are no 
longer valid. subprocess.Popen has always modified STARTUPINFO in place, 
including dwFlags, hStdInput, hStdOutput, hStdError, and wShowWindow. This 
update follows suit to also modify lpAttributeList in place. 

This issue is closed. Please create a new issue if you think Popen should use a 
deep copy of startupinfo instead, to allow callers to reuse a single 
STARTUPINFO instance. Or the new issue could propose only to document the 
existing behavior.

--

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Change by Tal Einat :


--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Change by Tal Einat :


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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Change by Tal Einat :


--
pull_requests:  -7636

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Change by Tal Einat :


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

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Change by Tal Einat :


--
pull_requests:  -7637

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Change by Tal Einat :


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

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Tal Einat  added the comment:


New changeset 6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee by Tal Einat in branch 
'master':
bpo-31938: Convert selectmodule.c to Argument Clinic (GH-4265)
https://github.com/python/cpython/commit/6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee


--

___
Python tracker 

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



[issue27477] IDLE: Switch search dialogs to ttk widgets, and other refinement

2018-06-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

By adding 'and other refinements' to the title and discussing them here, I made 
this an index issue, with dependencies, for search.  I am leaving this open as 
that.

#33987 is about adding a ttk frame inside the top window.  This is point 2 
above.  #33987 has a Mac screen capture in which I can see the faint difference 
there.

I am retracting 4.2 above, agreeing to move action buttons across the bottom on 
some systems.  Given that there are people who use IDLE on multiple systems, 
either sequentially or more or less simultaneously, and there are, there is 
good reason for cross-platform consistency.  This is the general IDLE policy, 
with limited exceptions.  In any case, such a change would need to be discussed 
on a separate issue with more people involved.

Besides this, horizontal arrangement does not work for more than about 4 action 
options, and I want to add more.

--
dependencies: +IDLE: add ttk.Frame inside searchbaseToplevel

___
Python tracker 

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



[issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR

2018-06-30 Thread miss-islington


miss-islington  added the comment:


New changeset e5153d0d404d58e83d802199bea1a8dd0ea5178e by Miss Islington (bot) 
in branch '3.6':
bpo-25862: Fix several bugs in the _io module. (GH-8026)
https://github.com/python/cpython/commit/e5153d0d404d58e83d802199bea1a8dd0ea5178e


--

___
Python tracker 

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



[issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR

2018-06-30 Thread miss-islington


miss-islington  added the comment:


New changeset dedb28efd84314d899f795e821a3fc27d2f928e7 by Miss Islington (bot) 
in branch '3.7':
bpo-25862: Fix several bugs in the _io module. (GH-8026)
https://github.com/python/cpython/commit/dedb28efd84314d899f795e821a3fc27d2f928e7


--

___
Python tracker 

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



[issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR

2018-06-30 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7642

___
Python tracker 

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



[issue30660] Lossless Optimization of PNG files

2018-06-30 Thread INADA Naoki


Change by INADA Naoki :


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

___
Python tracker 

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



[issue30660] Lossless Optimization of PNG files

2018-06-30 Thread INADA Naoki


INADA Naoki  added the comment:

03:19 $ find . -name '*.png' | xargs optipng -o7
03:20 $ ll **/*.png
-rw-r--r--  1 inada-n  staff   2888  7  1 03:20 faq/python-video-icon.png
-rw-r--r--  1 inada-n  staff  22058  7  1 03:20 howto/logging_flow.png
-rw-r--r--  1 inada-n  staff  11146  7  1 03:20 library/hashlib-blake2-tree.png
-rw-r--r--  1 inada-n  staff   6456  7  1 03:20 library/pathlib-inheritance.png
-rw-r--r--  1 inada-n  staff  36812  7  1 03:20 library/tulip_coro.png
-rw-r--r--  1 inada-n  staff  33808  7  1 03:20 library/turtle-star.png
-rw-r--r--  1 inada-n  staff  42117  7  1 03:20 using/win_installer.png

While this output is bigger than PR-2141, I think it's good enough.

--

___
Python tracker 

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



[issue33987] IDLE: add ttk.Frame inside searchbaseToplevel

2018-06-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The image could have been attached to #27477, but a new issue for a new PR is 
needed anyway.  I will make this a dependency of that issue.

I did not at first see the difference in the screen-capture images on my 
monitor in Firefox with the room lighting and my eye condition as it was then, 
but today I do.  On Mac, the defaulf ttk background is slightly darker than the 
default tk background.  (No so on Windows.)  It looks subtlely tacky.  I 
imagine this effect might be more obvious and annoying on the live screen.

As I mentioned elsewhere, this is a second reason to insert a frame inside 
Toplevel, but it is a reason to do this *now*.  Please submit a PR for this 
addition to searchbase: a new ttk Frame, with a bit of space added.  Please 
call it self.frame as in query or perhaps self.searchframe, analogous to 
viewframe in textview.

When SearchDialogBase is renamed SearchFrameBase(Frame) and the toplevel stuff 
moved to another class, self.???frame in the Frame subclass will become self, 
so the name will only appear in the toplevel class.

In test_searchbase.SearchDialogBaseTest.test_open_and_close, adding
self.assertEqual(self.dialog.frame.state(), 'normal')
will test the change, failing now, passing with it.  I don't know of any other 
changes needed in files other than searchbase.

configdialog needs a similar PR.  config_key needs a complete ttk conversion.

--
stage:  -> test needed
title: need ttk.Frame inside Toplevel(s) -> IDLE: add ttk.Frame inside 
searchbaseToplevel

___
Python tracker 

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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread INADA Naoki


INADA Naoki  added the comment:

Hmm, I want to deprecate chm because it uses legacy HTML (doesn't support 
UTF-8!), hard to build, hard to confirm issues

--

___
Python tracker 

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



[issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR

2018-06-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7640

___
Python tracker 

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



[issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR

2018-06-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7639

___
Python tracker 

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



[issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR

2018-06-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset fdb5a50ef34f7951c3b01eb77b1359725a9ad670 by Serhiy Storchaka in 
branch 'master':
bpo-25862: Fix several bugs in the _io module. (GH-8026)
https://github.com/python/cpython/commit/fdb5a50ef34f7951c3b01eb77b1359725a9ad670


--

___
Python tracker 

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



[issue34013] Inconsistent SyntaxError for print

2018-06-30 Thread Dong-hee Na


Change by Dong-hee Na :


--
components: +Interpreter Core
type:  -> enhancement

___
Python tracker 

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



[issue34013] Inconsistent SyntaxError for print

2018-06-30 Thread Dong-hee Na


New submission from Dong-hee Na :

Python 3.8.0a0 (heads/master-dirty:0cdf5f4289, Jul  1 2018, 02:30:31)
[Clang 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print "hi"
  File "", line 1
print "hi"
 ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("hi")?
>>> def add(a,b):
... return a + b
...
>>> print add(3,5)
  File "", line 1
print add(3,5)
^
SyntaxError: invalid syntax

IMHO, an error message should be 'SyntaxError: Missing parentheses in call to 
'print'. Did you mean print(add(3,5))?' but it is not.

--
messages: 320797
nosy: corona10
priority: normal
severity: normal
status: open
title: Inconsistent SyntaxError for print
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



[issue30660] Lossless Optimization of PNG files

2018-06-30 Thread INADA Naoki


INADA Naoki  added the comment:

It seems PR author removed his repository and the PR can't be merge via 
conflict.

In master branch:

02:18 $ ll **/*.png
-rw-r--r--  1 inada-n  staff   3732  7  1 02:13 faq/python-video-icon.png
-rwxr-xr-x  1 inada-n  staff  49648  7  1 02:09 howto/logging_flow.png*
-rw-r--r--  1 inada-n  staff  24719  7  1 02:09 library/depgraph-output.png
-rw-r--r--  1 inada-n  staff  11148  7  1 02:09 library/hashlib-blake2-tree.png
-rw-r--r--  1 inada-n  staff  11280  7  1 02:09 library/pathlib-inheritance.png
-rw-r--r--  1 inada-n  staff  45021  7  1 02:09 library/tulip_coro.png
-rw-r--r--  1 inada-n  staff  39585  7  1 02:09 library/turtle-star.png
-rw-r--r--  1 inada-n  staff  48994  7  1 02:13 using/win_installer.png

In lossless_png branch:

$ ll **/*.png
-rw-r--r--  1 inada-n  staff   2791  7  1 02:28 faq/python-video-icon.png
-rwxr-xr-x  1 inada-n  staff  19351  7  1 02:28 howto/logging_flow.png*
-rw-r--r--  1 inada-n  staff  11158  7  1 02:28 library/depgraph-output.png
-rw-r--r--  1 inada-n  staff  10590  7  1 02:28 library/hashlib-blake2-tree.png
-rw-r--r--  1 inada-n  staff   6168  7  1 02:28 library/pathlib-inheritance.png
-rw-r--r--  1 inada-n  staff  33565  7  1 02:28 library/tulip_coro.png
-rw-r--r--  1 inada-n  staff  29964  7  1 02:28 library/turtle-star.png
-rw-r--r--  1 inada-n  staff  37942  7  1 02:28 using/win_installer.png

--
nosy: +inada.naoki

___
Python tracker 

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



[issue17894] Edits to descriptor howto

2018-06-30 Thread Julian Berman


Julian Berman  added the comment:

This seems very very slightly overly conversational (specifically the "That's 
all there is to it" sentence), but overall like a pretty decent improvement 
here.

Personally I'd axe that sentence but then seems like this should be merged 
as-is and any further improvements could always pile on after given how long 
this has sat.

--
nosy: +Julian

___
Python tracker 

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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread gladman


gladman  added the comment:

You are exactly right Steve - that is very close to what I am seeing and it is 
often quite hard to read. For example, where function prototypes are displayed 
on two lines, it takes me a lot longer to parse and understand them when 
compared with a situation where they are displayed on a single line. 

Although I agree with those who claim that there is an ideal line length for 
readability, I really don't think this can be predicted in advance since it is 
inevitably varies widely from one user to another.  So I remain convinced that 
it is better to use a design that dynamically adjusts to the width available.

Brian

--

___
Python tracker 

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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread Steve Dower


Steve Dower  added the comment:

It's pretty annoying when HTML Help doesn't properly handle your screen scaling 
settings (guessing my new screenshot looks like gladman's).

I'd love to have a new HTML Help program for our docs that could handle this 
better, but there's nothing in the same class (in particular, where "startup 
time" is a feature - there are plenty of browsers that take many seconds and GB 
of RAM, but I don't want to go there).

Maybe we can add an override for the CHM somehow? I don't know Sphinx well 
enough to be able to do this.

--

___
Python tracker 

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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread Steve Dower


Steve Dower  added the comment:

Let's try adding that screenshot again...

--
Added file: https://bugs.python.org/file47662/NarrowCHM.png

___
Python tracker 

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



[issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr()

2018-06-30 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Błażej, why is there a need to attach a function to the cli instance rather 
than the MyCmd class (which would be the norm for Python)? 

from cmd import Cmd

class MyCmd(Cmd):
def do_documented_at_definition(self, arg):
""" This one is documented with docstring. """
print('dad', arg)

def do_documented_afterwards(self, arg):
print('documented afterwards', arg)

cli = MyCmd()

def do_new_command(self, arg):
print('new command', arg)

MyCmd.do_new_command = do_new_command

def help_documented_afterwards(*args):
print("I'm documenting", args)

MyCmd.help_documented_afterwards = help_documented_afterwards

cli.cmdloop()

Sample session:

(Cmd) help

Documented commands (type help ):

documented_afterwards  documented_at_definition  help

Undocumented commands:
==
new_command

(Cmd) help documented_at_definition
 This one is documented with docstring. 
(Cmd) help documented_afterwards
I'm documenting (<__main__.MyCmd object at 0x10eaf0c88>,)
(Cmd) documented_at_definition x
dad x
(Cmd) documented_afterwards y
documented afterwards y
(Cmd) new_command z
new command z
(Cmd) help new_command
*** No help on new_command

--

___
Python tracker 

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



[issue33991] lib2to3 should parse f-strings

2018-06-30 Thread skreft


skreft  added the comment:

Note also, that lib2to3 will parse invalid f-strings like f"hello {", whereas 
ast.parse will raise a SyntaxError exception.


See below for reproduction cases:
In [2]: lib2to3.tests.support.parse_string('f"hello {"')
Out[2]: Node(file_input, [Node(simple_stmt, [Leaf(3, 'f"hello {"'), Leaf(4, 
'\n')]), Leaf(0, '')])

In [4]: ast.parse('f"hello {"')
Traceback (most recent call last):

  File 
"/Users/skreft/.virtualenvs/pyfaster/lib/python3.6/site-packages/IPython/core/interactiveshell.py",
 line 2963, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

  File "", line 1, in 
ast.parse('f"hello {"')

  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ast.py", line 
35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)

  File "", line 1
SyntaxError: f-string: expecting '}'

--

___
Python tracker 

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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread INADA Naoki


INADA Naoki  added the comment:

I think this is not only chm, but same to all HTML based (online, zipped html, 
maybe ePub).

max-width was added for readability.
https://github.com/python/python-docs-theme/issues/4

There are no absolute right answer and there are many personal preferences.
But limiting line width is considered good idea for many web sites.

https://graphicdesign.stackexchange.com/questions/13724/recommended-column-width-for-text-reading-digital-vs-printed

https://pearsonified.com/2011/12/golden-ratio-typography.php

For example, MDN limits line length too.

--
nosy: +inada.naoki
Added file: https://bugs.python.org/file47661/mdn-screenshot.png

___
Python tracker 

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



[issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np

2018-06-30 Thread Dong-hee Na


Dong-hee Na  added the comment:

@ronaldoussoren

Hi, Ronald

Can I take a look this issue?

--
nosy: +corona10

___
Python tracker 

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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread Joseph L. Casale


Change by Joseph L. Casale :


--
nosy: +jcasale

___
Python tracker 

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



[issue34012] No option to include system headers in distutils.core.Extension

2018-06-30 Thread Dan Hemberger


Change by Dan Hemberger :


--
type:  -> enhancement

___
Python tracker 

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



[issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr()

2018-06-30 Thread Błażej Michalik

Błażej Michalik  added the comment:

Yes, the proposed patch fixes all the problems that I pointed out in the last 
comment.

--

___
Python tracker 

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



[issue34012] No option to include system headers in distutils.core.Extension

2018-06-30 Thread Dan Hemberger


New submission from Dan Hemberger :

The distutils.core.Extension class has a constructor argument `include_dirs`, 
which includes each directory with `-I`. However, it is sometimes desirable to 
include additional system headers using `-isystem`. Currently, this is only 
possible by manually constructing the compiler argument and passing it to the 
`extra_compile_args` argument of distutils.core.Extension.

Since `-isystem` is a commonly used compiler option, I think it would be useful 
to add a new argument and attribute to distutils.core.Extension called 
`system_include_dirs`, which would use `-isystem` instead of `-I` when building 
the compiler command.

--
components: Distutils
messages: 320788
nosy: danh, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: No option to include system headers in distutils.core.Extension
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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread gladman


gladman  added the comment:

Comparing the basic.css files for the 3.6.5 chm file and the 3.6.6 chm file 
shows that the latter has the following body style definition that the earlier 
versions don't have:

/* -- general body styles - */

div.body {
min-width: 450px;
max-width: 800px;
}

So it seems that the later versions set a maximum width that is not present in 
the earlier versions.

--

___
Python tracker 

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



[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2018-06-30 Thread Sebastian Bank


Sebastian Bank  added the comment:

AFAIU, this change broke the following usage of subprocess on Windows
(re-using a subprocess.STARTUPINFO instance to hide the command window):

import os, subprocess

STARTUPINFO = subprocess.STARTUPINFO()
STARTUPINFO.dwFlags |= subprocess.STARTF_USESHOWWINDOW
STARTUPINFO.wShowWindow = subprocess.SW_HIDE

# raises OSError: [WinError 87]
# in the second loop iteration starting with Python 3.7
for i in range(2):
print(i)
with open(os.devnull, 'w') as stderr:
subprocess.check_call(['attrib'], stderr=stderr,
  startupinfo=STARTUPINFO)

AFAICT, this works on Python 2.7, 3.4, 3.5, and 3.6

--
nosy: +xflr6

___
Python tracker 

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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread Steve Dower


Steve Dower  added the comment:

I agree.

I don't think we deliberately changed anything here. Possibly the sphinx theme 
has some CSS that doesn't work well in IE, so that should be the starting point 
for someone to look.

--

___
Python tracker 

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



[issue33997] multiprocessing Pool hangs in terminate()

2018-06-30 Thread Steve Dower


Change by Steve Dower :


--
nosy: +davin, pitrou

___
Python tracker 

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



[issue34006] Windows HTML Help (chm) has fixed line length

2018-06-30 Thread gladman


gladman  added the comment:

I too much prefer the old behaviour since the fixed width is too narrow on my 
high resolution display

--
nosy: +gladman

___
Python tracker 

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



[issue33468] Add try-finally contextlib.contextmanager example

2018-06-30 Thread Tal Einat


Tal Einat  added the comment:

Nick's abstract example LGTM as well.

--

___
Python tracker 

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



[issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR

2018-06-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The assertion failure can be also caused by setting self->snapshot to NULL when 
Py_BuildValue() fails due to lack of memory. It is very difficult to reproduce 
this. PR 8026 fixes this and other difficulty reproducible refcount bugs in the 
_io module.

--
assignee:  -> serhiy.storchaka
versions: +Python 2.7, Python 3.8

___
Python tracker 

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



[issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR

2018-06-30 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7638

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-30 Thread Tal Einat


Tal Einat  added the comment:


New changeset db7ac30ef52ce35a4ead1bc1b9f0dd5331ed9779 by Tal Einat in branch 
'3.6':
[3.6] bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8025)
https://github.com/python/cpython/commit/db7ac30ef52ce35a4ead1bc1b9f0dd5331ed9779


--

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Tal Einat  added the comment:


New changeset db7ac30ef52ce35a4ead1bc1b9f0dd5331ed9779 by Tal Einat in branch 
'3.6':
[3.6] bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8025)
https://github.com/python/cpython/commit/db7ac30ef52ce35a4ead1bc1b9f0dd5331ed9779


--

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-30 Thread Tal Einat


Change by Tal Einat :


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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-30 Thread Tal Einat


Tal Einat  added the comment:


New changeset fd1c092bb9fee46d8d543710973c69a0e93a697a by Tal Einat (Miss 
Islington (bot)) in branch '3.7':
bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8024)
https://github.com/python/cpython/commit/fd1c092bb9fee46d8d543710973c69a0e93a697a


--

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Tal Einat  added the comment:


New changeset fd1c092bb9fee46d8d543710973c69a0e93a697a by Tal Einat (Miss 
Islington (bot)) in branch '3.7':
bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8024)
https://github.com/python/cpython/commit/fd1c092bb9fee46d8d543710973c69a0e93a697a


--

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7637

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +7636

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-30 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +7635

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Change by Tal Einat :


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

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Change by Tal Einat :


--
pull_requests:  -7634

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Change by Tal Einat :


--
pull_requests:  -7450

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7633

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7634

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-30 Thread Tal Einat


Tal Einat  added the comment:


New changeset 0cdf5f42898350261c5ff65d96334e736130780f by Tal Einat in branch 
'master':
bpo-32568: make select.epoll() and its docs consistent (#7840)
https://github.com/python/cpython/commit/0cdf5f42898350261c5ff65d96334e736130780f


--

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-30 Thread Tal Einat


Tal Einat  added the comment:


New changeset 0cdf5f42898350261c5ff65d96334e736130780f by Tal Einat in branch 
'master':
bpo-32568: make select.epoll() and its docs consistent (#7840)
https://github.com/python/cpython/commit/0cdf5f42898350261c5ff65d96334e736130780f


--

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-06-30 Thread Nick Coghlan


Nick Coghlan  added the comment:

Removing 3.6 from the affected versions, since we re-arranged these docs a bit 
for 3.7 to make it clearer which functions could be called prior to 
initialization, as well as adding more tests for the actual pre-init 
functionality.

Since 3.6 isn't going to change, and we'll be aiming to get back to something a 
bit closer to the 3.6 behaviour for 3.7.1, it seems simpler to just focus on 
3.7 and 3.8.

--
versions:  -Python 3.6

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-06-30 Thread Nick Coghlan


Change by Nick Coghlan :


--
keywords: +patch
pull_requests: +7632
stage: test needed -> patch review

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-06-30 Thread Nick Coghlan


Nick Coghlan  added the comment:

At the very least, I think this calls for a documentation change, such that we 
make it clear that:

1. The expected calling pattern is to call Py_Main() *instead of* 
Py_Initialize(), since Py_Main() calls Py_Initialize().

2. If you do call Py_Initialize() first, then exactly which settings that 
Py_Main() will read from the environment and apply is version dependent.

So I'll put together a docs patch that's valid for 3.6+, and then we can decide 
where to take 3.7 and 3.8 from an implementation perspective after that.

Currently, I'm thinking that for 3.7, our goal should specifically be "fake the 
3.6 behaviour well enough to get fontforge working again" (so it will mostly be 
Fedora that drives what that 3.7.1 change looks like), while for 3.8 we should 
aim to deprecate that code path, and instead offer a better building block API 
for folks that want to implement their own Py_Main() variant.

--

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-06-30 Thread Nick Coghlan


Nick Coghlan  added the comment:

Yeah, I've asked Miro to try essentially that in 
https://bugzilla.redhat.com/show_bug.cgi?id=1595421#c12

My concern is that Py_Main used to keep a *lot* of state on the local C stack 
that we've now moved into the main interpreter config.

So my suspicion is that even that change I've asked Miro to try may not do the 
right thing, but it really depends on *why* fontforge is calling Py_Main, and 
what they're passing in argc and argv.

Given that the embedded Py_Initialize is a no-op, they may be better off just 
copying out the parts they actually need from the code execution aspects of it, 
and skipping the Py_Main call entirely.

--

___
Python tracker 

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



[issue33974] _stringify handles quoted strings incorrectly

2018-06-30 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues

2018-06-30 Thread Nick Coghlan

Nick Coghlan  added the comment:

Also adding Łukasz to the nosy list, since it was his comment from a few weeks 
ago on the Travis CI ticket that prompted my "dist: xenial" suggestion.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue33974] _stringify handles quoted strings incorrectly

2018-06-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 9b84cc8771f52e9340ea5b676da9a15359c723b6 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-33974: Fix passing special characters to ttk widgets. (GH-7986) 
(GH-8021)
https://github.com/python/cpython/commit/9b84cc8771f52e9340ea5b676da9a15359c723b6


--

___
Python tracker 

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



[issue33990] CPPFLAGS during ./configure are not passed-through in sysconfig.customize_compiler

2018-06-30 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy: +yan12125

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-06-30 Thread STINNER Victor


STINNER Victor  added the comment:

Even if it's ugly, calling Py_Main() after Py_Initialize() works in Python
3.6 by ignoring the new config of Py_Main(). I suggest to do nothing (just
return) when Py_Initialize() is called again by Py_Main() in Python 3.7. It
would fix the fontforge *regression*.

I suggest to only enhance the code (really apply the new Py_Main() config)
in the master branch. From what I saw, apply the new config is not trivial.
It will take time to decide what to do for *each* option.

--

___
Python tracker 

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



[issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues

2018-06-30 Thread Nick Coghlan


Nick Coghlan  added the comment:

OK, given the above feedback, the PR I've created isn't right yet, but it at 
least shows where any information that we can provide on this point will end up.

--
stage: patch review -> needs patch

___
Python tracker 

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



[issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues

2018-06-30 Thread Nick Coghlan


Change by Nick Coghlan :


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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-06-30 Thread STINNER Victor


STINNER Victor  added the comment:

In gdb source code, frame_unwind_pc(), I see:

else if (this_frame->prev_pc.status == CC_NOT_SAVED)
throw_error (OPTIMIZED_OUT_ERROR, _("PC not saved"));

--
nosy: +vstinner

___
Python tracker 

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



[issue34011] Default preference not given to venv DLL's

2018-06-30 Thread Jonathan


New submission from Jonathan :

I don't know if this is a bug or an odd design decision or just something that 
hasn't been considered or maybe I'm missing something.

On Windows and I create a venv with Python 3.6.3:

> python -m venv venv

This creates a subdirectory called /venv. Inside this, there's:
./venv/Scripts/sqlite3.dll

This is the sqlite library - except it's not, because Python isn't using this 
file. If I upgrade this library by replacing it with a newer sqlite3.dll 
version, Python keep using the original version of the library. Turns out, 
Python is by default reading the DLL in the root Python install:

c:\Python36\DLLs\sqlite3.dll

Now, I can change that file and sure enough my VENV (*all* VENVs) then get the 
newer version of SQLite, or I can delete that file and the VENV's will all use 
their local versions, or I can possibly play with some sys.path to try and get 
the VENV version loaded first.

But this raises a few questions:
1) This seems like a rather odd default - copying a file that is never used by 
default.
2) Surely either the correct option is to use the VENV version by default?
3) Otherwise, what's the point in copying across this DLL file into the VENV by 
default?

--
messages: 320765
nosy: jonathan-lp
priority: normal
severity: normal
status: open
title: Default preference not given to venv DLL's
versions: Python 3.6

___
Python tracker 

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



[issue33974] _stringify handles quoted strings incorrectly

2018-06-30 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7629

___
Python tracker 

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



[issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues

2018-06-30 Thread David MacIver


David MacIver  added the comment:

> According to 
> https://github.com/travis-ci/travis-ci/issues/9069#issuecomment-395471575, 
> setting "dist: xenial" instead (giving Ubuntu 16.04) provides a testing 
> environment with a new enough OpenSSL for 3.7 to work.

No, this doesn't work either. The xenial environment is an experimental feature 
and doesn't work at all reliably. At the time of this writing setting "dist: 
xenial" actually puts you into Trusty.

Currently the viable ways of making it work on Travis are to either run a 
custom docker image (which requires you to opt out of their containerized 
builds and thus makes everything slower), or to build OpenSSL yourself (and 
making the latter work correctly is a far from straightforward process).

--
nosy: +David MacIver

___
Python tracker 

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



[issue34010] tarfile stream read performance

2018-06-30 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue34010] tarfile stream read performance

2018-06-30 Thread hajoscher


New submission from hajoscher :

Buffer read of large files in a compressed tarfile stream performs poorly.

The buffered read in tarfile _Stream is extending a bytes object. 
It is much more efficient to use a list followed by a join. 
Using a list can mean seconds instead of minutes. 

This performance regression was introduced in b506dc32c1a. 

How to test:
# create random tarfile 50Mb
dd if=/dev/urandom of=test.bin count=50 bs=1M
tar czvf test.tgz test.bin

# read with tarfile as stream (note pipe symbol in 'r|gz')
import tarfile
tfile = tarfile.open("test.tgz", 'r|gz')
for t in tfile:
file = tfile.extractfile(t)
if file:
print(len(file.read()))

--
components: Library (Lib)
messages: 320763
nosy: hajoscher
priority: normal
severity: normal
status: open
title: tarfile stream read performance
type: performance
versions: 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



[issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues

2018-06-30 Thread Nick Coghlan


New submission from Nick Coghlan :

As noted in https://github.com/travis-ci/travis-ci/issues/9069, Travis CI's 
Ubuntu 14.04 environment includes an OpenSSL that's too old to meet Python 
3.7's security requirements.

According to 
https://github.com/travis-ci/travis-ci/issues/9069#issuecomment-395471575, 
setting "dist: xenial" instead (giving Ubuntu 16.04) provides a testing 
environment with a new enough OpenSSL for 3.7 to work.

I'm thinking it would make the most sense as a subsection under 
https://docs.python.org/dev/whatsnew/3.7.html#platform-support-removals

(https://docs.python.org/dev/whatsnew/3.7.html#ssl does mention this 
information in a note, but that uses the OpenSSL version numbers directly, 
which folks aren't necessarily going to know to go to distrowatch to check 
which Travis environment they need to select: 
https://distrowatch.com/table.php?distribution=Ubuntu )

--
messages: 320762
nosy: christian.heimes, ncoghlan, ned.deily
priority: normal
severity: normal
stage: needs patch
status: open
title: Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues
type: enhancement
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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-30 Thread Nick Coghlan


Nick Coghlan  added the comment:

Answering Eric's question about the flag variables though:

* pymain_get_global_config copies the global variable flags to their respective 
struct entries
* pymain_set_global_config copies the various struct entries to their 
respective global variable flags

One of the first things that Py_Main() does in 3.7 is to:

- read the global variable flags into the relevant structs
- update the structs based on the CLI options
- write the struct values back to the global flags

This mostly fakes the 3.6-and-earlier behaviour of using the global variables 
directly.

For anything listed in 
https://docs.python.org/3/c-api/init.html#global-configuration-variables, we 
also mostly left any code reading the global variable directly alone, since 
they're considered a public API for embedding applications to dynamically 
adjust behaviour and we don't have a good way of deprecating using them for 
that purpose :(

--

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-06-30 Thread Nick Coghlan


Change by Nick Coghlan :


--
nosy: +emilyemorehouse

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-06-30 Thread Miro Hrončok

Miro Hrončok  added the comment:

This hits fontforge. See https://bugzilla.redhat.com/show_bug.cgi?id=1595421

An example of how it should be handled there if 3) is selected would be greatly 
appreciated.  Thanks

--
nosy: +hroncok

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-30 Thread Nick Coghlan


Nick Coghlan  added the comment:

I filed https://bugs.python.org/issue34008 to cover the fact that 
"Py_Initialize(); Py_Main();" doesn't work in 3.7.0 whereas it used to sort of 
work (by only partially applying the settings read from the CLI and environment 
by the Py_Main() call).

Since "Py_Initialize(); Py_Initialize();" *does* work in 3.7.0, closing this 
one again.

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