[issue40082] Assertion failure in trip_signal

2020-03-26 Thread Alexander Riccio


Alexander Riccio  added the comment:

Hmmm, happens every time I interrupt while attached. Is there some obvious 
gotcha in the docs that I'm missing?

--

___
Python tracker 

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



[issue40082] Assertion failure in trip_signal

2020-03-26 Thread Alexander Riccio


Alexander Riccio  added the comment:

Lmao the name mangling comes up as a mailto. That's interesting.

--

___
Python tracker 

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



[issue40082] Assertion failure in trip_signal

2020-03-26 Thread Alexander Riccio


New submission from Alexander Riccio :

While trying to make sense of some static analysis warnings for the Windows 
console IO module, I Ctrl+C'd in the middle of an intentionally absurd __repr__ 
output, and on proceeding in the debugger (which treated it as an exception), I 
immediately hit the assertion right here:

/* Get the Python thread state using PyGILState API, since
   _PyThreadState_GET() returns NULL if the GIL is released.
   For example, signal.raise_signal() releases the GIL. */
PyThreadState *tstate = PyGILState_GetThisThreadState();
assert(tstate != NULL);

...With the stacktrace: 
ucrtbased.dll!issue_debug_notification(const wchar_t * const message) 
Line 28   C++
ucrtbased.dll!__acrt_report_runtime_error(const wchar_t * message) Line 
154 C++
ucrtbased.dll!abort() Line 51   C++
ucrtbased.dll!common_assert_to_stderr_direct(const wchar_t * const 
expression, const wchar_t * const file_name, const unsigned int line_number) 
Line 161C++
ucrtbased.dll!common_assert_to_stderr(const wchar_t * const 
expression, const wchar_t * const file_name, const unsigned int line_number) 
Line 175  C++
ucrtbased.dll!common_assert(const wchar_t * const expression, 
const wchar_t * const file_name, const unsigned int line_number, void * const 
return_address) Line 420   C++
ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t * 
file_name, unsigned int line_number) Line 443C++
>   python39_d.dll!trip_signal(int sig_num) Line 266C
python39_d.dll!signal_handler(int sig_num) Line 342 C
ucrtbased.dll!ctrlevent_capture(const unsigned long ctrl_type) Line 206 
C++
KernelBase.dll!_CtrlRoutine@4()Unknown
kernel32.dll!@BaseThreadInitThunk@12() Unknown
ntdll.dll!__RtlUserThreadStart()Unknown
ntdll.dll!__RtlUserThreadStart@8() Unknown


...I'm not entirely sure why this happened, but I can tell a few things. 
_PyRuntime.gilstate.autoInterpreterState is NOT null, in fact the gilstate 
object is as displayed in my watch window: 

-   _PyRuntime.gilstate {check_enabled=1 
tstate_current={_value=0 } getframe=0x79e3a570 
{python39_d.dll!threadstate_getframe(_ts *)} ...}   _gilstate_runtime_state
check_enabled   1   int
+   tstate_current  {_value=0 } _Py_atomic_address
getframe0x79e3a570 
{python39_d.dll!threadstate_getframe(_ts *)} _frame *(*)(_ts *)
-   autoInterpreterState0x00e5eff8 {next=0x  
tstate_head=0x00e601c0 {prev=0x  next=0x  ...} ...} 
 _is *
+   next0x_is *
+   tstate_head 0x00e601c0 {prev=0x  
next=0x  interp=0x00e5eff8 {next=0x  ...} ...}   
_ts *
+   runtime 0x7a0e2118 {python39_d.dll!pyruntimestate _PyRuntime} 
{preinitializing=0 preinitialized=1 core_initialized=...} pyruntimestate *
id  0   __int64
id_refcount -1  __int64
requires_idref  0   int
id_mutex0x  void *
finalizing  0   int
+   ceval   {tracing_possible=0 eval_breaker={_value=0 } 
pending={finishing=0 lock=0x00e59390 calls_to_do={_value=...} ...} }   
_ceval_state
+   gc  {trash_delete_later=0x  
trash_delete_nesting=0 enabled=1 ...} _gc_runtime_state
+   modules 0x00bf1228 {ob_refcnt=3 ob_type=0x7a0b1178 
{python39_d.dll!_typeobject PyDict_Type} {ob_base={ob_base=...} ...} }   
_object *
+   modules_by_index0x00750058 {ob_refcnt=1 
ob_type=0x7a0b8210 {python39_d.dll!_typeobject PyList_Type} 
{ob_base={ob_base=...} ...} }   _object *
+   sysdict 0x00bf1298 {ob_refcnt=2 ob_type=0x7a0b1178 
{python39_d.dll!_typeobject PyDict_Type} {ob_base={ob_base=...} ...} }   
_object *
+   builtins0x00bf1f48 {ob_refcnt=88 ob_type=0x7a0b1178 
{python39_d.dll!_typeobject PyDict_Type} {ob_base={ob_base=...} ...} }  
_object *
+   importlib   0x00c0df60 {ob_refcnt=28 ob_type=0x7a0b92d0 
{python39_d.dll!_typeobject PyModule_Type} {ob_base={ob_base=...} ...} }
_object *
num_threads 0   long
pythread_stacksize  0   unsigned int
+   codec_search_path   0x00c4a260 {ob_refcnt=1 
ob_type=0x7a0b8210 {python39_d.dll!_typeobject PyList_Type} 
{ob_base={ob_base=...} ...} }   _object *
+   codec_search_cache  0x00c1f0d8 {ob_refcnt=1 
ob_type=0x7a0b1178 {python39_d.dll!_typeobject PyDict_Type} 
{ob_base={ob_base=...} ...} }   _object *
+   codec_error_registry0x00c14f10 {ob_refcnt=1 
ob_type=0x7a0b1178 {python39_d.dll!_typeobject PyDict_Type} 
{ob_base={ob_base=...} ...} }   _object *

[issue40081] List sorting

2020-03-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
components:  -IDLE

___
Python tracker 

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



[issue40081] List sorting

2020-03-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
assignee: terry.reedy -> 

___
Python tracker 

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



[issue40081] List sorting

2020-03-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

In the future, please use the python-tutor or python-list mailing lists if you 
need help. If you still think you've found a bug in python, then open an issue 
here.

https://mail.python.org/mailman/listinfo/tutor
https://mail.python.org/mailman/listinfo/python-list

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: resource usage -> behavior

___
Python tracker 

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



[issue38246] pathlib.resolve and .absolute leave trailing tilde in home expansion

2020-03-26 Thread Andrea Bergonzo


Change by Andrea Bergonzo :


--
nosy: +andybergon

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Dong-hee Na


Change by Dong-hee Na :


--
components: +C API

___
Python tracker 

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



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-03-26 Thread Zhu Sheng Li


Zhu Sheng Li  added the comment:

I submitted a PR and get reviewed by @lazka. Is there anything I should do for 
pushing it to next step?

--

___
Python tracker 

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



[issue40081] List sorting

2020-03-26 Thread 朱聖黎

朱聖黎  added the comment:

I think it's an expected behavior.

`a.sort()` sorts the list itself in place, so it returns None.

If you want a sorted list returned, you need to use `sorted` function.

https://docs.python.org/3/library/functions.html#sorted

--
nosy: +akarei

___
Python tracker 

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



[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Duplicate of https://bugs.python.org/issue3646

This was rejected because it breaks functools.singledispatch(), 
typing.NamedTuple(), and dataclasses.dataclass().  Also the space savings was 
negligible -- typically take much less space than for docstrings because the 
annotations dict consists of pointers to existing objects.

--
nosy: +rhettinger
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



[issue40081] List sorting

2020-03-26 Thread Sivasundar Nagarajan


New submission from Sivasundar Nagarajan :

Good day. Hope you are safe and wish the same with the present situation.
Need you help please in understanding the below function of Python. 
 
 
Steps - 
1. tried assigning the below values in the list and named it as a
2.if I print, it prints in the same sequence.
3.Tried assigning it to b by the command a.sort()
4.Tried printing b and it gave null.
5.But printed a now, and the values were sorted.
 
 
Please help me understand if we have any logic with in a list to sort the 
values after an iteration.
Please apologize if I had missed some basics and uncovered it. 
 
>>> a = [1,4,3,2,4,5,3,2]
>>> a
[1, 4, 3, 2, 4, 5, 3, 2]
>>> print (a)
[1, 4, 3, 2, 4, 5, 3, 2]
>>> b = a.sort()
>>> b
>>> print (a)
[1, 2, 2, 3, 3, 4, 4, 5]
>>>

--
assignee: terry.reedy
components: IDLE
messages: 365129
nosy: Sivasundar Nagarajan, terry.reedy
priority: normal
severity: normal
status: open
title: List sorting
type: resource usage
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



[issue40049] tarfile cannot extract from stdin

2020-03-26 Thread Jonathan Hsu


Jonathan Hsu  added the comment:

This is caused when tarfile tries to write a symlink that already exists. Any 
exceptions to os.symlink() as handled as if the platform doesn't support 
symlinks, so it scans the entire tar to try and find the linked files. When it 
resumes extraction, it needs to do a negative seek to pick up where it left 
off, which causes the exception.

I've reproduced the error on both Windows 10 and Ubuntu running on WSL. Python 
2.7 handled this situation by checking if the symlink exists, but it looks like 
the entire tarfile library was replaced with an alternate implementation that 
doesn't check if the symlink exists. I've created a pull request to address 
this issue.

--
nosy: +Jonathan Hsu

___
Python tracker 

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



[issue39908] Remove unused args from init_set_builtins_open and _Py_FatalError_PrintExc in Python/pylifecycle.c

2020-03-26 Thread Andy Lester


Change by Andy Lester :


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



[issue39943] Meta: Clean up various issues in C internals

2020-03-26 Thread Andy Lester


Andy Lester  added the comment:

It doesn't quiet any compiler warnings given the default compiler warnings that 
./configure sets.  

However, it does quiet the -Wcast-qual compiler warning that could be a helpful 
addition some time in the future. I think it would be great, for example, if it 
were made impossible to send a pointer that points at a string literal into a 
function that would modify its contents.

Consting pointers also helps static analyzers like splint by letting it know 
the intent of the API.  It makes it possible for the analyzer to detect 
uninitialized buffers, for example.

All of the 20 or so patches that I've submitted, like BPO 39770 that you 
merged, have come about from my cranking up the warning options on both GCC and 
clang and sifting through the warnings.  My hope is that by making more things 
const, we can detect existing bugs and prevent new ones.

You say "I'm not sure that it's worth it to modify exiting code."  Is your 
concern the amount of work it would take to find the problems?  If so, it's not 
that much work when you let the compiler find the problems, which I've done.  
I've already spent the time digging and validating.

--

___
Python tracker 

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



[issue40049] tarfile cannot extract from stdin

2020-03-26 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +18546
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19187

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Paulo Henrique Silva


Change by Paulo Henrique Silva :


--
nosy: +phsilva

___
Python tracker 

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



[issue39943] Meta: Clean up various issues in C internals

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

What is the rationale for adding const? For example, does the PR 19185 fix any 
compiler warning or any bug? While PR 19185 is correct, I am not sure that we 
should modify the 607K lines of C code of CPython to add const everywhere. I'm 
fine with using const for new code, but I'm not sure that it's worth it to 
modify exiting code.

--

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

Pablo:
> Wouldn't having less static types slow down startup time?

That's possible, even if I only expect a minor or non significant overhead.

But before starting talking about performances, we should focus on the 
correctness. Static types are causing issues with subinterpreters and the 
Python finalization.

--

___
Python tracker 

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



[issue39943] Meta: Clean up various issues in C internals

2020-03-26 Thread Andy Lester


Change by Andy Lester :


--
pull_requests: +18545
pull_request: https://github.com/python/cpython/pull/19186

___
Python tracker 

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



[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am -1 to this feature because compared with other optimization levels this 
can have unknown effects on the runtime, especially on dependencies you do not 
control. dataclasses is an example, but much more exist. To support this 
feature we would need also another extension for pyc files (like pyo) but (pyo) 
cannot be used to preserve backwards compatibility. Also, the feature will 
mainly serve to reduce file size, not much to speed up the runtime as any gain 
will be constant at definition time. IMHO the maintenance cost is too high for 
what the value is and it also has some potentially unintended dangerous 
consequences.

--
nosy: +pablogsal

___
Python tracker 

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



[issue39943] Meta: Clean up various issues in C internals

2020-03-26 Thread Andy Lester


Change by Andy Lester :


--
pull_requests: +18544
pull_request: https://github.com/python/cpython/pull/19185

___
Python tracker 

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



[issue36989] test_thread fails because symbol is (no longer) exported

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> Fatal Python error: Py_EndInterpreter: not the last thread

That's the bug bpo-36402 which I fixed with commit 
468e5fec8a2f534f1685d59da3ca4fad425c38dd in master.

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> threading._shutdown() race condition: test_threading 
test_threads_join_2() fails randomly

___
Python tracker 

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



[issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation

2020-03-26 Thread John Andersen


Change by John Andersen :


--
nosy: +pdxjohnny

___
Python tracker 

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



[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> Note that dataclasses will break without annotations.

Yes, that is also affecting this simple tester script. There is no alternative 
to value-less annotated assignment.

I don't think this is preferable but just for information, these are the 
results for keeping AnnAssign nodes but just removing their annotation

def visit_AnnAssign(self, node):
self.stats += 1
node.annotation = ast.copy_location(ast.Constant(value=None), 
node.annotation)
return node

Total bytes: 1820086
Total bytes after 629 docstrings (total length of 180333) removed: 1643315
Total bytes after 8859 type annotations removed: 1664649

This way we can still support dataclasses but still gain as close as before

--

___
Python tracker 

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



[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

Note that dataclasses will break without annotations.

--
nosy: +eric.smith

___
Python tracker 

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



[issue1193099] Embedded python thread crashes

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
superseder:  -> Embedded python thread crashes

___
Python tracker 

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



[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-1193099 was marked as a duplicate of this issue.

--

___
Python tracker 

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



[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

Just like docstrings, annotations do nothing at runtime for the majority of the 
time. We can just strip out them and gain as much as the docstring optimization 
in bytecode size on a fully annotated repo.

For comparing these two optimizations, I calculated the bytecode weight 
(marshal dumped size of) of each optimization (with a similar implementation to 
the compiler but not exact) over a project which both rich in docstrings and 
annotations. 

Project: https://github.com/Instagram/LibCST

 $ python simple_tester.py LibCST 
Total bytes: 1820086
Total bytes after 629 docstrings (total length of 180333) removed: 1643315
Total bytes after 8859 type annotations removed: 1641594

(I've submitted the script I used to calculate these results.)

--
components: Interpreter Core
files: simple_tester.py
messages: 365118
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Stripping annotations out as a new optimization mode
type: enhancement
versions: Python 3.9
Added file: https://bugs.python.org/file49004/simple_tester.py

___
Python tracker 

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



[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

As an addition, I need to clarify that each optimization applied by its own.

--

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Wouldn't having less static types slow down startup time?

--

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Wouldn't having more static types slow down startup time?

--
nosy: +pablogsal

___
Python tracker 

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



[issue40074] pickle module dump and load: add support for string file names

2020-03-26 Thread Diego Palacios


Diego Palacios  added the comment:

In this case two new functions should be added to the pickle function. I think 
they would be very useful and many users would make use of them.

--

___
Python tracker 

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



[issue40079] NULL pointer deref on error path in _ssl debughelpers.c

2020-03-26 Thread Alexander Riccio


New submission from Alexander Riccio :

At line 138 in debughelpers.c, ssl_obj, which was set to NULL on line 122, is 
dereferenced. 

I think the original intent was to actually bubble the error up through the ssl 
object.



Full function:

static void
_PySSL_keylog_callback(const SSL *ssl, const char *line)
{
PyGILState_STATE threadstate;
PySSLSocket *ssl_obj = NULL;  /* ssl._SSLSocket, borrowed ref */
int res, e;
static PyThread_type_lock *lock = NULL;

threadstate = PyGILState_Ensure();

/* Allocate a static lock to synchronize writes to keylog file.
 * The lock is neither released on exit nor on fork(). The lock is
 * also shared between all SSLContexts although contexts may write to
 * their own files. IMHO that's good enough for a non-performance
 * critical debug helper.
 */
if (lock == NULL) {
lock = PyThread_allocate_lock();
if (lock == NULL) {
PyErr_SetString(PyExc_MemoryError, "Unable to allocate lock");
PyErr_Fetch(&ssl_obj->exc_type, &ssl_obj->exc_value,
&ssl_obj->exc_tb);
return;
}
}

ssl_obj = (PySSLSocket *)SSL_get_app_data(ssl);
assert(PySSLSocket_Check(ssl_obj));
if (ssl_obj->ctx->keylog_bio == NULL) {
return;
}

PySSL_BEGIN_ALLOW_THREADS
PyThread_acquire_lock(lock, 1);
res = BIO_printf(ssl_obj->ctx->keylog_bio, "%s\n", line);
e = errno;
(void)BIO_flush(ssl_obj->ctx->keylog_bio);
PyThread_release_lock(lock);
PySSL_END_ALLOW_THREADS

if (res == -1) {
errno = e;
PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError,
 ssl_obj->ctx->keylog_filename);
PyErr_Fetch(&ssl_obj->exc_type, &ssl_obj->exc_value, &ssl_obj->exc_tb);
}
PyGILState_Release(threadstate);
}

--
assignee: christian.heimes
components: SSL
messages: 365114
nosy: Alexander Riccio, christian.heimes
priority: normal
severity: normal
status: open
title: NULL pointer deref on error path in _ssl debughelpers.c
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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 71a3522ef85df06a3acc718107360e37e4116a15 by Victor Stinner in 
branch 'master':
bpo-38644: Make tstate more explicit inside pystate.c (GH-19182)
https://github.com/python/cpython/commit/71a3522ef85df06a3acc718107360e37e4116a15


--

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 728189884e0e128c4ffc57b785b04584d57a90c0 by Victor Stinner in 
branch 'master':
bpo-38644: Pass tstate explicitly in signalmodule.c (GH-19184)
https://github.com/python/cpython/commit/728189884e0e128c4ffc57b785b04584d57a90c0


--

___
Python tracker 

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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Paul Ganssle


Paul Ganssle  added the comment:

> isoformat function does not conform to the ISO 8601 and drops microseconds 
> part if its value is 00.

I'm not sure why you think that this does not conform to ISO 8601 - ISO 8601 is 
a sprawling beast of a spec and allows some crazy formats. Some examples of 
perfectly valid ISO 8601 strings:

--03-26
2020-W13-4T03
2020-03-26T03.5
2020-03-26T03,5
2020-03-26T03:30:40.334


There are *hundreds* of valid formats encompassed by ISO 8601.

Anyway, that's an aside. The behavior of .isoformat() is pretty clearly 
documented. These are the first three line of the documentation:

Return a string representing the date and time in ISO 8601 format:

  - -MM-DDTHH:MM:SS.ff, if microsecond is not 0
  - -MM-DDTHH:MM:SS, if microsecond is 0

I believe Karthikeyan has adequately explained how to get the behavior you 
want, so I am going to go ahead and close this as working as intended.

--

___
Python tracker 

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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Alexander Bolshakov


Change by Alexander Bolshakov :


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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread SilentGhost


Change by SilentGhost :


--
nosy: +SilentGhost

___
Python tracker 

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



[issue40012] Avoid Python 2 documentation to appear in Web search results

2020-03-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Sorry, the 'previous issue' is a vague memory which I cannot find.  For some 
reason, searching this tracker for 'Google' return 1500+ hits.

--

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Well, then I think there is nothing to do this.

Compatibility with context manager protocol is not a goal if it does nothing on 
exit. In any case you can easy to make it in three lines:

@contextmanager
def mymkdtemp():
yield mkdtemp()

NamedTemporaryFile is more complex than mkstemp(). It creates a file object and 
closes a file descriptor even if leave the file on the filesystem.

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18543
pull_request: https://github.com/python/cpython/pull/19184

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Anthony Sottile


Anthony Sottile  added the comment:

you are right though, the effect is the same as just using mkdtemp

--

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Anthony Sottile


Anthony Sottile  added the comment:

the differences are api compatibility with context manager protocol and 
equivalence with NamedTemporaryFile

NamedTemporaryFile(delete=False) is just `mkstemp` afaict and the api is there

--

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18542
pull_request: https://github.com/python/cpython/pull/19183

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18541
pull_request: https://github.com/python/cpython/pull/19182

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Could you please explain the difference between hypothetical 
TemporaryDirectory(delete=False) and simple mkdtemp()?

--

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Anthony Sottile


Anthony Sottile  added the comment:

Serhiy's comment provides workarounds but are still (imo) inferior to 
supporting this.

I would really like for this api to match that of NamedTemporaryFile which has 
the same `delete=...` option

--

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 08faf0016e1ee590c78f64ddb244767c7801866a by Victor Stinner in 
branch 'master':
bpo-38644: Add _PySys_Audit() which takes tstate (GH-19180)
https://github.com/python/cpython/commit/08faf0016e1ee590c78f64ddb244767c7801866a


--

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Mauro S. M. Rodrigues


Mauro S. M. Rodrigues  added the comment:

So per Serhiy comment can I assume the patch is not necessary? If so I believe 
the issue should be closed as well.

--

___
Python tracker 

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



[issue40049] tarfile cannot extract from stdin

2020-03-26 Thread Danijel


Danijel  added the comment:

Hi,

well, it says entity too large. I've attached a smaller one, that throws a 
similar but slightly different error. (Note: only on the _second_ extraction, 
it looks like problems with symlinks)

You can find larger ones here:

https://data.rbfh.de/issue40049/

The typescript*.txt are showing a shell session with two different python 
versions. (3.4.2 and 3.8.2)

--
Added file: https://bugs.python.org/file49003/test.tar

___
Python tracker 

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



[issue39982] FreeBSD: SCTP tests of test_socket fails on AMD64 FreeBSD Shared 3.x

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, we got the confirmation that it's a regression in the FreeBSD kernel in 
FreeBSD CURRENT. The following commit reverts a change which introduced the 
race condition:
https://svnweb.freebsd.org/base?view=revision&revision=359302

I suggest to wait until this change lands on FreeBSD CURRENT buildbots (not 
workaround the bug in Python, since CURRENT is not released yet).

--

___
Python tracker 

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



[issue40053] Document the behavior that no interplotation is applied when no *args are passed in for logging statements

2020-03-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks for the bug report! I'll mark it "fixed". If there's more to do, let us 
know.

--
resolution:  -> fixed

___
Python tracker 

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



[issue40053] Document the behavior that no interplotation is applied when no *args are passed in for logging statements

2020-03-26 Thread Nan Hua


Nan Hua  added the comment:

Note that this issue has already been mostly addressed by 
https://github.com/python/cpython/pull/19132. I think we can close this issue 
now. Thanks Eric, Gregory and Vinay!

--
stage: needs patch -> 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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18540
pull_request: https://github.com/python/cpython/pull/19180

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-26 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 2929bfb973da249ed4f056c88a69bcc48e5a4843 by Miss Islington (bot) 
in branch '3.7':
bpo-19698: Document when importlib.machinery.FrozenImporter gained spec-related 
methods (GH-19158) (GH-19165)
https://github.com/python/cpython/commit/2929bfb973da249ed4f056c88a69bcc48e5a4843


--

___
Python tracker 

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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2020-03-26 Thread Paulo Henrique Silva


Change by Paulo Henrique Silva :


--
nosy: +phsilva

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-26 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 8dad09a2242194a4101374b91ce87bb47a487cf7 by Miss Islington (bot) 
in branch '3.8':
bpo-19698: Document when importlib.machinery.FrozenImporter gained spec-related 
methods (GH-19158) (#19164)
https://github.com/python/cpython/commit/8dad09a2242194a4101374b91ce87bb47a487cf7


--

___
Python tracker 

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



[issue40078] asyncio subprocesses allow pids to be reaped, different behavior than regular subprocesses

2020-03-26 Thread Justin Lebar


Change by Justin Lebar :


--
type:  -> behavior
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



[issue40078] asyncio subprocesses allow pids to be reaped, different behavior than regular subprocesses

2020-03-26 Thread Justin Lebar


Change by Justin Lebar :


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



[issue1187312] subprocess: optional auto-reaping fixing os.wait() lossage

2020-03-26 Thread Justin Lebar


Justin Lebar  added the comment:

15 years later, it seems asyncio subprocesses may have the same issue.  :)

https://bugs.python.org/issue40078

--
nosy: +Justin.Lebar

___
Python tracker 

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



[issue40078] asyncio subprocesses allow pids to be reaped, different behavior than regular subprocesses

2020-03-26 Thread Justin Lebar


New submission from Justin Lebar :

>From https://bugs.python.org/issue1187312 about regular subprocesses:

> So as long as the application keeps a reference to the
> subprocess object, it can wait for it; auto-reaping only
> starts when the last reference was dropped [in Popen.__del__].

asyncio subprocesses seem to behave differently.  When we notice the process 
has exited in BaseSubprocessTransport._process_exited, we call _try_finish(), 
which -- if all pipes are closed -- calls _call_connection_lost and sets 
self._proc to None.

At this point, my understanding is that once self._proc is GC'ed, we'll run 
Popen.__del__ and may reap the pid.

I would expect asyncio subprocesses to behave the same way as regular Popen 
objects wrt pid reaping.

--
components: asyncio
messages: 365095
nosy: Justin.Lebar, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio subprocesses allow pids to be reaped, different behavior than 
regular subprocesses

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-03-26 Thread Matej Cepl


Change by Matej Cepl :


--
nosy: +mcepl
nosy_count: 3.0 -> 4.0
pull_requests: +18539
pull_request: https://github.com/python/cpython/pull/19179

___
Python tracker 

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



[issue40043] RegExp Conditional Construct (?(id/name)yes-pattern|no-pattern) Problem

2020-03-26 Thread Matthew Barnett


Matthew Barnett  added the comment:

That's what searching does!

Does the pattern match here? If not, advance by one character and try again. 
Repeat until a match is found or you've reached the end.

--

___
Python tracker 

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



[issue40049] tarfile cannot extract from stdin

2020-03-26 Thread Manjusaka


Manjusaka  added the comment:

Hello
 
I can't reproduce this issue on my Laptop from 3.8.1 to 3.9.0a4

I think maybe it depends on the file you use

would you mind to upload the file with the problem?

--
nosy: +Manjusaka

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread Zachary Ware

Zachary Ware  added the comment:

12 years later, we finally landed your fix :).  Thanks for the patch, and for 
bearing with us (and me in particular for the past couple months).

As mentioned in the PR, there is probably opportunity to clean up the cleanup 
code in the new test a bit, and as Éric and Ammar mentioned here and in review, 
it could be interesting to use TextIOWrapper instead (though we'd probably only 
make that change in 3.9).  If you're interesting in doing a follow-up PR, it 
can either be attached to this issue (in spite of it being closed) or a new 
issue opened.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset b05fbe9f374bc660af3c589a1146b2026606d442 by Miss Islington (bot) 
in branch '3.8':
bpo-1812: Fix newline conversion when doctest.testfile loads from a package 
whose loader has a get_data method (GH-17385)
https://github.com/python/cpython/commit/b05fbe9f374bc660af3c589a1146b2026606d442


--

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset 9387678f8a580726aca5f836b2c50456f236ecbb by Miss Islington (bot) 
in branch '3.7':
bpo-1812: Fix newline conversion when doctest.testfile loads from a package 
whose loader has a get_data method (GH-17385)
https://github.com/python/cpython/commit/9387678f8a580726aca5f836b2c50456f236ecbb


--

___
Python tracker 

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



[issue40075] _tkinter PythonCmd fails to acquire GIL

2020-03-26 Thread Thomas Holder


Change by Thomas Holder :


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

___
Python tracker 

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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Does timespec fulfill this use case to always return microseconds?

https://docs.python.org/3/library/datetime.html#datetime.datetime.isoformat

Return a string representing the date and time in ISO 8601 format:
-MM-DDTHH:MM:SS.ff, if microsecond is not 0
-MM-DDTHH:MM:SS, if microsecond is 0

The optional argument timespec specifies the number of additional components of 
the time to include (the default is 'auto'). It can be one of the following:

'auto': Same as 'seconds' if microsecond is 0, same as 'microseconds' 
otherwise.
'hours': Include the hour in the two-digit HH format.
'minutes': Include hour and minute in HH:MM format.
'seconds': Include hour, minute, and second in HH:MM:SS format.
'milliseconds': Include full time, but truncate fractional second part to 
milliseconds. HH:MM:SS.sss format.
'microseconds': Include full time in HH:MM:SS.ff format.



./python
Python 3.9.0a4+ (heads/master:6723e933c4, Mar 21 2020, 06:54:01) 
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime(1, 1, 1).isoformat(timespec='auto')
'0001-01-01T00:00:00'
>>> datetime.datetime(1, 1, 1).isoformat(timespec='microseconds')
'0001-01-01T00:00:00.00'

--
nosy: +xtreak

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> We need to convert them.

Let me elaborate. Static types have multiple issues:

* Their lifetime is not well defined.
* It is not obvious when they are ready to be used.
* They are not destroyed at exit.
* They are incompatible with subinterpreters: each interpreter should have its 
own copy of a type, rather than static types are shared by all interpreters 
which cause problems with reference counting (require GIL or atomic operation).
* They are causing issues with stable ABI (limited C API): PEP 384.

--

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Dong-hee Na


New submission from Dong-hee Na :

Some of modules is not using PyType_FromSpec.
We need to convert them.

This changes can bring
- allow to destroy types at exit!
- allow subinterpreters to have their own "isolated" typ

--
messages: 365087
nosy: corona10, vstinner
priority: normal
severity: normal
status: open
title: Convert static types to PyType_FromSpec()

___
Python tracker 

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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +belopolsky, p-ganssle

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +18535
pull_request: https://github.com/python/cpython/pull/19175

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset e0b8101492f6c61dee831425b4d3dae39a953599 by Peter Donis in branch 
'master':
bpo-1812: Fix newline conversion when doctest.testfile loads from a package 
whose loader has a get_data method (GH-17385)
https://github.com/python/cpython/commit/e0b8101492f6c61dee831425b4d3dae39a953599


--

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18536
pull_request: https://github.com/python/cpython/pull/19176

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

What's New in Python 3.7 says:

> the insertion-order preservation nature of dict objects has been declared to 
> be an official part of the Python language spec.

Reference: 
https://mail.python.org/pipermail/python-dev/2017-December/151283.html

I just wanted to add a reference for this change. I wanted to check if it is ok 
to modify the doc: yes, it is :-)

--
nosy: +vstinner

___
Python tracker 

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



[issue40065] py39: remove deprecation note for xml.etree.cElementTree

2020-03-26 Thread Fred Drake


Fred Drake  added the comment:

The Python 2.7 documentation was not clear that xml.etree.cElementTree was 
optional, so users who didn't dive into the implementation or build process 
could easily not have known unless someone with a more limited installation 
used their code.

--

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread Zachary Ware


Zachary Ware  added the comment:

Thanks for the patch!

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset 96686c761d0587080effc113367431a0d396eb45 by Miss Islington (bot) 
in branch '3.8':
bpo-39879: Update datamodel docs to include dict ordering (GH-19006)
https://github.com/python/cpython/commit/96686c761d0587080effc113367431a0d396eb45


--

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset ea0eeb8d3a0544334f8836c98a761b2e3df2bd94 by Miss Islington (bot) 
in branch '3.7':
bpo-39879: Update datamodel docs to include dict ordering (GH-19006)
https://github.com/python/cpython/commit/ea0eeb8d3a0544334f8836c98a761b2e3df2bd94


--

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18534
pull_request: https://github.com/python/cpython/pull/19174

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +18533
pull_request: https://github.com/python/cpython/pull/19173

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset 59c644eaa72b0cc48302f59d66852c4ea8332eba by Lahfa Samy in branch 
'master':
bpo-39879: Update datamodel docs to include dict ordering (GH-19006)
https://github.com/python/cpython/commit/59c644eaa72b0cc48302f59d66852c4ea8332eba


--

___
Python tracker 

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



[issue40065] py39: remove deprecation note for xml.etree.cElementTree

2020-03-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The common idiom is

try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET

--

___
Python tracker 

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



[issue40065] py39: remove deprecation note for xml.etree.cElementTree

2020-03-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for catching this Fred. I am surprised that some code uses 
xml.etree.cElementTree without falling back to xml.etree.ElementTree. In Python 
3 you can just use xml.etree.ElementTree, in Python 2 you have to fallback to 
the Python implementation because the C implementation was optional.

--

___
Python tracker 

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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Alexander Bolshakov


New submission from Alexander Bolshakov :

isoformat function does not conform to the ISO 8601 and drops microseconds part 
if its value is 00.

The issue can be reproduced using the following code snippet:

for i in range(1,1000):
 timestamp=datetime.datetime.utcnow().isoformat()
 if len(timestamp)!=26:
 print(timestamp)

--
components: Library (Lib)
messages: 365077
nosy: Alexander Bolshakov
priority: normal
severity: normal
status: open
title: isoformat function drops microseconds part if its value is 00
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, 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



[issue40065] py39: remove deprecation note for xml.etree.cElementTree

2020-03-26 Thread Fred Drake


Fred Drake  added the comment:

Same core problem (module removed with insufficient document update), but a 
different action is needed for 3.8 and 3.9.

When I started testing an application with 3.9 and found one of the 
dependencies broken because it was relying directly on xml.etree.cElementTree, 
I had to dig into the history to determine that it was removed intentionally.  
Updated documentation would have helped.

I did file an issue on the dependency as well:
https://github.com/boto/botocore/issues/2002

--

___
Python tracker 

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



[issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> Hello guys,

Please try to find a more inclusive way to say hello: https://heyguys.cc/ ;-)

--

___
Python tracker 

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



[issue40065] py39: remove deprecation note for xml.etree.cElementTree

2020-03-26 Thread Manjusaka


Manjusaka  added the comment:

I will clean this

This issue looks like the same with https://bugs.python.org/issue40064

--
nosy: +Manjusaka

___
Python tracker 

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



[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2020-03-26 Thread Michael Felt


Michael Felt  added the comment:

Back again - I understood a lot less then, maybe more now..

iirc, get_platform() asin sysconfig.get_platform() and 
distutils.util.get_platform() are suppposed to return a suitable PEP425 tag 
that identifies the ABI of the running interpreter - eg.g, 32-bit even though 
operating on 64-bot OS and hardware.

As far as AIX goes, for years this was not the case. More recently (for Python 
3.9) the logic has been added so that the bitness of the interpreter can be 
identified.

i.e., on AIX `get_platform()` now returns:
'aix-5307-0747-64' - where the 64 (or 32) identifies the bitness of the 
interpreter.

So, my question now - are the PEP425 tags returned by other platforms adequate? 
If yes, then I see little reason to not close this issue as resolved 
(elsewhere).

--

___
Python tracker 

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



[issue38250] enum.Flag should be more set-like

2020-03-26 Thread Manjusaka


Manjusaka  added the comment:

1. not sure I gett the Point

2. not sure

3. absolutely yes

--
nosy: +Manjusaka

___
Python tracker 

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



[issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

2020-03-26 Thread Manjusaka


Manjusaka  added the comment:

Hello guys, I some ideas about this issue

First, maybe we should add a new API named cpu_usable_count(). I think it's 
more meaningful than the os.sched_getaffinity(0)

Second, more and more people use docker to run their app today. So people need 
an official way to get the environment info, not just cpu, but the memory,  the 
network traffic limit. Because the docker is based on the CGroup in Linux, 
maybe we can add a cgroup lib as an official supported lib.

but I'm not sure about this idea, because there are some problem.

1. the CGroup is only supported on Linux. I'm not sure that adding a 
platform-specific lib is a good idea

2. Many languages are not adding cgroup official yet. Maybe there are some 
languages are optimized for the cgroup (such as Java in JVM)

--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue40073] AIX: python3 points to "air"

2020-03-26 Thread Michael Felt


Michael Felt  added the comment:

I see that it is also incorrect for v3.5.9

What is surprising - is that the logic is okay for python-config -> 
python-config3.X -> python-config-3.Xm

root@x065:[/data/prj/python/python3-3.5.9/X32]ls -l opt/bin
total 8728
lrwxrwxrwx   1 root system8 Mar 26 13:14 2to3 -> 2to3-3.5
-rwxr-xr-x   1 bin  bin  95 Mar 26 10:47 2to3-3.5
-rwxr-xr-x   1 bin  bin 236 Mar 26 10:47 easy_install-3.5
lrwxrwxrwx   1 root system7 Mar 26 13:14 idle3 -> idle3.5
-rwxr-xr-x   1 bin  bin  93 Mar 26 10:47 idle3.5
-rwxr-xr-x   1 bin  bin 208 Mar 26 10:47 pip3
-rwxr-xr-x   1 bin  bin 208 Mar 26 10:47 pip3.5
lrwxrwxrwx   1 root system8 Mar 26 13:14 pydoc3 -> pydoc3.5
-rwxr-xr-x   1 bin  bin  78 Mar 26 10:47 pydoc3.5
lrwxrwxrwx   1 root system9 Mar 26 13:14 python3 -> python3.5
lrwxrwxrwx   1 root system   16 Mar 26 13:14 python3-config -> 
python3.5-config
lrwxrwxrwx   1 root system   17 Mar 26 13:14 python3.5-config -> 
python3.5m-config
-rwxr-xr-x   1 bin  bin 4429283 Mar 26 10:45 python3.5m
-rwxr-xr-x   1 bin  bin3005 Mar 26 10:47 python3.5m-config
lrwxrwxrwx   1 root system   10 Mar 26 13:14 pyvenv -> pyvenv-3.5
-rwxr-xr-x   1 bin  bin 230 Mar 26 10:47 pyvenv-3.5

--

___
Python tracker 

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



[issue40073] AIX: python3 points to "air"

2020-03-26 Thread Michael Felt


Change by Michael Felt :


--
versions: +Python 3.5

___
Python tracker 

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



[issue40069] Clear .lst files for AIX

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

Ok. I merged your PR.

I don't think that it's worth it to backport to 3.7 and 3.8. "git clean -fdx" 
can be used for stable branches to remove *all* files not tracked by Git (not 
only .lst files).

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



[issue40069] Clear .lst files for AIX

2020-03-26 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 1b6b0e78fef2549cc9b447cbededb638f7388e02 by Batuhan Taşkaya in 
branch 'master':
bpo-40069: Clear out .lst files on make clean (GH-19169)
https://github.com/python/cpython/commit/1b6b0e78fef2549cc9b447cbededb638f7388e02


--

___
Python tracker 

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



  1   2   >