[issue33435] incorrect detection of information of some distributions

2018-05-07 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +6410
stage:  -> patch review

___
Python tracker 

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



[issue33435] incorrect detection of information of some distributions

2018-05-07 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +6411

___
Python tracker 

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



[issue32627] Header dependent _uuid build failure on Fedora 27

2018-05-07 Thread Adam

Adam  added the comment:

Some systems might have both uuid.h and uuid/uuid.h. For example, NetBSD 
provides /usr/include/uuid.h, and one might also install libuuid from a 
package, and the latter has uuid/uuid.h.

To fix this, do not include both files, when both have been detected.

Here is a patch:

--- Modules/_uuidmodule.c.orig
+++ Modules/_uuidmodule.c
@@ -3,8 +3,7 @@
 #include "Python.h"
 #ifdef HAVE_UUID_UUID_H
 #include 
-#endif
-#ifdef HAVE_UUID_H
+#elif defined(HAVE_UUID_H)
 #include 
 #endif

--
nosy: +a...@netbsd.org

___
Python tracker 

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



[issue33437] Defining __init__ in enums

2018-05-07 Thread Andres Ayala

New submission from Andres Ayala :

I have to read and write many files for an old fortran program where the 
elements are coded as integer (so 0 is the X, 1 is the Y...) and I have some 
tags associated to each one.

So I tried to create an Enum with some additional fields:
class Coord(Enum):
def __init__(self, value, label, unit):
super().__init__()
self._value_ = value
self.label = label
self.unit = unit

PX = (0, 'P.X', 'km')
PY = (1, 'P.Y', 'km')
VX = (2, 'V.X', 'km/s')
VY = (3, 'V.Y', 'km/s')

This almost work:
>>> for element in CoordOk:
...print("{0}: {0.label}[{0.unit}] = {0.value}".format(element))
CoordOk.PX: P.X[km] = 0
CoordOk.PY: P.Y[km] = 1
CoordOk.VX: V.X[km/s] = 2
CoordOk.VY: V.Y[km/s] = 3

But fails recovering the coordinate from the value:
>>> print(Coord(0))
Traceback (most recent call last):
  File "/home/killerrex/tmp/demo.py", line 33, in 
print(Coord(0))
  File "/usr/lib64/python3.6/enum.py", line 291, in __call__
return cls.__new__(cls, value)
  File "/usr/lib64/python3.6/enum.py", line 533, in __new__
return cls._missing_(value)
  File "/usr/lib64/python3.6/enum.py", line 546, in _missing_
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 0 is not a valid Coord

Because the internal value of the enum is (0, 'P.X', 'km') and not 0

I found that it is possible to do what I am trying to do with:
class CoordOk(Enum):
def __new__(cls, value, label, unit):
obj = object.__new__(cls)
obj._value_ = value
obj.label = label
obj.unit = unit
return obj

PX = (0, 'P.X', 'km')
PY = (1, 'P.Y', 'km')
VX = (2, 'V.X', 'km/s')
VY = (3, 'V.Y', 'km/s')

Following the latest doc from Enum. Although it is not so intuitive (defining 
__new__ is not as easy as __init__)

To make the first proposal work fine is enough with moving the line 221 of 
enum.py after the line 224 (see the patch)
I haven't found problems with the change but obviously my little reduced tests 
are not representative at all.
And even if it works there may be good reasons to not allow changing the 
_value_ in the init.

So mi enhancement proposal is either:
Add an example like the CoordOk to the documentation to help others to find how 
to change the _value_ (and an explanation on why is better not to do it in the 
__init__ would be perfect)

or

Change the line enum.py so it is possible to update the _value_ in the __init__ 
method and if you want use the Coord example in the docs.

Thanks!

--
components: Library (Lib)
files: enum_allow_change_value_in_init.patch
keywords: patch
messages: 316256
nosy: killerrex
priority: normal
severity: normal
status: open
title: Defining __init__ in enums
type: enhancement
versions: Python 3.6
Added file: 
https://bugs.python.org/file47575/enum_allow_change_value_in_init.patch

___
Python tracker 

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



[issue33436] Add an interactive shell for Sqlite3

2018-05-07 Thread R. David Murray

R. David Murray  added the comment:

It's not immediately obvious what benefits this provides over the existing 
sqlite-native repl and the python repl. Can you expand a bit on the use case?  
Also, I seem to remember that Catherine Devlin had at one point thought about 
expanding her sqlpython to be multi-db capable, and while it doesn't look like 
that has happened, maybe that would be an alternative worth investigating?  
(I've never used it or looked at its code, so it may not be.)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue33438] pkg-config file misses flags for static linking

2018-05-07 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Our pkg-config misses flags for static linking with libpythonXX.a, such as 
"-lpthread -lutil -lrt" on Windows.  For dynamic linking, this is not a problem 
since libpythonXX.so links explicitly against those system libraries.

--
components: Build
messages: 316258
nosy: barry, doko, pitrou
priority: normal
severity: normal
status: open
title: pkg-config file misses flags for static linking
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



[issue33438] pkg-config file misses flags for static linking

2018-05-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

$ PKG_CONFIG_PATH=`pwd`/Misc pkg-config --static python
$ PKG_CONFIG_PATH=`pwd`/Misc pkg-config --libs python
-L/home/antoine/cpython/37/usr/lib -lpython3.7m
$ PKG_CONFIG_PATH=`pwd`/Misc pkg-config --libs-only-l python
-lpython3.7m
$ PKG_CONFIG_PATH=`pwd`/Misc pkg-config --libs-only-other python
$

--

___
Python tracker 

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



[issue33438] pkg-config file misses flags for static linking

2018-05-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

(correction: in the first message, I meant "on Linux" not "on Windows". Of 
course :-))

--

___
Python tracker 

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



[issue33436] Add an interactive shell for Sqlite3

2018-05-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It could be added in Tools/scripts directory or as a part of the sqlite3 module.

> It's not immediately obvious what benefits this provides over the existing 
> sqlite-native repl and the python repl.

The existing sqlite-native repl is not always installed when Python is 
installed (especially on Windows). It is handy that Python provides CLI to some 
modules, including zipfile and tarfile.

I would prefer CLI, but maybe both interfaces can be combined.

It would be nice to provide also a graphical Sqlite3 browser, which can be ran 
as a separate application and be integrated with IDLE (as turtledemo).

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33257] Race conditions in Tkinter with non-threaded Tcl

2018-05-07 Thread Scott M

Change by Scott M :


--
nosy: +PythonInTheGrass

___
Python tracker 

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



[issue33422] Fix and update string/byte literals in help()

2018-05-07 Thread Andrés Delfino

Andrés Delfino  added the comment:

I was exploring pydoc, saw the literals as available help "terms" on the 
sysmbols section, and tried reading the help for one of them.

I learnt about IDLE debugging to trace this bug :)

--

___
Python tracker 

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



[issue33438] pkg-config file misses flags for static linking

2018-05-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Note that both implementations of python-config give the right information:

$ ./python python-config.py --libs
-lpython3.7m -lpthread -ldl -lutil -lm
$ sh python-config --libs
-lpython3.7m -lpthread -ldl  -lutil -lm

--

___
Python tracker 

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



[issue33439] python-config.py should be part of the stdlib

2018-05-07 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Rather than (or in addition to) being a standalone script, python-config should 
be invokable as a stdlib module, e.g. "python -m sysconfig.config".  This would 
prevent the risk of invoking the wrong script on PATH.

--
components: Build, Library (Lib)
messages: 316264
nosy: barry, doko, ncoghlan, pitrou
priority: normal
severity: normal
status: open
title: python-config.py should be part of the stdlib
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue33257] Race conditions in Tkinter with non-threaded Tcl

2018-05-07 Thread Scott M

Scott M  added the comment:

7 years and counting... 
My need for a fix is long gone, but I'd like to be able to tell the original 
group I worked with whether it's now safe to use tkinter from threads. It looks 
like my original guesses were validated and a fix has been made, but I can't 
tell if it's universally available. What version of Python would they need to 
be on, and are any platforms still misbehaved "out of the box"? They will not 
be willing to rebuild python itself. TIA.

--

___
Python tracker 

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



[issue33440] Possible lazy import opportunities in `pathlib`

2018-05-07 Thread Nick Coghlan

New submission from Nick Coghlan :

Due to a python-ideas discussion about reducing boilerplate for 
__file__-relative path calculations, I was running "./python -X importtime -S 
-c 'import pathlib'" and noticed three potential candidates where it may be 
worthwhile deferring the imports until the modules are actually needed:

- re (used in _WildcardSelector)
- fnmatch (used in PurePath.match and _WildcardSelector)
- urllib.parse (used in PurePath.as_uri, by way of self._flavour.make_uri)

Using an optimised Python 3.7 on an SSD with warm disk caches, commenting out 
those 3 imports reduced my typical import times for pathlib from 12-13 ms to 
7-8 ms)

--
components: Library (Lib)
messages: 316266
nosy: ncoghlan, njs, pitrou
priority: normal
severity: normal
status: open
title: Possible lazy import opportunities in `pathlib`
type: performance
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



[issue33315] Allow queue.Queue to be used in type annotations

2018-05-07 Thread Ivan Levkivskyi

Change by Ivan Levkivskyi :


--
assignee:  -> levkivskyi

___
Python tracker 

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



[issue33441] Expose the sigset_t converter via private API

2018-05-07 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

posix_spawn() (see issue20104) needs the converter to sigset_t defined in 
signalmodule.c. Since the code is not trivial, it is better to share it instead 
of duplicate. The proposed PR:

* Exposes the sigset_t converter via private API _Py_Sigset_Converter(). The 
implementation is moved to posixmodule.c.

* Uses Argument Clinic for parsing sigset_t in signalmodule.c. In particularly 
it causes that the first argument of signal.sigtimedwait() will be parsed 
before the second one.

* Make the converter always raising ValueError for signal numbers out of range 
1..NSIG. OverflowError was raised before for integers out of the platform 
depending C long range.

--
messages: 316267
nosy: pablogsal, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Expose the sigset_t converter via private API
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue33441] Expose the sigset_t converter via private API

2018-05-07 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-05-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I have doubts about combining setschedpolicy and setschedparam.

On one hand, they are set by independent functions in C and have separate 
flags. When pass arguments separately we don't need to invent a parameter name: 
just remove the common "posix_spawnattr_" prefix from corresponding C function 
names. Passing scheduler=(None, param) looks clumsy. And from implementation 
side, parsing separate arguments is easier that parsing a single argument as a 
2-tuple.

On other hand, these arguments are not completely independent: the 
setschedparam argument is required if setschedpolicy is specified.

Passing as separate arguments still looks more preferable to me.

--

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-05-07 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
dependencies: +Expose the sigset_t converter via private API

___
Python tracker 

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



[issue33442] Python 3 doc sidebar dosnt follow page scrolling like 2.7 doc sidebar.

2018-05-07 Thread Pete Moore

New submission from Pete Moore <1petemo...@gmail.com>:

the 3.x docs sidebar at location 
https://docs.python.org/3.6/library/logging.html does not follow the user's 
scrolling movements like the 2.7 docs sidebar at location 
https://docs.python.org/2.7/library/logging.html

--
assignee: docs@python
components: Documentation
messages: 316269
nosy: docs@python, pete312
priority: normal
severity: normal
status: open
title: Python 3 doc sidebar dosnt follow page scrolling like 2.7 doc sidebar.
type: behavior
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



[issue21592] Make statistics.median run in linear time

2018-05-07 Thread Dong-hee Na

Dong-hee Na  added the comment:

For CPython, I agree with the opinion that finding a median value with Tim 
sort(C version) is faster than quickselect algorithm with pure python.
Or we need to implement quickselect by C API.

The advantage of implementing this method by quickselect with pure python will 
be for pypy or any other python compatible compiler.

Considering the role that CPython provides for the standard library to other 
compatible compilers, it is worth considering from a performance point of view 
with a compatible compiler. However, for CPython, we have to take a performance 
hit.

Here is the benchmark result with pypy3 on MacOS

Nsort select7  select23 select47 select97 select   select2  PR6715
       ---  ---
50000.0000.0030.0000.0000.0000.0010.0010.001
   10.0000.0010.0010.0010.0010.0000.0000.001
   50.0020.0050.0040.0020.0020.0000.0000.000
  100.0050.0080.0040.0040.0050.0010.0010.001
  500.0270.0210.0160.0190.0210.0040.0030.003
 1000.0540.0350.0300.0370.0410.0060.0070.008
 2000.1040.0690.0630.0740.0840.0130.0130.015
 3000.1620.1050.0910.1090.1220.0170.0180.017
 4000.2190.1370.1220.1480.1670.0240.0160.024
 5000.2750.1700.1560.1820.2040.0300.0280.017
 6000.3360.2100.1810.2200.2470.0300.0390.040
 7000.4470.2830.2420.2920.3290.0560.0550.043
 8000.5030.3090.2480.3130.3380.0510.0490.052
 9000.5920.3590.3230.3530.4210.0650.0470.082
10000.6430.3980.3570.4120.4330.0610.0700.047
11000.7000.3870.3650.4540.4590.0870.0750.077

--
nosy: +corona10

___
Python tracker 

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



[issue33216] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW

2018-05-07 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
priority: normal -> release blocker

___
Python tracker 

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



[issue3692] improper scope in list comprehension, when used in class declaration

2018-05-07 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

> Bug or not this is not going to change without a PEP, so I'm not sure it's a 
> good idea to keep this issue open.

I agree this requires a PEP. I would like to keep this open as a place for 
pre-PEP discussions among those interested (and as a remainder to maybe write 
such PEP).

--

___
Python tracker 

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



[issue3692] improper scope in list comprehension, when used in class declaration

2018-05-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I don't think this will need drastic changes. Just setting some flags here or 
there for making comprehensions using LOAD_NAME instead of LOAD_GLOBAL. The fix 
should lie near the fix for issue33346.

--

___
Python tracker 

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



[issue33443] Typo in Python/import.c

2018-05-07 Thread Yuki Wakisaka

New submission from Yuki Wakisaka :

In the method, "_PyImportZip_Init(void)", of Python/import.c, the variable, 
"PyObject *path_hooks, *zimpimport;", seems to be typo, which can be 
"zipimport".

--
components: Interpreter Core
messages: 316273
nosy: ukwksk
priority: normal
severity: normal
status: open
title: Typo in Python/import.c
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



[issue33443] Typo in Python/import.c

2018-05-07 Thread Roundup Robot

Change by Roundup Robot :


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

___
Python tracker 

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



[issue3692] improper scope in list comprehension, when used in class declaration

2018-05-07 Thread Guido van Rossum

Guido van Rossum  added the comment:

> I don't think this will need drastic changes.

IIRC LOAD_NAME loads from the *local* scope, which will be the synthetic
function created for the comprehension (whose scope contains the loop
control variables). We may need a new opcode similar to LOAD_GLOBAL that
looks in two non-local directories rather than just one before falling back
to builtins; and the function object would need to have a link to both the
class dict and the global dict -- currently function objects gave a
__globals__ link but there's no chaining. Or perhaps __globals__ could be
set to a chainmap referencing the class dict and the globals?

--

___
Python tracker 

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



[issue33443] Typo in Python/import.c

2018-05-07 Thread Yuki Wakisaka

Change by Yuki Wakisaka :


--
pull_requests: +6414

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-07 Thread Brian Skinn

Brian Skinn  added the comment:

I second Wolfgang's recommendation to change the default back to `False`.

I started developing CLI apps &c. in Python ~4yrs ago; I dabbled briefly in 
2.7, then switched firmly to Python 3.  When I started, I was aimed at 
supporting 3.3 to 3.5; now I'm specifically supporting 3.4 to 3.6, but starting 
to test my code against the 3.7b versions.

Thus, all I've ever known is the default `required=False` behavior. On my one 
tool currently using subparsers (https://github.com/bskinn/sphobjinv), I made 
the subparser choice optional, to allow a `sphobjinv --version` invocation. So, 
when 3.7 failed that test 
(https://github.com/bskinn/sphobjinv/blob/6c1f22e40dc3d129485462aec05adbed2ff40ab8/sphobjinv/test/sphobjinv_cli.py#L419-L422),
 it seemed like a regression to me.

All that said, given that the `subparsers.required = False` fix is a clean, 
single line, I have no beef with a `True` default if that's preferred. However, 
please include this change in the 3.7 CHANGELOG, at least.

--
nosy: +bskinn

___
Python tracker 

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



[issue33440] Possible lazy import opportunities in `pathlib`

2018-05-07 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Also it's a smaller win, but it might be worth considering whether we can avoid 
the import of 'nt' on posix platforms and vice-versa.

--

___
Python tracker 

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



[issue33437] Defining __init__ in enums

2018-05-07 Thread Ethan Furman

Ethan Furman  added the comment:

Setting _value_ needs to happen in __new__ for those cases where another data 
type, such as str or int, is mixed in.

I'll look at adding an example to the docs.

Thanks for the report!

--
assignee:  -> ethan.furman
components: +Documentation
nosy: +barry, eli.bendersky, ethan.furman
type: enhancement -> behavior
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink)

2018-05-07 Thread Andrés Delfino

Change by Andrés Delfino :


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

___
Python tracker 

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



[issue33441] Expose the sigset_t converter via private API

2018-05-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset d54cfb160c626626394e2f171d3ccfe03309f34e by Serhiy Storchaka in 
branch 'master':
bpo-33441: Make the sigset_t converter available in other modules. (GH-6720)
https://github.com/python/cpython/commit/d54cfb160c626626394e2f171d3ccfe03309f34e


--

___
Python tracker 

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



[issue33096] ttk.Treeview.insert() does not allow to insert item with "False" iid

2018-05-07 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6417

___
Python tracker 

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



[issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink)

2018-05-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The code with using scandir() is more complex and is different enough from the 
code with using listdir() for having significant risk of introducing bugs. Also 
using scandir() introduces a risk of leaking file descriptors.

We don't rewrite the code without good reasons. If you propose performance 
enhancement, please provide benchmark results that expose the benefit of this 
change. If it is not large enough, it is not worth to do.

Actually your change looks making the code slower: it reads the directory twice.

--

___
Python tracker 

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