[issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty

2020-02-28 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +inada.naoki

___
Python tracker 

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



[issue39775] inspect.Signature.parameters should be an OrderedDict, not a plain dict

2020-02-28 Thread Antony Lee


Antony Lee  added the comment:

It looks good to me, thanks.

--

___
Python tracker 

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



[issue39779] [argparse] Add parameter to sort help output arguments

2020-02-28 Thread brian.gallagher


brian.gallagher  added the comment:

That makes sense. For what it's worth, the use-case that inspired this was for 
commands with a lot of optional arguments in a company where a large amount of 
contributors (who may not be aware of an effort to order the arguments in the 
source code) were able to make changes to the command.

I understand that isn't a particularly compelling reason though, as it can be 
addressed by other means -- increasing diligence at the code review stage, 
commit hooks, testing, etc.

Thanks for taking a look Raymond.

--

___
Python tracker 

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



[issue39712] Doc for `-X dev` option should mention PYTHONDEVMODE

2020-02-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


Added file: https://bugs.python.org/file48928/0001-3.7-bpo-39712.patch

___
Python tracker 

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



[issue39712] Doc for `-X dev` option should mention PYTHONDEVMODE

2020-02-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
keywords: +patch
Added file: https://bugs.python.org/file48926/0001-bpo-39712.patch

___
Python tracker 

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



[issue39712] Doc for `-X dev` option should mention PYTHONDEVMODE

2020-02-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


Added file: https://bugs.python.org/file48927/0001-3.8-bpo-39712.patch

___
Python tracker 

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



[issue39712] Doc for `-X dev` option should mention PYTHONDEVMODE

2020-02-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +erlendaasland
nosy_count: 9.0 -> 10.0
pull_requests: +18045
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/18685

___
Python tracker 

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



[issue39782] local varible referenced a Exception won't be collected in function

2020-02-28 Thread Wang Jie


New submission from Wang Jie :

I referenced an Exception object in a function and found memory usage will 
increase constantly in the accident. I think it may be a bug.

I wrote a minimal code to reproduce it.

```py
from threading import local, Thread
from time import sleep

l = {}

def t0():
  b = l.get('e') # memory usage won't increase if I remove this line
  try:
raise Exception('1')
  except Exception as e:
l['e'] = e

def target():
  while True:
sleep(0.0001)
t0()

target()

# t = Thread(target=target)
# t.daemon = True
# t.start()
```

I tried to execute it in IPython and got the following output:

```
In [1]: run py/ref_exception_causes_oom.py

In [2]: import objgraph

In [3]: objgraph.show_growth(limit=3)
frame78792+78792
Exception78779+78779
traceback78779+78779

In [4]: objgraph.show_growth(limit=3)
Exception   100862+22083
traceback   100862+22083
frame   100875+22083

In [5]: objgraph.show_growth(limit=3)
Exception   115963+15101
traceback   115963+15101
frame   115976+15101
```

And I tried to execute this code in python2.7 and pypy. Both of them won't 
occur this problem.

--
components: Interpreter Core
messages: 362873
nosy: wangjie
priority: normal
severity: normal
status: open
title: local varible referenced a Exception won't be collected in function
type: resource usage
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



[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-02-28 Thread Antony Lee


New submission from Antony Lee :

Many functions which take a path-like object typically also accept strings 
(sorry, no hard numbers here).  This means that if the function plans to call 
Path methods on the object, it needs to first call Path() on the arguments to 
convert them, well, to Paths.  This adds an unnecessary cost in the case where 
the argument is *already* a Path object (which should become more and more 
common as the use of pathlib spreads), as Path instantiation is not exactly 
cheap (it's on the order of microseconds).

Instead, given that Paths are immutable, `Path(path)` could just return the 
exact same path instance, completely bypassing instance creation (after 
checking that the argument's type exactly matches whatever we need and is not, 
say, PureWindowsPath when we want to instantiate a PosixPath, etc.).  Note that 
there is prior art for doing so in CPython: creating a frozenset from another 
frozenset just returns the same instance:
```
In [1]: s = frozenset({1}); id(s) == id(frozenset(s)) == id(s.copy())
Out[1]: True
```

--
components: Library (Lib)
messages: 362874
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Optimize construction of Path from other Paths by just returning the 
same object?
versions: Python 3.9

___
Python tracker 

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



[issue1207613] Idle Editor: Bottom Scroll Bar

2020-02-28 Thread Steven D'Aprano


Change by Steven D'Aprano :


--
nosy: +steven.daprano

___
Python tracker 

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



[issue39776] Crash in decimal module in heavy-multithreaded scenario

2020-02-28 Thread Stefan Krah


Stefan Krah  added the comment:

This is 3.6.7, compiled --with-pydebug:


$ ./main 
Aborted (core dumped)



(gdb) bt
#0  0x7f9974077428 in __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:54
#1  0x7f997407902a in __GI_abort () at abort.c:89
#2  0x0056e2d1 in Py_FatalError (msg=msg@entry=0x62ccf8 "Python memory 
allocator called without holding the GIL") at Python/pylifecycle.c:1462
#3  0x004c0cec in _PyMem_DebugCheckGIL () at Objects/obmalloc.c:1963
#4  0x004c0d27 in _PyMem_DebugMalloc (ctx=0x8f7220 <_PyMem_Debug+96>, 
nbytes=75) at Objects/obmalloc.c:1971
#5  0x004c204e in PyObject_Malloc (size=) at 
Objects/obmalloc.c:479
#6  0x004ec12f in PyUnicode_New (size=10, maxchar=) at 
Objects/unicodeobject.c:1281
#7  0x005162f4 in _PyUnicodeWriter_PrepareInternal 
(writer=writer@entry=0x7f9971ca4cf0, length=length@entry=10, maxchar=, maxchar@entry=127) at Objects/unicodeobject.c:13565
#8  0x0051af20 in PyUnicode_DecodeUTF8Stateful (s=0x61d15b 
"crash_test", size=10, errors=errors@entry=0x0, consumed=consumed@entry=0x0) at 
Objects/unicodeobject.c:5067
#9  0x0051c6b0 in PyUnicode_FromString (u=) at 
Objects/unicodeobject.c:2077
#10 0x00563c1c in PyImport_ImportModule (name=) at 
Python/import.c:1266
#11 0x004531dd in pybind11::module::import (name=0x61d15b "crash_test") 
at ./pybind11/include/pybind11/pybind11.h:849
#12 0x00446434 in ThreadFunc () at main.cpp:30
#13 0x0046a1b1 in std::_Bind_simple::_M_invoke<>(std::_Index_tuple<>) (this=0x10c28d8) at 
/usr/include/c++/5/functional:1531
#14 0x0046a10a in std::_Bind_simple::operator()() 
(this=0x10c28d8) at /usr/include/c++/5/functional:1520
#15 0x0046a09a in std::thread::_Impl 
>::_M_run() (this=0x10c28c0) at /usr/include/c++/5/thread:115
#16 0x7f99749e3c80 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#17 0x7f99750bb6ba in start_thread (arg=0x7f9971ca5700) at 
pthread_create.c:333
#18 0x7f997414941d in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:109

--

___
Python tracker 

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



[issue39776] Crash in decimal module in heavy-multithreaded scenario

2020-02-28 Thread Stefan Krah


Stefan Krah  added the comment:

Note that my pybind11 is from GitHub master, it can also be a pybind11
issue.


It is interesting that you cannot reproduce your original issue with
3.6, so I'm reopening this issue.

I think we need a reproducer without pybind11 though, could you
tweak Programs/_testembed.c (from the CPython sources) to run the
crash script?

--
status: closed -> open

___
Python tracker 

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



[issue39776] Crash in decimal module in heavy-multithreaded scenario

2020-02-28 Thread Stefan Krah


Change by Stefan Krah :


--
resolution: not a bug -> 
stage: resolved -> 

___
Python tracker 

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



[issue39776] Crash in decimal module in heavy-multithreaded scenario

2020-02-28 Thread Evgeny Boytsov


Evgeny Boytsov  added the comment:

Your callstack is very strange. At line 30 of main.cpp GIL is obviously locked:


   // importing module in this tread
   gstate = PyGILState_Ensure();
   py::module crash_test = py::module::import( "crash_test" ); <-- import
   PyGILState_Release( gstate );

I suppose that there is something wrong with your setup. Maybe - wrong working 
directory for the main executable, which doesn't contain crash_test.py

Also I've tried to revert this patch 
https://github.com/python/cpython/pull/5278 for 3.7. It makes problem to 
disappear, 1 hour of stable work under ASAN. So I suppose it is the source of 
the bug.

I will try to tweak _testembed.c.

--
resolution:  -> not a bug

___
Python tracker 

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



[issue39776] Crash in decimal module in heavy-multithreaded scenario

2020-02-28 Thread Stefan Krah

Stefan Krah  added the comment:

Regarding *my* issue, it could be anything, e.g. a missing call to
PyEval_InitThreads() in 3.6:

"Changed in version 3.7: This function is now called by Py_Initialize(), so you 
don’t have to call it yourself anymore."


This is why we need to eliminate pybind11 so we can see what is
actually going on.

--

___
Python tracker 

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



[issue29076] Mac installer shell updater script silently fails if default shell is fish

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

I've created a patch that applies fine to 3.7, 3.8 and 3.9, if anyone still is 
interested.

(Backporting to 3.6 and 2.7 is probably not going to happen, but at least the 
patch applies fine to both of them.)


The "Versions" label list should probably be updated to include 3.8 and 3.9.

--
keywords: +patch
nosy: +erlendaasland
Added file: 
https://bugs.python.org/file48929/0001-bpo-29076-Add-fish-support-to-macOS-build.patch

___
Python tracker 

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



[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-02-28 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +brett.cannon, pitrou

___
Python tracker 

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



[issue39776] Crash in decimal module in heavy-multithreaded scenario

2020-02-28 Thread Evgeny Boytsov


Evgeny Boytsov  added the comment:

I rewrote my example without pybind and eliminated C++ module (I realized that 
time.sleep() also releases the GIL, so we achieve the same effect). Still the 
same results: with python 3.7.3 app crashes with attached ASAN output, with 
python 3.7.3 without https://github.com/python/cpython/pull/5278 works just 
fine.

To run main.cpp you should add directory with crash_test.py to PYTHONPATH.

--
Added file: https://bugs.python.org/file48930/threaded_crash.zip

___
Python tracker 

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



[issue12915] Add inspect.locate and inspect.resolve

2020-02-28 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 4f17c5cd9a1ec50fe8de7ef68c39220a01a862cb by Vinay Sajip in branch 
'master':
bpo-12915: Improve Unicode support for package names and attributes. (GH-18517)
https://github.com/python/cpython/commit/4f17c5cd9a1ec50fe8de7ef68c39220a01a862cb


--

___
Python tracker 

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



[issue39776] Crash in decimal module in heavy-multithreaded scenario

2020-02-28 Thread Evgeny Boytsov


Evgeny Boytsov  added the comment:

Also I understood the source of your crash with my initial example. Since you 
haven't used CMake to configure project, pybind didn't setup required macroses 
to enable threading support. So no issues in pybind.

--

___
Python tracker 

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



[issue28429] ctypes fails to import with grsecurity's TPE

2020-02-28 Thread E. Castedo Ellerman


E. Castedo Ellerman  added the comment:

This is now fixed in Python 3.8. See https://bugs.python.org/issue35523

--
nosy: +E. Castedo Ellerman

___
Python tracker 

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



[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-02-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Possibly this could be done just by adding @lru_cache to the __new__() method.

--
nosy: +rhettinger

___
Python tracker 

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



[issue39776] Crash in decimal module in heavy-multithreaded scenario

2020-02-28 Thread Stefan Krah


Stefan Krah  added the comment:

> With python 3.7.3 without https://github.com/python/cpython/pull/5278 works 
> just fine.

Thanks, I'm now getting the same results as you. Looking at the smaller
test case, I also agree that it should work (as it did in 3.6).

--
keywords: +3.7regression
resolution: not a bug -> 
stage:  -> needs patch
type:  -> crash

___
Python tracker 

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



[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-02-28 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

There is the _closed attribute thought that is mutated by some methods.

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue27257] get_addresses results in traceback with an addrspec with an empty local part.

2020-02-28 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 4.0 -> 5.0
pull_requests: +18046
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/18687

___
Python tracker 

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



[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-02-28 Thread Antony Lee


Antony Lee  added the comment:

Decorating __new__ with lru_cache would likely run into memory leakage 
problems? (one would need a "weak lru_cache", I guess).

I didn't know about the _closed attribute. From a quick look it appears to only 
be settable by using the path (not the actual file) as a context manager, and 
only serves to block further filesystem methods, but I'm not even sure why? 
(for example, it doesn't block fspath, so it won't prevent operations via 
os.path functions anyways...)

--

___
Python tracker 

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



[issue39784] Tuple comprehension

2020-02-28 Thread Marco Sulla


New submission from Marco Sulla :

I think a tuple comprehension could be very useful.

Currently, the only way to efficiently create a tuple from a comprehension is 
to create a list comprehension (generator comprehensions are more slow) and 
convert it with `tuple()`.

A tuple comprehension will do exactly the same thing, but without the creation 
of the intermediate list.

IMHO a tuple comprehension can be very useful, because:

1. there are many cases in which you create a list with a comprehension, but 
you'll never change it later. You could simply convert it with `tuple()`, but 
it will require more time
2. tuples uses less memory than lists
3. tuples can be interned

As syntax, I propose 

(* expr for x in iterable *)

with absolutely no blank character between the character ( and the *, and the 
same for ).

Well, I know, it's a bit strange syntax... but () are already taken by 
generator comprehensions. Furthermore, the * remembers a snowflake, and tuples 
are a sort of "frozenlists".

--
components: Interpreter Core
messages: 362888
nosy: Marco Sulla
priority: normal
severity: normal
status: open
title: Tuple comprehension
versions: Python 3.9

___
Python tracker 

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



[issue14678] Update zipimport to support importlib.invalidate_caches()

2020-02-28 Thread Chris Wilcox


Chris Wilcox  added the comment:

That is my thinking as well after rooting around a bit. I unfortunately am not 
knowledgable enough here to be 100% sure it is complete.

--

___
Python tracker 

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



[issue37266] Daemon threads must be forbidden in subinterpreters

2020-02-28 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

There will be a problem with `concurrent.futures.ProcessPoolExecutor`, which 
currently launches its management thread as a daemon thread.  The daemon thread 
itself is not problematic, because ProcessPoolExecutor uses an atexit hook to 
shutdown itself and therefore join the management thread.

It seems, however, that it's not easy to make the thread non-daemon, because 
atexit hooks are executed *after* non-daemon threads are joined.  That would 
lead to a deadlock: the interpreter would wait for the non-daemon management 
thread to exit, but the ProcessPoolExecutor would wait for the atexit hook to 
be called before telling the management thread to exit.

cc'ing Thomas Moreau, who's worker a lot on this.

--
nosy: +pitrou, tomMoral

___
Python tracker 

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



[issue37266] Daemon threads must be forbidden in subinterpreters

2020-02-28 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Perhaps the solution would be to have an additional kind of atexit hooks, which 
get executed before threads are joined.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue39785] usr/bin/python doesn't use default python (3) on Windows

2020-02-28 Thread fireattack


New submission from fireattack :

STR

1. Install both Py2 and 3. 
2. Make sure Py3 is the default.
3. (Optional) Make sure only Python3 is in path, not Python2.

Run the following script from CMD:

```
#!/usr/bin/python

import platform
print(platform.python_version())
```

What expected:

3.8.1

What happened: 

2.8.5

According to https://docs.python.org/3/using/windows.html#shebang-lines, 
`#!/usr/bin/python` should use the default python. My environment is set to 
default to py3, and I don't even have python2 in my PATH. 

C:\Users\ikena\Desktop>py --version
Python 3.8.1

C:\Users\ikena\Desktop>python --version
Python 3.8.1

C:\Users\ikena\Desktop>where python
C:\Users\ikena\AppData\Local\Programs\Python\Python38\python.exe
C:\Users\ikena\AppData\Local\Microsoft\WindowsApps\python.exe

--
components: Windows
messages: 362892
nosy: fireattack, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: usr/bin/python doesn't use default python (3) on Windows
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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-02-28 Thread Ryan Ware


Change by Ryan Ware :


--
nosy: +ware

___
Python tracker 

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



[issue39785] usr/bin/python doesn't use default python (3) on Windows

2020-02-28 Thread fireattack


fireattack  added the comment:

I've searched and found some related issue, but none is specific for this. 

For example, Segev Finer mentioned that "[..] "#!/usr/bin/python" which will 
prefer Python 2" in issue 34274 but didn't mention why it would/should.

--

___
Python tracker 

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



[issue39785] #!/usr/bin/python shebang doesn't use default python (3) on Windows

2020-02-28 Thread fireattack


Change by fireattack :


--
title: usr/bin/python doesn't use default python (3) on Windows -> 
#!/usr/bin/python shebang doesn't use default python (3) on Windows

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset c705fd1e89ccb8f6d414ec817b4616546147d877 by Terry Jan Reedy in 
branch 'master':
bpo-39781: Do not jump when select in IDLE codecontext (GH-18683)
https://github.com/python/cpython/commit/c705fd1e89ccb8f6d414ec817b4616546147d877


--

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +18047
pull_request: https://github.com/python/cpython/pull/18688

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18048
pull_request: https://github.com/python/cpython/pull/18689

___
Python tracker 

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



[issue39785] #!/usr/bin/python shebang doesn't use default python (3) on Windows

2020-02-28 Thread fireattack


fireattack  added the comment:

Interestingly, I can't seem to reproduce this bug on my another Win7 machine 
with similar setup.

--

___
Python tracker 

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



[issue39785] #!/usr/bin/python shebang doesn't use default python (3) on Windows

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:

This is not strictly a duplicate of issue28686, but it's close enough, so let's 
keep the discussion of changing the original shebang behaviour over no that 
issue.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> py.exe ignored PATH when using python3 shebang

___
Python tracker 

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



[issue34274] Python launcher behavior with "#!/usr/bin/env python" shebang

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:

This is not strictly a duplicate of issue28686, but it's close enough, so let's 
keep the discussion of changing the original shebang behaviour over on that 
issue.

--
resolution:  -> duplicate
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



[issue34274] Python launcher behavior with "#!/usr/bin/env python" shebang

2020-02-28 Thread Steve Dower


Change by Steve Dower :


--
superseder:  -> py.exe ignored PATH when using python3 shebang

___
Python tracker 

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



[issue39784] Tuple comprehension

2020-02-28 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

This change needs to be discussed first on Python-ideas, and ideally needs a 
PEP (and a sponsor). So you should post it on Python-ideas mailing list or 
discuss.python.org Ideas section.

--
nosy: +Batuhan Taskaya

___
Python tracker 

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



[issue39784] Tuple comprehension

2020-02-28 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

This change needs to be discussed first on Python-ideas, and ideally needs a 
PEP (and a sponsor). So you should post it on Python-ideas mailing list or 
discuss.python.org Ideas section.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue39784] Tuple comprehension

2020-02-28 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread miss-islington


miss-islington  added the comment:


New changeset f4198aee4c288ce47c5803e87a461e31f81a0138 by Miss Islington (bot) 
in branch '3.7':
bpo-39781: Do not jump when select in IDLE codecontext (GH-18683)
https://github.com/python/cpython/commit/f4198aee4c288ce47c5803e87a461e31f81a0138


--

___
Python tracker 

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



[issue28686] py.exe ignored PATH when using python3 shebang

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:

So we're missing two things to move this forward:

1. A clear specification (and user-facing explanation) of the behaviour of 
py.exe in the presence of all possible shebangs and PATH settings
2. Someone willing to update the code

Given the current behaviour is described in PEP 397, step one probably requires 
a new PEP (unless it turns out to be a single sentence explanation, which so 
far, it has not). I'd be happy to sponsor such a PEP, but I don't feel the need 
for it and so I'm not inclined to write it myself.

Also worth noting is that the Microsoft Store package of Python *does* include 
versioned executables (because we're able to provide them without causing 
excessive clutter on PATH), but it does not include py.exe (because the 
versioning of that would get broken really quickly).

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

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread miss-islington


miss-islington  added the comment:


New changeset 846ca4961da24669e6e0c901986e66ff485917b2 by Miss Islington (bot) 
in branch '3.8':
bpo-39781: Do not jump when select in IDLE codecontext (GH-18683)
https://github.com/python/cpython/commit/846ca4961da24669e6e0c901986e66ff485917b2


--

___
Python tracker 

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



[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread R. David Murray


R. David Murray  added the comment:

Since Outlook is one of the mailers that generates the non-RFC-compliant 
headers, it doesn't surprise me all that much that it can't interpret the RFC 
compliant headers correctly.

I'm not sure there is anything we can do here.

I suppose someone could do a survey of mail clients and document which ones can 
handle which style of parameter encoding.  If it turns out more handle the 
"wrong" way than handle the "right" way, we could consider adopting to the 
de-facto standard, although I won't like it much :)

(There is also a possibility there is a bug in our RFC compliance, but this is 
the first problem report I've seen.)

--

___
Python tracker 

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



[issue39704] Disable code coverage

2020-02-28 Thread Brett Cannon


Brett Cannon  added the comment:

I don't know if backporting will be needed; probably depends on the CI and 
whether they always pull from master or the branch that was affected. But I 
just tried backporting regardless and there's conflicts, so it will have to be 
done manually.

--

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue14678] Update zipimport to support importlib.invalidate_caches()

2020-02-28 Thread Brett Cannon


Brett Cannon  added the comment:

It looks like it hasn't been done, else 
https://github.com/python/cpython/blob/master/Lib/zipimport.py would have some 
definition of a invalidate_caches() method. And specifically the finder lacks 
that method so it can be called by 
https://github.com/python/cpython/blob/c705fd1e89ccb8f6d414ec817b4616546147d877/Lib/importlib/_bootstrap_external.py#L1245-L1257.

--

___
Python tracker 

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



[issue39757] EmailMessage bad encoding for international domain

2020-02-28 Thread R. David Murray


R. David Murray  added the comment:

This is not actually a duplicate of 11783.  Rereading (parts of) that issue, we 
decided we currently have no good way to do automatic conversion between 
unicode and internationalized domains, so the user of the library has to do it 
themselves.  This means that the bug *here* is that the new email API is 
*wrongly* encoding the non-ascii in the domain by using an encoded word.  I'm 
surprised at that; I thought I'd guarded against it.

What should be happening here is that an error should be raised when that 
header is set (or possibly when it is accessed/serialized, but when set would 
be better I think) saying that there is non-ascii in the domain part.

--
resolution: duplicate -> 
stage: resolved -> needs patch
status: closed -> open
superseder: email parseaddr and formataddr should be IDNA aware -> 
title: EmailMessage wrong encoding for international domain -> EmailMessage bad 
encoding for international domain

___
Python tracker 

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



[issue8824] Improve documentation of exec

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I decided that the alternate addition in #13557 is enough.

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7

___
Python tracker 

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



[issue28686] py.exe ignored PATH when using python3 shebang

2020-02-28 Thread fireattack


fireattack  added the comment:

Just copy/paste a related issue reported in issue39785:

When run a python script with "#!/usr/bin/python" shebang with py.exe, it will 
always use python2 instead of python3 on Win 10, despite the default being set 
to py3 already (so does the PATH).

According to https://docs.python.org/3/using/windows.html#shebang-lines, 
`#!/usr/bin/python` should use the default python, not just python 2.

--
nosy: +fireattack

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +18049
pull_request: https://github.com/python/cpython/pull/18690

___
Python tracker 

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



[issue39786] Have the heaps library support max heap

2020-02-28 Thread signing_agreement


New submission from signing_agreement :

For numeric types, I can negate the numeric argument for max heaps, but if I 
have strings, I cannot go about negating them.

--
components: Library (Lib)
messages: 362909
nosy: signing_agreement
priority: normal
severity: normal
status: open
title: Have the heaps library support max heap
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

PR-18690 makes the approved change of 'string' to 'specification'.  After 
merging, I will re-review the other changes in i13790b.diff and possibly make 
another PR for review.

--
versions: +Python 3.9 -Python 2.7, Python 3.6

___
Python tracker 

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



[issue37266] Daemon threads must be forbidden in subinterpreters

2020-02-28 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Also cc'ing Kyle for the concurrent.futures issue.

--
nosy: +aeros

___
Python tracker 

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



[issue36516] Python Launcher can not recognize pyw file as Python GUI Script file type correctly.

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

I might have missed something, but I thought .pyw files were a Windows specific 
thing.

--
nosy: +erlendaasland

___
Python tracker 

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



[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken


Change by Pete Wicken :


--
nosy: +Wicken
nosy_count: 3.0 -> 4.0
pull_requests: +18050
pull_request: https://github.com/python/cpython/pull/18691

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 916895f93905f8b8dad677cceff501833f5a633a by Terry Jan Reedy in 
branch 'master':
bpo-13790: Change 'string' to 'specification' in format doc (GH-18690)
https://github.com/python/cpython/commit/916895f93905f8b8dad677cceff501833f5a633a


--

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +18052
pull_request: https://github.com/python/cpython/pull/18692

___
Python tracker 

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



[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken


Change by Pete Wicken :


--
pull_requests:  -18050

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18054
pull_request: https://github.com/python/cpython/pull/18693

___
Python tracker 

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



[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken


Change by Pete Wicken :


--
pull_requests: +18053
pull_request: https://github.com/python/cpython/pull/18691

___
Python tracker 

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



[issue39787] test_ssl and test_urllib2_localnet failing with new OpenSSL

2020-02-28 Thread Matheus Castanho


New submission from Matheus Castanho :

test_ssl and test_urllib2_localnet are failing when Python is built against 
top-of-tree OpenSSL. I'm attaching the output of: `regrtest.py test_ssl 
test_urllib2_localnet -W`

The output is from a powerpc64le machine with Python 3.8.2+ (1bbb81b251bc) and 
OpenSSL master (db943f43a60d1b).

A git bisect showed the problems started with the following OpenSSL commit:

commit db943f43a60d1b5b1277e4b5317e8f288e7a0a3a
Author: Matt Caswell 
Date:   Fri Jan 17 17:39:19 2020 +

Detect EOF while reading in libssl

If we hit an EOF while reading in libssl then we will report an error
back to the application (SSL_ERROR_SYSCALL) but errno will be 0. We add
an error to the stack (which means we instead return SSL_ERROR_SSL) and
therefore give a hint as to what went wrong.

Contains a partial fix for #10880

Reviewed-by: Tomas Mraz 
Reviewed-by: Dmitry Belyavskiy 
(Merged from https://github.com/openssl/openssl/pull/10882)

This also looks similar to: https://bugs.python.org/issue28689

--
assignee: christian.heimes
components: SSL, Tests
files: test-output.txt
messages: 362915
nosy: christian.heimes, mscastanho
priority: normal
severity: normal
status: open
title: test_ssl and test_urllib2_localnet failing with new OpenSSL
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48931/test-output.txt

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread miss-islington


miss-islington  added the comment:


New changeset 5157506e043f75f49caecae1c6afee8517a7bbb0 by Miss Islington (bot) 
in branch '3.7':
bpo-13790: Change 'string' to 'specification' in format doc (GH-18690)
https://github.com/python/cpython/commit/5157506e043f75f49caecae1c6afee8517a7bbb0


--

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread miss-islington


miss-islington  added the comment:


New changeset 445152e0d3ab6e4381aef8d1404c2c17a516070f by Miss Islington (bot) 
in branch '3.8':
bpo-13790: Change 'string' to 'specification' in format doc (GH-18690)
https://github.com/python/cpython/commit/445152e0d3ab6e4381aef8d1404c2c17a516070f


--

___
Python tracker 

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



[issue37708] Harmonize random.choice(s) behavior with random.sample on iterators

2020-02-28 Thread Roundup Robot


Change by Roundup Robot :


--
nosy: +python-dev
nosy_count: 3.0 -> 4.0
pull_requests: +18055
pull_request: https://github.com/python/cpython/pull/18694

___
Python tracker 

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



[issue39788] Exponential notation should return an int if it can

2020-02-28 Thread Marco Sulla


New submission from Marco Sulla :

(venv_3_9) marco@buzz:~/sources/python-frozendict$ python
Python 3.9.0a0 (heads/master-dirty:d8ca2354ed, Oct 30 2019, 20:25:01) 
[GCC 9.2.1 20190909] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 1E9
>>> type(a)


IMHO if the exponent is positive, and the  "base number" (1 in the example) is 
an integer, the result should be an integer.

Optionally, also if the "base number" has a number of decimal places <= the 
exponent, the result should be an integer. Example:

1.25E2 == 125

If the user wants a float, it can write

1.2500E2 == 125.0

--
components: Interpreter Core
messages: 362918
nosy: Marco Sulla
priority: normal
severity: normal
status: open
title: Exponential notation should return an int if it can
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-02-28 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

> Decorating __new__ with lru_cache would likely run into memory leakage 
> problems?

I think the LRU cache would be for returning the same instance when called with 
the same string. I don't think it would be needed to return the same instance 
when called with a Path instance.

> From a quick look it appears to only be settable by using the path (not the 
> actual file) as a context manager, and only serves to block further 
> filesystem methods, but I'm not even sure why?

This came up in bpo-39682 recently, I'm not sure what this flag is supposed to 
mean and I could not find it in the documentation.

Since it's uncorrelated to the file object and the physical file, I think it 
may actually be dangerous to rely on this flag. I don't know why is the purpose 
of using Path as a context manager.

--

___
Python tracker 

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



[issue38780] SysLogHandler crash atexit

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Attached patch is based on Ronald Oussoren's and Alan Robertson's comments: 
Initialise self.socket to None early in __init()__, and then check for None in 
close() and emit(). Passes make test on 3.9, 3.8 and 3.7.

If this solution is ok I'll add a unit test for the case that triggered this 
report and prepare a PR.

--
keywords: +patch
nosy: +erlendaasland
Added file: 
https://bugs.python.org/file48932/0001-bpo-38780-Harden-socket-use-in-logging.handlers.patch

___
Python tracker 

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



[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith


hwgdb Smith  added the comment:

I think program's goal is to solve problem, not solve the "standard".

OK, if you insist that "standard" has the Top priority, could you please tell 
me a way to change the default behavior of the new api to use the "=?utf-8?b?" 
parameter style. Is there a function or parameter i can use to achieve this?

If not, i think the best way to solve it is to add a "param style" parameter 
that i can choose which style i use.

And if not, i am sad about this, i had to use the legacy api.

--

___
Python tracker 

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



[issue38780] SysLogHandler crash atexit

2020-02-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


Removed file: 
https://bugs.python.org/file48932/0001-bpo-38780-Harden-socket-use-in-logging.handlers.patch

___
Python tracker 

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



[issue38780] SysLogHandler crash atexit

2020-02-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


Added file: 
https://bugs.python.org/file48933/0001-bpo-38780-Harden-socket-use-in-logging.handlers.patch

___
Python tracker 

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



[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith


hwgdb Smith  added the comment:

https://litmus.com/blog/infographic-the-2019-email-client-market-share

And there is a survey about email client market share. You see outlook is top 3.

--

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:

We still need the tag added to the cpython-source-deps repo, and I still can't 
complete a clone right now (something is strange with SSL to GitHub on my 
(temporary) internet connection).

Zach - can you tag it? https://github.com/python/cpython-source-deps/pull/17

--

___
Python tracker 

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



[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith


hwgdb Smith  added the comment:

And i just send a mail to my Gmail. I view it using web, it is incorrectly!

--

___
Python tracker 

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



[issue39788] Exponential notation should return an int if it can

2020-02-28 Thread Eric V. Smith


Eric V. Smith  added the comment:

I strongly disagree. Even if I thought it was a good idea (I don't), we'd break 
too much code by making this change now.

--
nosy: +eric.smith

___
Python tracker 

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



[issue38780] SysLogHandler crash atexit

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

I'm a bit uncertain if the previous patch can handle the emit() case correctly. 
Proposed improvement in attached patch (0002-Improve-emit.patch).

--
Added file: https://bugs.python.org/file48934/0002-Improve-emit.patch

___
Python tracker 

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



[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith


hwgdb Smith  added the comment:

Sorry, the Gmail web is correctly.

--

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Yes, we need the tag for the Windows build, so the PR currently fails the 
Windows checks. (Tagging must be done explicitly by the maintainers, IIRC.) I 
also forgot to add a NEWS entry, so I'll do another push to add those (and kick 
off the CI) when the tag arrives.

--

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PRs.  If we're going to update now as we should, why not to 
3.31.1 which is current?

--

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

You're welcome. If you are ok with that, I'd be happy to prepare a PR for the 
source deps for sqlite3 v3.31.1, and update GH-18678 as soon as it is tagged.

--

___
Python tracker 

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



[issue39789] Update Windows release build machines to latest versions

2020-02-28 Thread Steve Dower


New submission from Steve Dower :

Shouldn't have any impact at all, but I'm going to mention it here so it gets 
in the NEWS file. Just in case someone hits an obscure edge case and is trying 
to find out what changed.

--
assignee: steve.dower
components: Windows
messages: 362931
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Update Windows release build machines to latest versions
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue39789] Update Windows release build machines to latest versions

2020-02-28 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue36516] Python Launcher can not recognize pyw file as Python GUI Script file type correctly.

2020-02-28 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PR.

I believe there also used to be a distinction between .py and .pyw files back 
in the distant past of classic MacOS (9 and earlier) and limited support for 
.pyw was carried over into Mac OS X (10).  But most of the references to .pyw 
for macOS have been removed over the years other than, it seems, here in Python 
Launcher.app. There are other more basic concerns with the Launcher app so I 
have been holding off on merging this change for 3.9.  I plan to make a 
decision about its fate by the end of the PyCon sprints in April.

--

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Ned Deily


Ned Deily  added the comment:

I would prefer to go to 3.31.1 at this point particularly given the track 
record of the SQLite project. It's been released for a month now.  Any 
objections, Steve?

--

___
Python tracker 

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



[issue39682] pathlib.Path objects can be used as context managers

2020-02-28 Thread Antony Lee


Antony Lee  added the comment:

A problem of having this bit of state in paths is that it violates assumptions 
based on immutability/hashability, e.g. with

from pathlib import Path

p = Path("foo")
q = Path("foo")

with p: pass

unique_paths = {p, q}

print(len(unique_paths))  # == 1, as p == q
for path in unique_paths:
print(path.resolve())  # Fails if the path is closed.

The last line fails with `unique_paths = {p, q}` as p has been closed (and 
apparently sets keep the first element when multiple "equal" elements are 
passed in), but not with `unique_paths = {q, p}`.

It would also prevent optimizations based on immutability as proposed in 
https://bugs.python.org/issue39783.

--
nosy: +Antony.Lee

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

I agree. I've updated the branches for source deps and cpython. I'll wait for 
Steve's approval before I open a new PR over at cpython-source-deps and update 
GH-18678.

--

___
Python tracker 

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



[issue39717] Fix exception causes in tarfile module

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

While I have no specific opinion on tarfile, I strongly disagree with a blanket 
prohibition on 'from None'.  Its proper use is to maintain a defined API and 
hide irrelevant implementation details.  Realistic toy example:

def f(x, y):
"Return (x+y)/y for non-zery y."

if y == 0:  # Body 1: look ahead.
raise ValueError('y cannot be 0')
else:
return (x+y)/y
# or
try:  # Body 2: leap first.
return (x+y)/y
except ZeroDivisionError:
raise ValueError('y cannot be 0') from None

'from e' instead of 'from None' would just add distracting noise.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue39790] LICENSE.TXT file does not contain all incorporated software

2020-02-28 Thread Steve Dower


New submission from Steve Dower :

Looking at https://docs.python.org/3/license.html there's a list of 
"incorporated software" licenses, most of which say you need to distribute the 
license.

Right now, the LICENSE.txt file we distribute on Windows (made from the 
/LICENSE and PC/crtlicense.txt files in the repo, plus those in the source 
dependencies) does not include any of these licenses that come from C source 
files.

Arguably, we should just include all of them in a central file somewhere in the 
repo, even though there'd be some duplication.

(I have no idea whether other distros correctly gather it all together.)

--
components: Windows
messages: 362937
nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: LICENSE.TXT file does not contain all incorporated software
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:

Isn't that what we ended up merging? (Goes to check). Ah, that was 3.30.1.

Sure, go for it. We'll have RCs of everything before the next final releases go 
out, so provided someone double checks that it's all good before then I'm okay 
with it.

--

___
Python tracker 

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



[issue39718] TYPE_IGNORE, COLONEQUAL missing from py38 changes in token docs

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I verified the additions in token.py.  Thanks for the report.

--
assignee: docs@python -> terry.reedy
nosy: +terry.reedy
type:  -> behavior
versions: +Python 3.8, Python 3.9

___
Python tracker 

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



[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-02-28 Thread Barney Gale


Barney Gale  added the comment:

Attempted fix shown here: 
https://github.com/barneygale/cpython/commit/784630ef6ad05031abdefa523e61e0629b15e201

Note that I've already removed context manager support (and hence `_closed`) in 
this branch.

--
nosy: +barneygale

___
Python tracker 

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



[issue39718] TYPE_IGNORE, COLONEQUAL missing from py38 changes in token docs

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset c2f7eb254bee036afc8a71437ec6aac82f06a1ce by Shantanu in branch 
'master':
bpo-39718: add TYPE_IGNORE, COLONEQUAL to py38 changes in token (GH-18598)
https://github.com/python/cpython/commit/c2f7eb254bee036afc8a71437ec6aac82f06a1ce


--

___
Python tracker 

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



[issue39718] TYPE_IGNORE, COLONEQUAL missing from py38 changes in token docs

2020-02-28 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +18057
pull_request: https://github.com/python/cpython/pull/18696

___
Python tracker 

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



[issue39718] TYPE_IGNORE, COLONEQUAL missing from py38 changes in token docs

2020-02-28 Thread miss-islington


miss-islington  added the comment:


New changeset 7f53d87cb0324e391c969855ed8f4b3255f9f744 by Miss Islington (bot) 
in branch '3.8':
bpo-39718: add TYPE_IGNORE, COLONEQUAL to py38 changes in token (GH-18598)
https://github.com/python/cpython/commit/7f53d87cb0324e391c969855ed8f4b3255f9f744


--

___
Python tracker 

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



[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2020-02-28 Thread Maor Kleinberger


Change by Maor Kleinberger :


--
versions: +Python 3.8, Python 3.9

___
Python tracker 

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



[issue39788] Exponential notation should return an int if it can

2020-02-28 Thread Zachary Ware


Zachary Ware  added the comment:

Agreed with Eric.

--
nosy: +zach.ware
resolution:  -> rejected
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



  1   2   >