[issue35208] IDLE: Squeezed lines count ignores window width

2018-12-13 Thread Tal Einat


Tal Einat  added the comment:

My mistake on the reproduction; try: print('a'*1+'\n').  It does not 
trigger auto-squeezing, though this is an obvious case where it should be 
triggered.  (Manual squeezing also results in showing just 1 as the line count.)

--

___
Python tracker 

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



[issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6

2018-12-13 Thread Tal Einat


Tal Einat  added the comment:

We already have a warning about Tk versions on macOS, see 
macosx.tkVersionWarning().  It is currently printed in new shell windows.It 
would be straightforward to add warnings when using anything other than 8.5.18 
or 8.6.8+.  I suggest this approach.

As for the docs, IMO we should update the "GUI Programming on the Mac" section 
of https://docs.python.org/3/using/mac.html; I'll prepare a PR.


I also suggest updating https://www.python.org/download/mac/tcltk/. The 
following two current paragraphs should be improved:

"If you are using Python (prior to 3.7) from a python.org 64-bit/32-bit Python 
installer for macOS 10.6 and later, you should only use IDLE or tkinter with an 
updated third-party Tcl/Tk 8.5 (not 8.6), like ActiveTcl 8.5 installed."

"If you are using macOS 10.7 or later, the Apple-supplied Tcl/Tk 8.5 still has 
serious bugs that can cause application crashes. If you wish to use IDLE or 
Tkinter, install and use a newer version of Python and of Tcl/Tk."

I'm happy to suggest clearer wording; I'm not sure where to post a patch/PR, 
though.

--

___
Python tracker 

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



[issue35488] pathlib Path.match does not behave as described

2018-12-13 Thread anthony shaw


New submission from anthony shaw :

The documentation for pathlib PurePath.match(needle) says it accepts 
"glob-style pattern.".

For an absolute path with a recursive pattern (**) it doesn't match correct for 
more than 1 directory level.

All of the assertions in the attached file should pass.

The issue I've seen is on the attached file. I'm using Python 3.7.1 and have 
also tested this against Python 3.6.6 with the pathlib module on PyPi.

Absolute path glob'ing with a recursive pattern works as expected:

entries = pathlib.Path('/var').glob('/var/**/*.log')

Once this issue is confirmed, I would be happy to test & contribute a fix

--
components: Library (Lib)
files: test_pathlib.py
messages: 331782
nosy: anthony shaw
priority: normal
severity: normal
status: open
title: pathlib Path.match does not behave as described
versions: Python 3.7
Added file: https://bugs.python.org/file47996/test_pathlib.py

___
Python tracker 

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



[issue35487] setup()'s package_data not following directory symlink

2018-12-13 Thread F. Eugene Aumson


F. Eugene Aumson  added the comment:

The two environments in question (a 3.7.1 one, and a 3.7.0 one) differ in other 
ways.  I have done an apples-to-apples comparison of those two versions, in the 
same local environment, and this issue does not exist.  Sorry for the noise.

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



[issue35485] Mac: tkinter windows turn black while resized

2018-12-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I presume that tip has patches not in the distributed 8.6.9.  Ned, if my system 
is not unique and this is fixed by an identifiable patch, please consider 
including it.

--
keywords: +3.7regression

___
Python tracker 

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



[issue35208] IDLE: Squeezed lines count ignores window width

2018-12-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

There are 2 questions.  1. Should we review squeezer, in light of further 
complemplation and experience, and possibly patch it in a couple of weeks or 
so?  Yes.

2. Is there such a severe bug that we should possibly rush a fix and ask Ned to 
cherry-pick something after the well announced deadline?  Since I see behavior 
different from your report, I don't currently see a reason to ask.

I have tested with Windows 3.7.1 64 bit installed, Windows 3.7.2c1+ 32 bit 
repository debug build from yesterday, Mac 3.7.2rc1 64 bit installed.

'a'*200 and 'a'*200 + '\n' both display over 3 lines and are *not* 
autosqueezed.  Both squeeze as 3 lines.  Unsqueeze, narrow window, and 
resqueeze, and the result is *4* lines, not 3.  Line single lines with 2 
and 20002 characters, a'*2 and 400 * (48*'a'+'\n),  are autosqueezed, as 
more than 250 lines, depending on the window width.  Note interactive echo uses 
repr(), so that the '\n' converted to 1 newline is converted back to '\n'.  
Lines here also depends on width.

print(200 * (70*'a'+'\n')) is squeezed as 200 lines regardless of wrapping or 
not.   So the effect of wrapping on line count depends on the number of lines.

print(40 * (100*'a'+'\n')) (4000 chars) is not squeezed, even though it would 
be by the 50 lines * 75 chars/line (3750 chars) rule I suggested.  

Further experiments shows that autosqueezing only applies to single writes to 
sys.stdout (and maybe to sys.stderr).  print(40 * (100*'a'+'\n'), 40 * 
(100*'a'+'\n')) prints 40 lines twice with separate write calls and is not 
autosqueezed.  Manual squeeze squeezes contiguous  stdout or stderr blocks even 
if the former is the result of more than one print arg or calls.  Stdout blocks 
separated by an input() response are autosqueezed separately.  This all seems 
fine.  The doc could use a few more words.

--

___
Python tracker 

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



[issue35487] setup()'s package_data not following directory symlink

2018-12-13 Thread F. Eugene Aumson


New submission from F. Eugene Aumson :

I have a package using setup.py.  I want the package to include some data 
files, which are located in my source directory.  Building my package in my 
3.7.0 environment includes the data files as expected.  Building the same exact 
package in my 3.7.1 environment does NOT include the data files.

Attached are two logs demonstrating the `pip install` output.  Both were 
produced with this command: `pip uninstall 0x-json-schemas --yes >pip.log && 
pip install .[dev] --verbose --verbose --verbose >> pip.log`

Also attached is my setup.py script.

Also worth noting is that the directory that contains my data files 
(src/zero_ex/json_schemas/schemas) is a symlink, which I've verified is 
resolving properly in both environments.  And, when I replace the symlink with 
a real folder, containing the same files, then everything works as expected.  
So I surmise that the following of symlinks is what's broken here.

--
components: Distutils
files: package_data_symlink_bug.zip
messages: 331778
nosy: F. Eugene Aumson, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: setup()'s package_data not following directory symlink
versions: Python 3.7
Added file: https://bugs.python.org/file47995/package_data_symlink_bug.zip

___
Python tracker 

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



[issue35485] Mac: tkinter windows turn black while resized

2018-12-13 Thread Kevin Walzer


Kevin Walzer  added the comment:

Cannot reproduce this with the tip of Tk core-8-6-branch on Mojave and IDLE 
3.7.1. Window appears normal and no flickering when resizing.

--

___
Python tracker 

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



[issue35486] subprocess module breaks backwards compatibility with import hooks

2018-12-13 Thread David Wilson


David Wilson  added the comment:

Having considered this for a few hours, it seems the following is clear:

- 3.6 introduces ModuleImportError
- 3.7 begins using it within importlib
- 3.8 first instance of stdlib code catching it

- PEP-302 and PEP-451 are the definitive specifications for how sys.meta_path 
is supposed to work, and neither makes mention of ModuleNotFoundError. It seems 
at least this should have been flagged during review of the original change, 
but apparently the name of the exception was more important.

- The recent work done to move most of the import machinery on to sys.meta_path 
has exposed a set of import hooks that don't quite comply to the documented 
import hook interface

- The newly advertised ModuleNotFoundError appearing in stack traces for 
everyone means that more people will continue to write new cases of "except 
ModuleNotFoundError:", which while following best practice (catch most specific 
relevant exception), at present it amounts to relying on an implementation 
detail of the default importer. GitHub search reveals this to be an accurate 
reading: https://github.com/search?q=%22except+ModuleNotFoundError%22=Code

Therefore we are in a position where:

- Natural developer habit will cause much more protocol-violating code to exist 
over time, there is no option to stop this process
- New import hooks written against the existing documentation will break in the 
face of developer habit
- Existing import hooks were broken in Python 3.6 and this is not documented 
anywhere
- Python's own import machinery contravenes its specification

Options:

- Updating PEP-302 to mention introduction of the new exception type
- Updating ModuleNotFoundError/ImportError documentation to somehow capture the 
compatibility issue

--

___
Python tracker 

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



[issue35486] subprocess module breaks backwards compatibility with import hooks

2018-12-13 Thread David Wilson


Change by David Wilson :


--
title: subprocess module breaks backwards compatibility with older import hooks 
-> subprocess module breaks backwards compatibility with import hooks

___
Python tracker 

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



[issue35486] subprocess module breaks backwards compatibility with older import hooks

2018-12-13 Thread David Wilson


David Wilson  added the comment:

Corrected GitHub link for the commit: 
https://github.com/python/cpython/commit/880d42a3b24

--

___
Python tracker 

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



[issue35486] subprocess module breaks backwards compatibility with older import hooks

2018-12-13 Thread David Wilson


New submission from David Wilson :

The subprocess package since 880d42a3b24 / September 2018 has begun using this 
idiom:

try:
import _foo
except ModuleNotFoundError:
bar

However, ModuleNotFoundError may not be thrown by older import hook 
implementations, since that subclass was only introduced in Python 3.6 -- and 
so the test above will fail. PEP-302 continues to document ImportError as the 
appropriate exception that should be raised.

https://mitogen.readthedocs.io/en/stable/ is one such import hook that lazily 
loads packages over the network when they aren't available locally. Current 
Python subprocess master breaks with Mitogen because when it discovers the 
master cannot satisfy the import, it throws ImportError.

The new exception subtype was introduced in https://bugs.python.org/issue15767 
, however very little in the way of rationale was included, and so it's unclear 
to me what need the new subtype is addressing, whether this is a problem with 
the subprocess module or the subtype as a whole, or indeed whether any of this 
should be considered a bug.

It seems clear that some kind of regression is in the process of occurring 
during a minor release, and it also seems clear the new subtype will 
potentially spawn a whole variety of similar new regressions.

I will be updating Mitogen to throw the new subtype if it is available, but I 
felt it was important to report the regression to see what others think.

--
components: Library (Lib)
messages: 331774
nosy: dw
priority: normal
severity: normal
status: open
title: subprocess module breaks backwards compatibility with older import hooks
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



[issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1

2018-12-13 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +10377

___
Python tracker 

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



[issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6

2018-12-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I get it now.  [:8] meant .0 to .7 inclusive, like range(8).

I understand that until last spring, the tcl/tk/tkinter situation on Mac was a 
bit like the old American wild west.  But then Ned more or less tamed it for 
3.7 and now 3.6. We no longer install Python to work with system tcl and, I 
believe, releases compiled against 8.6 would not work with them.

Can you suggest a doc change?

tkinter has a hard-coded requirement for at least 8.4, IDLE for 8.5 (so ttk 
works).  For future IDLE, that should be at least 8.5.18 or maybe later.  I 
have thought about adding a startup warning if something older that the 
expected (tested-against) version is used, but that should be once only, 
requiring a 'hidden' configuration value.  So maybe not worth the effort.

--

___
Python tracker 

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



[issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6

2018-12-13 Thread Tal Einat


Tal Einat  added the comment:

> Vlad says in msg323040 "on 8.6.8 I didn't see issues" and in msg326778 "The 
> issues appear with ... Tk 8.6.[:8]".  Different 'issues'?

Nope, same issues: Vlad was saying that 8.6.x versions of Tcl/Tk *before* 8.6.8 
displayed these issues, but 8.6.8 is fine.

To state this point as directly as possible: Tcl/Tk 8.5.18 and 8.6.8 are fine 
in this regard, and apparently so is 8.6.9.  The issues discussed here occur 
with Tcl/Tk versions 8.6.x before 8.6.8, as well as 8.5.x other than 8.5.18.

macOS users do occasionally install another version of Tcl/Tk, and IDLE will 
automatically use the system installed Tcl/Tk in many cases.

ISTM we should update the docs to recommend the working versions of Tcl/Tk, and 
warn about versions known to be problematic.

--

___
Python tracker 

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



[issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1

2018-12-13 Thread Steve Dower


Steve Dower  added the comment:

Setting DefaultWindowsSdkVersion to 10.0.15063.0 seems to work for the Python 
3.7 and 3.8 builds.

Unless there's a security reason (which I don't believe there is), there's no 
need to worry about 3.6.

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



[issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6

2018-12-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I installed 64-bit 3.7.2rc1 on my Macbook, with 8.6.9, and so far IDLE itself 
runs fine.  (Other than new blackout issue reported in #34313.)  I will let 
someone else test 32/64 bit release, which Ned says also uses 8.6.9.

Vlad says in msg323040 "on 8.6.8 I didn't see issues" and in msg326778 "The 
issues appear with ... Tk 8.6.[:8]".  Different 'issues'?

In any case, tcl/tk on the every changing macOS graphics seems 'tempermental'.

Let me revise, extend, and reword what I said earlier about 'recent releases'. 
I think the goal of the python x.y.z Mac equivalent of PCbuild should be to 
make it just as easy to build python with the current 'official' x.y.z version 
of tcl/tk as PCbuild does.  Does the ActiveState licensing allow this?  Then we 
could consider saying that we only support tkinter x.y.z with that tcl/tk, and 
IDLE patches could be tested against the expected tcl/tk they will be installed 
with.  (This is routine on Windows.  If someone breaks IDLE on Windows by 
replacing the installed tcl/tk, it is basically their problem.)

To put it another way, I want tcl/tk to shield me from differences between OS 
versions.  To do that on Mac, we have to use a fairly up-to-date version of the 
efforts of Kevin and company.

--

___
Python tracker 

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



[issue35485] Mac: tkinter windows turn black while resized

2018-12-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35485] Mac: tkinter windows turn black while resized

2018-12-13 Thread Terry J. Reedy


New submission from Terry J. Reedy :

I updated to Mohave and did *not* switch to new dark theme.]
I installed 64 bit 3.7.2rc1.  Start IDLE.

import tkinter
root = tkinter.Tk()

Black on white Tk window appears.  Move mouse until resize arrow appears. Left 
click.  Move mouse.  Window turns uniformly black.  Ugh.  Cannot see contents 
that am trying to resize to.  Release button.  Background returns to white.  
Same thing happens with Text added, and hence with IDLE windows and such 
dialogs as can be resized.

--
components: Tkinter, macOS
messages: 331769
nosy: ned.deily, ronaldoussoren, terry.reedy, wordtech
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Mac: tkinter windows turn black while resized
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain

2018-12-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

3.5 is and 3.6 will soon be on security fix only status.  Robert, please verify 
that this is still an issue with 3.7 and the current build files.

--
nosy: +terry.reedy
versions: +Python 3.7 -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



[issue35465] [asyncio] Document loop.add_signal_handler

2018-12-13 Thread Hrvoje Nikšić

Hrvoje Nikšić  added the comment:

Done, https://github.com/python/cpython/pull/11145

--

___
Python tracker 

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



[issue35465] [asyncio] Document loop.add_signal_handler

2018-12-13 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue35450] venv module doesn't create a copy of python binary by default

2018-12-13 Thread Marcin


Marcin  added the comment:

I'm very honoured with your request. Doing this for the first time with Python, 
hope you can accept it despite warnings.

https://github.com/python/cpython/pull/11144

--

___
Python tracker 

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



[issue35450] venv module doesn't create a copy of python binary by default

2018-12-13 Thread Roundup Robot


Change by Roundup Robot :


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



[issue34766] BaseProxy cache should be cleaned when Manager client is reconnected

2018-12-13 Thread Yongnan Wu


Yongnan Wu  added the comment:

pong

--

___
Python tracker 

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



[issue35484] Segmentation fault due to faulthandler on Solaris

2018-12-13 Thread Jakub Kulik


Jakub Kulik  added the comment:

The exact failing test is test_register_chain().

Output of this failed test (as expected for segmentation fault):

==
FAIL: test_register_chain (test.test_faulthandler.FaultHandlerTests)
--
Traceback (most recent call last):
  File "xxx/Python-3.7.1/Lib/test/test_faulthandler.py", line 708, in 
test_register_chain
self.check_register(chain=True)
  File "xxx/Python-3.7.1/Lib/test/test_faulthandler.py", line 686, in 
check_register
self.assertEqual(exitcode, 0)
AssertionError: -11 != 0

--

___
Python tracker 

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



[issue35484] Segmentation fault due to faulthandler on Solaris

2018-12-13 Thread Jakub Kulik


Change by Jakub Kulik :


Added file: https://bugs.python.org/file47994/reproduce.py

___
Python tracker 

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



[issue35484] Segmentation fault due to faulthandler on Solaris

2018-12-13 Thread Jakub Kulik


New submission from Jakub Kulik :

When running tests on Solaris (amd64) I noticed that one test in 
test_faulthandler.py fails with the segmentation fault.

I have attached program reproducing this issue and its core stack trace. 
Program runs entirely with *Ending* printed as well and segfaults somewhere in 
the sys.exit() during deallocation. 

Problem doesn't appear when chain variable is set to False or if faulthandler 
is unregistered. Also, this bug appears only with --enable-optimizations on, 
but probably it just doesn't manifest itself in non optimized build (or on 
sparc).

I am not sure how to diagnose it more so I am at least reporting this issue.

--
components: Extension Modules, Interpreter Core
files: crash_stack.txt
messages: 331763
nosy: kulikjak
priority: normal
severity: normal
status: open
title: Segmentation fault due to faulthandler on Solaris
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file47993/crash_stack.txt

___
Python tracker 

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



[issue35483] tarfile.extractall on existing symlink in Ubuntu overwrites target file, not symlink, unlinke GNU tar

2018-12-13 Thread Michael Brandl


New submission from Michael Brandl :

In Ubuntu 16.04, with python 3.5, as well as custom built 3.6 and 3.7.1:

Given a file foo.txt (with content "foo") and a symlink myLink to it, packed in 
a tar,  and   a file bar.txt (with content "bar") with a symlink myLink to it, 
packed in another tar,
unpacking the two tars into the same folder (first foo.tar, then bar.tar) leads 
to the following behavior:

In GNU tar, the directory will contain:
foo.txt (content "foo")
bar.txt (content "bar")
myLink ->bar.txt.

Using python's tarfile however, the result of calling tarfile.extractall on the 
two tars will give:
foo.txt (content "bar")
bar.txt (content "bar")
myLink ->foo.txt.


Repro: 
1. Unpack the attached symLinkBugRepro.tar.gz into a new folder
2. run > bash repoSymlink.bash (does exactly what is described above)
3. if the last two lines of the output are "bar" and "bar" (instead of "foo" 
and "bar"), then the content of foo.txt has been overwritten.

Note that this is related to issues like
https://bugs.python.org/issue23228
https://bugs.python.org/issue1167128
https://bugs.python.org/issue19974
https://bugs.python.org/issue10761

None of these issues target the issue at hand, however.

The problem lies in line 2201 of 
https://github.com/python/cpython/blob/master/Lib/tarfile.py:
The assumption is that any exception only comes from the os not supporting 
symlinks. But here, the exception comes from the symlink already existing, 
which should be caught separately. The correct behavior is then NOT to extract 
the member, but rather to overwrite the symlink (as GNU tar does).

--
components: Library (Lib)
files: symLinkBugRepro.tar.gz
messages: 331762
nosy: michael.bra...@aid-driving.eu
priority: normal
severity: normal
status: open
title: tarfile.extractall on existing symlink in Ubuntu overwrites target file, 
not symlink, unlinke GNU tar
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7
Added file: https://bugs.python.org/file47992/symLinkBugRepro.tar.gz

___
Python tracker 

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



[issue35482] python372rc1.chm is ill

2018-12-13 Thread Ma Lin


Change by Ma Lin :


Added file: https://bugs.python.org/file47991/372rc1_compile_progress.png

___
Python tracker 

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



[issue35482] python372rc1.chm is ill

2018-12-13 Thread Ma Lin


Change by Ma Lin :


Added file: https://bugs.python.org/file47990/371_compile_progress.png

___
Python tracker 

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



[issue35482] python372rc1.chm is ill

2018-12-13 Thread Ma Lin


Change by Ma Lin :


Added file: https://bugs.python.org/file47989/372rc1_chm_files.png

___
Python tracker 

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



[issue35482] python372rc1.chm is ill

2018-12-13 Thread Ma Lin


New submission from Ma Lin :

python372rc1.chm can't be opened, it seems the compiling is not successful.

Compare to python371.chm, the file size reduced a lot:
python371.chm  8,534,435 bytes
python372rc1.chm   5,766,102 bytes

Some files in chm are missing, see attached pictures:
371_chm_files.png
372rc1_chm_files.png

After switch "Display compile progress" to Yes in .hhp file, the output is 
abnormal, see attached pictures:
371_compile_progress.png
372rc1_compile_progress.png

--
assignee: docs@python
components: Documentation
files: 371_chm_files.png
messages: 331761
nosy: Ma Lin, docs@python
priority: normal
severity: normal
status: open
title: python372rc1.chm is ill
versions: Python 3.7
Added file: https://bugs.python.org/file47988/371_chm_files.png

___
Python tracker 

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



[issue35267] reproducible deadlock with multiprocessing.Pool

2018-12-13 Thread Windson Yang


Change by Windson Yang :


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

___
Python tracker 

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



[issue35481] Run Tasks cannot Concurrent

2018-12-13 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

A task should have `await` inside to give to loop a chance to switch to another 
task (or get canceled).

It is not an asyncio bug but a part of specified behavior.

Your code could be modified as

async def readdev(dev):
while True:
buf=os.read(dev, 480)
print([struct.unpack('llHHi', buf[i*24:(i+1)*24]) for i in 
range(len(buf)//24)])
await asyncio.sleep(0)

to use tasks switching

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



[issue35208] IDLE: Squeezed lines count ignores window width

2018-12-13 Thread Tal Einat


Tal Einat  added the comment:

Note the lack of newline at the end; that triggers the problematic path in the 
current calculation.

--

___
Python tracker 

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



[issue35208] IDLE: Squeezed lines count ignores window width

2018-12-13 Thread Tal Einat


Tal Einat  added the comment:

As I mentioned when opening this issue: 'a'*200 (or 'a'*1).

--

___
Python tracker 

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



[issue35208] IDLE: Squeezed lines count ignores window width

2018-12-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

In the example I gave on the PR, 200 70 char lines, the squeezed box says 200 
lines with or without line wrapping (before the patch).

What is a simple case that you think is buggy?

--

___
Python tracker 

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



[issue35367] FileExistsError During os.symlink() Displays Arrow in the Wrong Direction

2018-12-13 Thread Windson Yang


Change by Windson Yang :


--
pull_requests: +10373

___
Python tracker 

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



[issue35208] IDLE: Squeezed lines count ignores window width

2018-12-13 Thread Tal Einat


Tal Einat  added the comment:

Squeezer currently does take wrapping into account, i.e. it does take IDLE's 
"soft" line wrapping into account when counting lines. Therefore the 
auto-squeeze criterion of "at least X lines" does lead to auto-squeezing for 
any mixture of very long lines and/or many short lines.

However, there is currently a bug in the line counting mechanism which is 
causing it to not count long, soft-wrapped lines properly in some cases. This 
issue is about that bug, and the PR fixes it. Merging this fix should result in 
the originally intended behavior, which is similar to what Terry described in 
his last comment here.

--

___
Python tracker 

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



[issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe

2018-12-13 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35472] python 3.7.2 rc1 bumped the build requirements for no reason

2018-12-13 Thread Matthias Klose


Matthias Klose  added the comment:

"if one uses the doc Makefile venv target". which is not possible for 
distributions which are not allowed to use anything but the distro to build the 
distro.

so why bumping the version requirement to 1.7 instead of 1.6.6? Afaicu this is 
the required version.

I don't argue against introducing new build requirements in major versions, but 
having them introduced on the branches.

--

___
Python tracker 

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



[issue31446] _winapi.CreateProcess (used by subprocess) is not thread-safe

2018-12-13 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference.

2018-12-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Information about borrowed references is taken from Doc/data/refcounts.dat.

--

___
Python tracker 

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



[issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference.

2018-12-13 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference.

2018-12-13 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee: docs@python -> serhiy.storchaka
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS

2018-12-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

>>My gut feeling is that this is some issue with your system or environment.

> I Doubt it, happens with another MacBook air which is literally out of the 
> box, no mods.

But on the other hand most other users (including myself and Ned) don't have 
this problem. 

> >- Does the result of socket.gethostname() look sane? In particular, does 
> >this include a domain name?
> it is given a name that includes the ip address and the name of the router. 

Does resolving that name work? If it doesn't that points to a problem with your 
environment. 

What's the result of resolving the IP address of your system? That name gets 
used by the system when available, and that could explain the issue your seeing.

--

___
Python tracker 

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



[issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference.

2018-12-13 Thread Aaqa Ishtyaq


Aaqa Ishtyaq  added the comment:

I was going through the source code to understand what is going on, but I can't 
find any function that returns a borrowed reference for 
'PyImport_AddModuleObject'.

Also, should I need to familiar with these macros and how they work?
https://docs.python.org/3/c-api/refcounting.html

--

___
Python tracker 

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



[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS

2018-12-13 Thread James Crowther


James Crowther  added the comment:

Hi Ronald, I've replied to your comments below



>My gut feeling is that this is some issue with your system or environment.

I Doubt it, happens with another MacBook air which is literally out of the box, 
no mods.

>Some more questions:

>- Is this is a consistent problem, or only on some networks? 
All networks
>- Do you have any custom settings in the Networking preference pane related to 
>name resolution (extra search domains, DNS servers, ...)? 
No
>- Do the domains returned by the DHCP server actually exist?
Not sure
>- Likewise for the DNS servers
likewise not sure
>- Does the result of socket.gethostname() look sane? In particular, does this 
>include a domain name?
it is given a name that includes the ip address and the name of the router. 
>- The original message mentions: "and that the DHCP servers provides one ore 
>more domains to be useles for resolution.". What is meant by that? AFAIK the 
>DHCP server can only return 1 domain name, not a full DNS search list (or at 
>least not one that is used by most major platforms).
Not sure what was meant by this comment.

--

___
Python tracker 

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



[issue35481] Run Tasks cannot Concurrent

2018-12-13 Thread youngchaos


youngchaos  added the comment:

#!/usr/bin/env python
# coding: utf-8

import struct, asyncio, os

async def readdev(dev):
while True:
buf=os.read(dev, 480)
print([struct.unpack('llHHi', buf[i*24:(i+1)*24]) for i in 
range(len(buf)//24)])

mouse=os.open('/dev/input/event2', os.O_RDONLY)
kbd=os.open('/dev/input/event5', os.O_RDONLY)

async def main(mouse,kbd):
await asyncio.gather(readdev(mouse),readdev(kbd))

asyncio.run(main(mouse,kbd))

python 3.7.1
Linux 4.19.6-1-MANJARO #1 SMP PREEMPT Sat Dec 1 12:21:26 UTC 2018 x86_64 
GNU/Linux

run code, output:
[(1544681359, 149693, 2, 0, -1), (1544681359, 149693, 2, 1, 1), (1544681359, 
149693, 0, 0, 0)]
sdffvsdgsdgsdgsdgsdgs

mouse move output line1 format, and keyboard press output line2 format

await asyncio.gather(readdev(kbd)) and key press can output lists
howto both output lists? It is a bug?

--

___
Python tracker 

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



[issue35481] Run Tasks cannot Concurrent

2018-12-13 Thread youngchaos


New submission from youngchaos :

import struct, asyncio, os

async def readdev(dev):
while True:
buf=os.read(dev, 480)
print([struct.unpack('llHHi', buf[i*24:(i+1)*24]) for i in 
range(len(buf)//24)])

mouse=os.open('/dev/input/event2', os.O_RDONLY)
kbd=os.open('/dev/input/event5', os.O_RDONLY)

async def main(mouse,kbd):
await asyncio.gather(readdev(mouse),readdev(kbd))

asyncio.run(main(mouse,kbd))

--

___
Python tracker 

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



[issue35481] Run Tasks cannot Concurrent

2018-12-13 Thread youngchaos


Change by youngchaos :


--
components: asyncio
nosy: asvetlov, youngchaos, yselivanov
priority: normal
severity: normal
status: open
title: Run Tasks cannot Concurrent
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



[issue35431] Add a function for computing binomial coefficients to the math module

2018-12-13 Thread Mark Dickinson


Mark Dickinson  added the comment:

[Tim]

> My two cents:
> 
> - Spell it comb(n, k).
> - TypeError if args aren't ints.
> - ValueError if not 0 <= k <= n.

+1 to all of this.

--

___
Python tracker 

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



[issue31823] Opaque default value for close_fds argument in Popen.__init__

2018-12-13 Thread Martin Panter

Martin Panter  added the comment:

The only problem with the 3.7+ documentation is the note about 3.2. Several 
paragraphs under 
,
 it still says

“Changed in version 3.2: The default for ‘close_fds’ was changed from False to 
what is described above.”

However the description it refers to was removed in 3.6. IMO it would make 
sense to add the description to the note:

“Changed in version 3.2: The default for ‘close_fds’ was changed from False to 
True on Unix. On Windows the default was changed from False to True when 
stdin/stdout/stderr are None.”

--

___
Python tracker 

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



[issue35475] Docs do not show PyImport_AddModuleObject() returns a borrowed reference.

2018-12-13 Thread Ammar Askar


Ammar Askar  added the comment:

A good place to start might be to search for a function that says it returns a 
borrowed reference in the source tree. For example, "PyImport_AddModule" says 
it returns a borrowed reference. 

In the search you'll find the relevant file here:

https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Doc/data/refcounts.dat#L569

--
nosy: +ammar2

___
Python tracker 

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