[issue44884] logging Formatter behavior when using msecs and braces : '{'

2021-08-10 Thread francois-xavier callewaert


New submission from francois-xavier callewaert :

```
>>> import logging
>>> logging.getLogger().handlers[0].setFormatter(logging.Formatter(fmt='{asctime}
>>>  {message}', style='{'))
>>> logging.error("hello")  
>>> 
>>> 
2021-08-11 01:04:54,972 hello  
```

Wait. I come from a place where we use '.' as a decimal separator ...


```
>>> logging.getLogger().handlers[0].setFormatter(logging.Formatter(fmt='{asctime}.{msecs:03.0f}
>>>  {message}', style='{', datefmt="%Y-%m-%d %H:%M:%S"))   
>>> 
>>>
>>> logging.error("hello")  
>>>
2021-08-11 01:06:27.471 hello
```

All very reasonable. I know my date time formatting and my brace formatting so 
I'm good or am I ...

```
>>> import time, math
>>> for i in range(2500): a= (lambda : (time.sleep(0.0004), 
>>> (logging.error("Whaaat!") )if math.modf(time.time())[0]>0.9995 else 0))()
... 
2021-08-11 01:26:40.1000 Whaaat!
```

You'll hopefully agree that formatting a msecs as 1000 is plain wrong.
Can I get around this ? the best / simplest, I've found is 

```
>>> logging.Formatter.default_msec_format = "%s.%03d"
>>> logging.getLogger().handlers[0].setFormatter(logging.Formatter(fmt='{asctime}
>>>  {message}', style='{'))
>>> for i in range(2500): a= (lambda : (time.sleep(0.0004), (logging.error("Now 
>>> that's ok") )if math.modf(time.time())[0]>0.9995 else 0))()
... 
2021-08-11 01:33:46.999 Now that's ok
```

Having to rely / teach /learn about "Old string formatting" in 2021 is not 
ideal.
Can you suggest something better ?

or would it be palatable to make a "careful" modification in 
logging/__init__.py (see below) ?

replace
```
self.msecs = (ct - int(ct)) * 1000
```
by
```
self.msecs = math.floor((ct - int(ct)) * 1000)   #requires importing math
```
or 
```
self.msecs = int((ct - int(ct)) * 1000) + 0.0
```

--
components: Library (Lib)
messages: 399371
nosy: fxcallewaert
priority: normal
severity: normal
status: open
title: logging Formatter behavior when using msecs and braces : '{'
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread meowmeowcat


meowmeowcat  added the comment:

> ``importlib.import_module("t")`` will raise ZeroDivisionError.

I've tested ``__import__`` with the same code, and it will raise 
ZeroDivisionError too.

--

___
Python tracker 

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



[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread meowmeowcat


meowmeowcat  added the comment:

Maybe we can add something like:

```
If the module cannot be imported,:exc:`ImportError` is usually raised.

.. note::
   
   Sometimes other errors are raised if the module cannot be imported 
successfully. See https://docs.python.org/3/library/exceptions.html for more 
information.

```

--

___
Python tracker 

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



[issue44883] configure --with-openssl-rpath=DIR too eager about existence of DIR

2021-08-10 Thread Elvis Pranskevichus


New submission from Elvis Pranskevichus :

https://bugs.python.org/issue43466 added a way to set OpenSSL rpath explicitly 
via --with-openssl-rpath=DIR, which is cool!  However, the current 
configuration code checks for the presence of the specified directory eagerly, 
which breaks setups where both OpenSSL and Python are being built at the same 
time, but not necessarily installed to the runtime location (think omnibus 
debs).  Unless there's a good reason why an eager check is needed, I think it 
should be dropped to ease packaging.

--
assignee: christian.heimes
components: Installation, SSL
messages: 399368
nosy: Elvis.Pranskevichus, christian.heimes
priority: normal
severity: normal
status: open
title: configure --with-openssl-rpath=DIR too eager about existence of DIR
versions: Python 3.10

___
Python tracker 

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



[issue44881] Consider integration of GC_UNTRACK with TRASHCAN

2021-08-10 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

Since C99 is now allowed, perhaps we should suggest that declarations go after 
Py_TRASHCAN_BEGIN, e.g.

mytype_dealloc(mytype *p)
{
Py_TRASHCAN_BEGIN(p, mytype_dealloc)
... declarations go here ...
... The body of the deallocator goes here, including all calls ...
... to Py_DECREF on contained objects. ...
Py_TRASHCAN_END// there should be no code after this
}

The only dealloc method that doesn't fit this pattern is subtype_dealloc() and 
that's because the object might not be a GC object.

Given the pattern, it occurs to me that that _Py_Dealloc() could do the 
trashcan begin/end work.  However, the authors of the dealloc methods would 
have to realize the special rules of the trashcan (e.g. no returns from the 
dealloc method body).  Also, there would be some overhead added to 
_Py_Dealloc() to check if the trashcan is supported.  E.g. checking a type flag.

Another idea would be to add a new slot for the method, e.g. tp_dealloc_trash.  
Then, _Py_Dealloc() could check if it exists and if so do the trashcan 
begin/end dance around it.  That would still add some overhead to _Py_Dealloc() 
so I think the current macros are the best approach.

--

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

2021-08-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset bfc2d5a5c4550ab3a2fadeb9459b4bd948ff61a2 by Pablo Galindo Salgado 
in branch 'main':
bpo-33930: Fix segfault with deep recursion when cleaning method objects 
(GH-27678)
https://github.com/python/cpython/commit/bfc2d5a5c4550ab3a2fadeb9459b4bd948ff61a2


--

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

2021-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26203
pull_request: https://github.com/python/cpython/pull/27720

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

2021-08-10 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 12.0 -> 13.0
pull_requests: +26202
pull_request: https://github.com/python/cpython/pull/27719

___
Python tracker 

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



[issue43976] Allow Python distributors to add custom site install schemes

2021-08-10 Thread xrcg


xrcg  added the comment:

s/possible/possibly/

--

___
Python tracker 

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



[issue43976] Allow Python distributors to add custom site install schemes

2021-08-10 Thread xrcg

xrcg  added the comment:

I haven’t read everything in this convo, but it looks like the changes proposed 
here cover all known downstream users other than Debian.

Is that correct?

Would these changes break Debian’s customizations substantially more than 
they’ll already be broken by the distutils deprecation refactoring?

If not, and if you don’t want to support the customizations that Debian wants, 
why not proceed with this enhancement to cover every other case, then deal with 
Debian later? In the short term, and possible for the long term, Debian can 
continue to patch the install routine, just in the new appropriate places to 
patch it. Debian wants something no one else wants, so they have to put in 
extra effort.

--

___
Python tracker 

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



[issue43976] Allow Python distributors to add custom site install schemes

2021-08-10 Thread Filipe Laíns

Filipe Laíns  added the comment:

Hi Jason, thank you.

I already tried 1), but could not convince Matthias on an alternative way to 
achieve the result that Debian wants. If you want, maybe you and I could try 
restarting those discussions.

2) is fine, but I am not the one that will me maintaining it, so it is a 
question for the core devs. I mean, I could commit to working on it and dealing 
with issues, but I am not a core dev, so it would always need to involve 
someone else.

3) does not really make sense as of the distutils deprecation. What needs to be 
patched are the install schemes, which are now outside distutils/setuptools.
I had hoped that we were able to have the mechanism proposed here in 3.10, so 
that people could just replace their distutils patches with it, but it was not 
possible.

I am not sure how to proceed.

--

___
Python tracker 

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



[issue44882] add FileInput.rollback() for in-place filters

2021-08-10 Thread Samwyse


Change by Samwyse :


--
title: add .rollback() for in-place filters -> add FileInput.rollback() for 
in-place filters

___
Python tracker 

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



[issue44445] Add `site-include` install scheme path in sysconfig

2021-08-10 Thread Filipe Laíns

Filipe Laíns  added the comment:

distutils will install the headers to 
{base}/include/python{py_version_short}{abiflags}/{dist_name}, and I think 
probably the best option would be to do the same. So, I think we could add a 
site-include scheme like I described and have the installers append a directory 
with the distribution name to it.

I think it would be reasonable to put all headers in a shared directory, 
site-include, given that we make sure the installers put them in a subdirectory 
for each distribution.

About standardizing pkg-config-like metadata, I don't think that's a great 
idea, as it would not replace the mechanisms you mentioned. It might replace 
some, but not all, as there could always be a use-case that needs more 
information or interaction than what our standard may provide.

Does this make sense to you?

--

___
Python tracker 

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



[issue44882] add .rollback() for in-place filters

2021-08-10 Thread Samwyse


New submission from Samwyse :

Sometimes bad things happen when processing an in-place filter, leaving an 
empty or incomplete input file and a backup file that needs to recovered. The 
FileInput class has all the information needed to do this, but it is in private 
instance variables.  A .rollback() method could close the current file and 
rename the backup file to its original name.  For example:

  for line in fileinput.input(inplace=True):
try:
  ...
except SomeError:
  fileinput.rollback(close=False)  # continue with next file

A simplistic implementation could be:

  def rollback(self, close=True):
if self._backupfilename:
  os.rename(self._backupfilename, self.filename)
  self._backupfilename = None
if close:
  self.close()
else:
  self.nextfile()

--
components: Library (Lib)
messages: 399361
nosy: samwyse
priority: normal
severity: normal
status: open
title: add .rollback() for in-place filters
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue44881] Consider integration of GC_UNTRACK with TRASHCAN

2021-08-10 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

For examples of bugs caused by forgetting the untrack calls, see bpo-31095.

--

___
Python tracker 

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



[issue44881] Consider integration of GC_UNTRACK with TRASHCAN

2021-08-10 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

Extensions that call PyObject_GC_UnTrack before calling Py_TRASHCAN_BEGIN will 
still work, they will just take a very minor performance hit.  I don't think it 
is worth the trouble to introduce new macros for that reason.  Extensions that 
really care about performance can wrap the call in a Python version ifdef.

There is an issue if someone writes and tests their extension with the new API, 
i.e. without having the explicit PyObject_GC_UnTrack() call in their dealloc 
method.  If they compile with an older Python, they likely get a crash.  If 
they compile with asserts enable, they would get an assert fail in 
_PyTrash_thread_deposit_object, i.e.:

_PyObject_ASSERT(op, !_PyObject_GC_IS_TRACKED(op));

I guess that's an argument for new macros.

--
stage: patch review -> needs patch

___
Python tracker 

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



[issue44881] Consider integration of GC_UNTRACK with TRASHCAN

2021-08-10 Thread Neil Schemenauer


Change by Neil Schemenauer :


--
keywords: +patch
pull_requests: +26201
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/27718

___
Python tracker 

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



[issue44881] Consider integration of GC_UNTRACK with TRASHCAN

2021-08-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

We probably will need a new set of macros because these macros are public IIRC 
correctly. Although as PyObject_GC_UnTrack has a check, we probably can just 
absorb it and let backwards compat work by being idempotent if called twice

--
nosy: +pablogsal

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

2021-08-10 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

I'm thinking that the explicit call to PyObject_GC_UnTrack should be made 
unnecessary by integrating it into the trashcan code.  That way, we avoid 
someone else running into this kind of bug in the future.  See bpo-44881.

--
nosy: +nascheme

___
Python tracker 

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



[issue44881] Consider integration of GC_UNTRACK with TRASHCAN

2021-08-10 Thread Neil Schemenauer


New submission from Neil Schemenauer :

The fix for bpo-33930 includes a somewhat mysterious comment:

// The Py_TRASHCAN mechanism requires that we be able to
// call PyObject_GC_UnTrack twice on an object.

I wonder if we can just integrate the untrack into the body of the trashcan 
code.  Then, the explicit call to untrack in the dealloc function body can be 
removed.  That removes the risk of incorrectly using the macro version.

I suspect the reason this was not done originally is because the original 
trashcan mechanism did not use the GC header pointers to store objects.  Now, 
any object that uses the trashcan *must* be a GC object.

--
messages: 399356
nosy: nascheme
priority: normal
severity: normal
stage: needs patch
status: open
title: Consider integration of GC_UNTRACK with TRASHCAN
type: enhancement

___
Python tracker 

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



[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Quellyn Snead


Quellyn Snead  added the comment:

> As to the actual problem, I think you're going to need to get out a debugger 
> and at least get a stack trace.

Here's my attempt:

$ gdb ./python
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "ppc64le-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /vast/home/quellyn/GIT/cpython/python...done.
(gdb) set args -E -S -m sysconfig --generate-posix-vars
(gdb) run
Starting program: /vast/home/quellyn/GIT/cpython/./python -E -S -m sysconfig 
--generate-posix-vars
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
Fatal Python error: take_gil: NULL tstate
Python runtime state: preinitialized

Current thread 0x20045fe0 (most recent call first):

Program received signal SIGSEGV, Segmentation fault.
0x105a3870 in ?? ()
Missing separate debuginfos, use: debuginfo-install 
nss-softokn-freebl-3.53.1-6.el7_9.ppc64le
(gdb) bt
#0  0x105a3870 in ?? ()
#1  0x1021c3a0 in dump_traceback (fd=2, tstate=0x105a3870, 
write_header=0)
at Python/traceback.c:805
#2  0x1021c620 in _Py_DumpTracebackThreads (fd=2, interp=0x105a2b90, 
current_tstate=0x105a3870) at Python/traceback.c:915
#3  0x101ee2ac in _Py_FatalError_DumpTracebacks (fd=2, interp=0x0, 
tstate=0x105a3870)
at Python/pylifecycle.c:1981
#4  0x101ee800 in fatal_error (prefix=0x0, msg=0x1041c7b4 "take_gil: 
NULL tstate", 
status=-1) at Python/pylifecycle.c:2159
#5  0x101ee8b0 in Py_FatalError (msg=0x1041c7b4 "take_gil: NULL tstate")
at Python/pylifecycle.c:2193
#6  0x1017ff04 in take_gil (ceval=0x1055c178 <_PyRuntime+584>, 
tstate=0x0)
at Python/ceval_gil.h:187
#7  0x10191db4 in PyEval_InitThreads () at Python/ceval.c:213
#8  0x101f3490 in pycore_create_interpreter (runtime=0x1055bf30 
<_PyRuntime>, 
config=0x105a2c40, interp_p=0x7fffd3c0) at Python/pylifecycle.c:550
#9  0x101f35e0 in pyinit_config (runtime=0x1055bf30 <_PyRuntime>, 
interp_p=0x7fffd918, 
config=0x7fffd5f0) at Python/pylifecycle.c:674
#10 0x101f3b38 in pyinit_core (runtime=0x1055bf30 <_PyRuntime>, 
src_config=0x7fffdac0, 
interp_p=0x7fffd918) at Python/pylifecycle.c:858
#11 0x101f3dc4 in Py_InitializeFromConfig (config=0x7fffdac0)
at Python/pylifecycle.c:1031
#12 0x1002409c in pymain_init (args=0x7fffde50) at Modules/main.c:78
---Type  to continue, or q  to quit---
#13 0x1002428c in pymain_main (args=0x7fffde50) at 
Modules/main.c:710
#14 0x10024394 in Py_BytesMain (argc=6, argv=0x7fffe2d8) at 
Modules/main.c:743
#15 0x10021e18 in main (argc=6, argv=0x7fffe2d8) at 
./Programs/python.c:16
(gdb)

--

___
Python tracker 

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



[issue33479] Document tkinter and threads

2021-08-10 Thread Mark Roseman


Change by Mark Roseman :


--
pull_requests: +26200
pull_request: https://github.com/python/cpython/pull/27717

___
Python tracker 

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



[issue34013] Inconsistent SyntaxError for print

2021-08-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I think that this was properly closed after the last fix.  There are multiple 
issues at play:

1. These parts of the Zen:
"Special cases aren't special enough to break the rules.
Although practicality beats purity.
...
In the face of ambiguity, refuse the temptation to guess."

2. The fact that a parser only reads and checks *python* syntax, while we 
humans have to make a special effort to avoid semantics.  The latter is 
especially true when the semantic is a special-case computing trope. Even if an 
identifier is semantically recognized as a function, its signature (call 
syntax) is specific to the function and is not part of python syntax.

3. The that with PEG parsing, there is no exact failure point. (Pablo just 
documented the PEG parser.  But, Pablo, where is it?  Not in HOWTO or index.)  
This is especially true when there are multiple errors, as in Andre's example.

As long as we only had one special case hint, which depended on the semantic 
knowledge that 'print' is almost certainly meant to mean print with the builtin 
function with a known call syntax, it was fairly easy to get the hint right, 
and in 3.11 we still have

>>> print """jsfl sf
... sjflsfj l
... sjflsjf
... sjfs fj
... sjlsfjlsjg
... """
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

But we now have more hints, and "print Hello world!" is syntactically the same 
as "a b c!", which gives the same error message.  Even if the first identifier 
is recognized as a function, and parenthesis are added, the result would be 
syntactically identical to "print(b c!)".  At this  point, it is syntactically 
ambiguous whether the fixed argument should be a string "'b c!'" or comma list 
"b, c".  Both are possible for print, but not all functions.  The 'correct' fix 
on only 'obvious' when we add knowledge of the semantics 'Hello, 'world', and 
'!' and the history of their concatenation, 'Hello world!' (but sometimes 
without '!' or capitalization, or with  replacing 'world'), in computing, 
and especially in the teaching of beginners in a particular language.

--

___
Python tracker 

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



[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Jack DeVries


Jack DeVries  added the comment:

Woah, oops, nevermind! I was confusing this with a different bpo in my
head. Sorry for the noise!

--

___
Python tracker 

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



[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Jack DeVries


Jack DeVries  added the comment:

I'm sure you are aware of this, but also note that the issue could be in
pandas or ibm-db, which include C extensions. I'm pretty sure those are
the only two dependencies you listed there that have C dependencies.

--

___
Python tracker 

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



[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

As to the actual problem, I think you're going to need to get out a debugger 
and at least get a stack trace.

--

___
Python tracker 

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



[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

> P.S. The tarball I attached before contains the configure and make output for 
> tests on multiple python version branches. I differentiated them by adding a 
> version identifier suffix (_3.7, _3.8, _3.9, _3.10, _3.11)

I was referring to the two files named exactly ".9" and ".10", which are hidden 
by default by the shell, since they begin with dots.

--

___
Python tracker 

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



[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Jack DeVries


Jack DeVries  added the comment:

There is a related failure message in the file name ".9" in the tarball (line 
175):

./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called without 
holding the GIL
Python runtime state: preinitialized

Current thread 0x20045fe0 (most recent call first):

/bin/sh: line 5: 122035 Aborted (core dumped) ./python -E -S -m 
sysconfig --generate-posix-vars
generate-posix-vars failed

--
nosy: +jack__d

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-08-10 Thread Jack DeVries


Jack DeVries  added the comment:

Hi All,

I'm pinging everyone here on the bpo because my GitHub PR has been through a 
lot of revision and review. Maybe it's close to being ready to merge (I hope)!

Feel free to take a look if you are interested: 
https://github.com/python/cpython/pull/26883

--

___
Python tracker 

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



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks everybody for review! ✨ 🍰 ✨

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



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset d27e2f4d118e7a9909b6a3e5da06c5ff95806a85 by Miss Islington (bot) 
in branch '3.9':
bpo-44854: Add .editorconfig file to help enforce `make patchcheck` (GH-27638) 
(GH-27714)
https://github.com/python/cpython/commit/d27e2f4d118e7a9909b6a3e5da06c5ff95806a85


--

___
Python tracker 

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



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7f88aeadc19b1d3ece4723efb240e6d6753570b9 by Miss Islington (bot) 
in branch '3.8':
bpo-44854: Add .editorconfig file to help enforce `make patchcheck` (GH-27638) 
(GH-27713)
https://github.com/python/cpython/commit/7f88aeadc19b1d3ece4723efb240e6d6753570b9


--

___
Python tracker 

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



[issue44880] Document code.replace()

2021-08-10 Thread STINNER Victor


STINNER Victor  added the comment:

It's documented at:
https://docs.python.org/dev/library/types.html#types.CodeType.replace

--

___
Python tracker 

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



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread miss-islington


miss-islington  added the comment:


New changeset a6808c6378ccfd732285ee20319658ac29eacf4c by Miss Islington (bot) 
in branch '3.10':
bpo-44854: Add .editorconfig file to help enforce `make patchcheck` (GH-27638)
https://github.com/python/cpython/commit/a6808c6378ccfd732285ee20319658ac29eacf4c


--

___
Python tracker 

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



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-10 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue39658] Include user scripts folder to PATH on Windows

2021-08-10 Thread Steve Dower


Steve Dower  added the comment:

Seems reasonable, contributions welcome.

I think it is not possible to add it as part of a per-machine install, since 
there's no way to specify a user folder in the system key (environment 
variables are not expanded as you might assume).

--
versions: +Python 3.11

___
Python tracker 

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



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26198
pull_request: https://github.com/python/cpython/pull/27713

___
Python tracker 

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



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26197
pull_request: https://github.com/python/cpython/pull/27712

___
Python tracker 

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



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44880] Document code.replace()

2021-08-10 Thread Irit Katriel

Irit Katriel  added the comment:

Ah thanks. I didn’t see that.

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



[issue44854] Add .editorconfig to the root directory

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset c0ab59f7de1906feee21c057ad433fad924d1e38 by Łukasz Langa in 
branch 'main':
bpo-44854: Add .editorconfig file to help enforce `make patchcheck` (GH-27638)
https://github.com/python/cpython/commit/c0ab59f7de1906feee21c057ad433fad924d1e38


--

___
Python tracker 

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



[issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE

2021-08-10 Thread Éric Araujo

Éric Araujo  added the comment:

Follow-up: #44860 is removing platlibdir from posix_user scheme

--

___
Python tracker 

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



[issue44880] Document code.replace()

2021-08-10 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

See: https://github.com/python/cpython/pull/17776

--
nosy: +BTaskaya

___
Python tracker 

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



[issue44880] Document code.replace()

2021-08-10 Thread Irit Katriel


Irit Katriel  added the comment:

See https://github.com/numpy/numpy/pull/19638#issuecomment-896124351

--

___
Python tracker 

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



[issue44880] Document code.replace()

2021-08-10 Thread Irit Katriel


New submission from Irit Katriel :

Core.replace was added in issue37032. Needs to be documented.

--
messages: 399336
nosy: iritkatriel, vstinner
priority: normal
severity: normal
status: open
title: Document code.replace()

___
Python tracker 

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



[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Quellyn Snead


Quellyn Snead  added the comment:

Hi Eric,

Looks like I didn't get the full output captured before. Sorry about that. The 
error appears when I run the make command:

```
[quellyn@cn2020 cpython]$ make -j
./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Fatal Python error: take_gil: NULL tstate
Python runtime state: preinitialized

Current thread 0x20045fe0 (most recent call first):
/bin/sh: line 5: 79067 Segmentation fault  (core dumped) ./python -E -S -m 
sysconfig --generate-posix-vars
generate-posix-vars failed
make: *** [pybuilddir.txt] Error 1
```

P.S. The tarball I attached before contains the configure and make output for 
tests on multiple python version branches. I differentiated them by adding a 
version identifier suffix (_3.7, _3.8, _3.9, _3.10, _3.11)

--

___
Python tracker 

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



[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Good question. Hopefully one of the documentation or importlib experts can 
chime in about that.  I may also have uncovered a new issue in importlib ;-)

Personally I'd say that documenting raising ImportError is still useful because 
that's the common exception, and an exception that's not mentioned in the rest 
of the documentation for importlib.  That does require a careful formulation to 
avoid implying that this the only exception that can be raised.

--

___
Python tracker 

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



[issue33349] 2to3 fails to parse async generators in non-async functions

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Zsolt! ✨ 🍰 ✨

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



[issue25782] CPython hangs on error __context__ set to the error itself

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:

Serhiy, I'm not closing this yet in case you'd like to finish implementing your 
PR. If not, feel free to close.

--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue14853] test_file.py depends on sys.stdin being unseekable

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Irit! ✨ 🍰 ✨

--
assignee: ezio.melotti -> iritkatriel
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



[issue14853] test_file.py depends on sys.stdin being unseekable

2021-08-10 Thread miss-islington


miss-islington  added the comment:


New changeset 4e0147ec50aa62315c5a9aa7c88c181f57aadf42 by Miss Islington (bot) 
in branch '3.10':
bpo-14853: add back the stdin test, skip if stdin is redirected (GH-27694)
https://github.com/python/cpython/commit/4e0147ec50aa62315c5a9aa7c88c181f57aadf42


--

___
Python tracker 

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



[issue44879] How to insert newline characters as normal characters while input()?

2021-08-10 Thread Larry Hastings


Larry Hastings  added the comment:

This is not a bug, you are asking for programming help.  Please don't use the 
Python issue tracker for programming help.  You won't get any, you'll just 
waste people's time.

--
components:  -Argument Clinic, FreeBSD, IO, Interpreter Core, Windows
nosy:  -koobs, paul.moore, prasechen, steve.dower, tim.golden, zach.ware
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: crash -> 
versions:  -Python 3.10, Python 3.11, 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



[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread meowmeowcat


meowmeowcat  added the comment:

Oh, I didn't realize that. Then maybe we don't need to document ImportError in 
https://docs.python.org/3/library/importlib.html#importlib.import_module?

--

___
Python tracker 

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



[issue44879] How to insert newline characters as normal characters while input()?

2021-08-10 Thread chen-y0y0

New submission from chen-y0y0 :

# Ɪ know, if Ɪ press enter key while input(), the method will be completed and 
return a str value.
# Ɪ am trying to insert newline characters as normal characters while input() 
method.
# The “normal characters” means:
# 1. It can be deleted by backspace(“\x7b”) or EOF or delete key.
# 2. It can be interprered as a normal byte.
# Ɪ tried by the readline module, it did work. But it may crash, like:
# Traceback (most recent call last):
#   File "", line 1, in 
# SyntaxError: multiple statements found while compiling a single statement

--
components: Argument Clinic, FreeBSD, IO, Interpreter Core, Windows
messages: 399327
nosy: koobs, larry, paul.moore, prasechen, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: How to insert newline characters as normal characters while input()?
type: crash
versions: Python 3.10, Python 3.11, 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



[issue44524] __name__ attribute in typing module

2021-08-10 Thread Yurii Karabas


Change by Yurii Karabas <1998uri...@gmail.com>:


--
pull_requests: +26195
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/27710

___
Python tracker 

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



[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user

2021-08-10 Thread Tzu-ping Chung

Tzu-ping Chung  added the comment:

I’ve updated the linked PR to change sysconfig instead to not use 
sys.platlibdir when generating the posix_user scheme. This means posix_user 
would behave the same in 3.9+ as 3.8 and prior.

--

___
Python tracker 

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



[issue25782] CPython hangs on error __context__ set to the error itself

2021-08-10 Thread miss-islington


miss-islington  added the comment:


New changeset d86bbe3cff0abefc13e5462cca1fb3344d4a5b52 by Miss Islington (bot) 
in branch '3.10':
bpo-25782: avoid hang in PyErr_SetObject when current exception has a cycle in 
its context chain (GH-27626)
https://github.com/python/cpython/commit/d86bbe3cff0abefc13e5462cca1fb3344d4a5b52


--

___
Python tracker 

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



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-10 Thread Mark Shannon


New submission from Mark Shannon :

On entering the interpreter (_PyEval_EvalFrameDefault) we need to check for 
tracing in order to record the call.
However, we don't do this cleanly resulting in slow dispatch to the 
non-quickened instruction on every call/next.

--
assignee: Mark.Shannon
messages: 399324
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Clumsy dispatching on interpreter entry.
type: performance
versions: Python 3.11

___
Python tracker 

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



[issue34013] Inconsistent SyntaxError for print

2021-08-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

If we change the priority of the error messages, which is unclear if is easily 
possible, the error will suggest that

print hello should be parenthesized as print (hello) Which if corrected will 
leave the "world" part out as a call followed to a name, and here the comma 
suggestion is a valid concern.

I understand the willingness to have a better error here, but I am not sure 
what we can improve here.

--

___
Python tracker 

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



[issue44869] MacOS Monterrey malloc issue

2021-08-10 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm afraid we cannot do a lot with the information you provided. I've just ran 
a full test run for a copy of 3.10rc1 installed using the universal2 installer 
and that doesn't have problem.

One way to find more information about what's going on is to use fault handler 
(e.g. PYTHONFAULTHANDLER=1 python3.10 ...), although that will just print a 
Python stack trace when the executable crashes.

Alternatively use a debugger to look at the C stack.

--

___
Python tracker 

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



[issue14853] test_file.py depends on sys.stdin being unseekable

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 897c87045c7435254fd330c6ea48204f056e4afc by Miss Islington (bot) 
in branch '3.9':
bpo-14853: add back the stdin test, skip if stdin is redirected (GH-27694) 
(GH-27698)
https://github.com/python/cpython/commit/897c87045c7435254fd330c6ea48204f056e4afc


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Note that importlib.import_module, and the import statement itself, can raise 
an arbitrary exception when that exception is raised while executing the module 
body.

This is easily observed by creating a module that just raises an error in its 
body:

# t.py
1/0
# EOF

``importlib.import_module("t")`` will raise ZeroDivisionError.

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread meowmeowcat


meowmeowcat  added the comment:

Thanks! I've opened a PR for this issue.

--

___
Python tracker 

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



[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread meowmeowcat


Change by meowmeowcat :


--
keywords: +patch
nosy: +meowmeowmeowcat
nosy_count: 3.0 -> 4.0
pull_requests: +26194
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27709

___
Python tracker 

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



[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user

2021-08-10 Thread Miro Hrončok

Miro Hrončok  added the comment:

Installing to ~/.local/lib works, installing to ~/.local/lib64 breaks things, 
as it is not on sys.path. I agree that restoring the pre-3.9 behavior in 
sysconfig to use lib instead of depending on sys.platlibdir is a better fix, at 
least for 3.9 and 3.10. We can redesign things in 3.11 (but I wouldn't).

--

___
Python tracker 

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



[issue34013] Inconsistent SyntaxError for print

2021-08-10 Thread Andre Roberge


Andre Roberge  added the comment:

Python 3.10.0rc1 ...

>>> print hello world!
  File "", line 1
print hello world!
  ^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

The hint given is not exactly helpful ...

(This example was in a discussion on Twitter 
https://twitter.com/cfbolz/status/1425036431974715400 about a previous handling 
of this invalid syntax case where it was mentioned that pypy verifies that the 
suggestion it makes actually yields syntactically valid code.)

--

___
Python tracker 

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



[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user

2021-08-10 Thread Tzu-ping Chung

Tzu-ping Chung  added the comment:

> I'm not sure if it should be used to install libraries in $HOME/.local/lib64 
> rather than $HOME/.local/lib. Previously, Fedora already used 
> $HOME/.local/lib and $HOME/.local/lib64 is not in the sys.path.

This was also briefly discussed in bpo-1294959, but did not go through since 
“changing posix_user should have no impact on end users”.

> Does the site module add $HOME/.local/lib64 to sys.path if it exists?

It does not, only lib is checked right now.

https://github.com/python/cpython/blob/c7ea1e3dcea6fbc9842463ce2b785b43501b1eaa/Lib/site.py#L288-L298



There are two possible solutions from what I can tell. We could just make 
posix_user match posix_prefix and always respect sys.platlibdir. This could be 
confusing to existing Python 3.9 users however since many of them already 
pip-installed things into ~/.local/lib and this would make their user-site 
packages split in two locations. The other would be to restore the pre-3.9 
behaviour in sysconfig to use lib instead of depending on sys.platlibdir. I 
don’t know who uses sysconfig right now and can’t say what would break, but for 
pip this would be less disruptive since it currently installs things into 
~/.local/ib (provided by distutils).

--

___
Python tracker 

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



[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user

2021-08-10 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok

___
Python tracker 

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



[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user

2021-08-10 Thread STINNER Victor


STINNER Victor  added the comment:

sys.platlibdir was introduced to install libraries in /usr/lib64 rather than 
/usr/lib. I'm not sure if it should be used to install libraries in 
$HOME/.local/lib64 rather than $HOME/.local/lib. Previously, Fedora already 
used $HOME/.local/lib and $HOME/.local/lib64 is not in the sys.path.

Does the site module add $HOME/.local/lib64 to sys.path if it exists?

--

___
Python tracker 

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



[issue25782] CPython hangs on error __context__ set to the error itself

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 6f4cdeddb97532144f93ca37b8b21451f445c7bf by Miss Islington (bot) 
in branch '3.9':
bpo-25782: avoid hang in PyErr_SetObject when current exception has a cycle in 
its context chain (GH-27626) (GH-27707)
https://github.com/python/cpython/commit/6f4cdeddb97532144f93ca37b8b21451f445c7bf


--

___
Python tracker 

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



[issue39658] Include user scripts folder to PATH on Windows

2021-08-10 Thread meowmeowcat


Change by meowmeowcat :


--
nosy: +meowmeowmeowcat

___
Python tracker 

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



[issue39658] Include user scripts folder to PATH on Windows

2021-08-10 Thread meowmeowcat


Change by meowmeowcat :


--
components: +Windows -Installation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue32599] Add dtrace hook for PyCFunction_Call

2021-08-10 Thread Mateusz Piotrowski


Change by Mateusz Piotrowski <0...@freebsd.org>:


--
nosy: +0mp

___
Python tracker 

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



[issue32750] lib2to3 log_error method behavior is inconsitent with documentation

2021-08-10 Thread Irit Katriel


Irit Katriel  added the comment:

If I understand correctly, this is not about an observed bug but about a 
confusion about which log_error function is being called. Can we close this or 
is there something to do here?

--
nosy: +iritkatriel
resolution:  -> not a bug
status: open -> pending

___
Python tracker 

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



[issue33479] Document tkinter and threads

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset c7dfbd2f413eb76cdbd44f44d698e9a399fdcbd5 by Miss Islington (bot) 
in branch '3.9':
bpo-33479: Remove unqualified tkinter threadsafe claim. (GH-6990) (GH-27705)
https://github.com/python/cpython/commit/c7dfbd2f413eb76cdbd44f44d698e9a399fdcbd5


--

___
Python tracker 

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



[issue33479] Document tkinter and threads

2021-08-10 Thread miss-islington


miss-islington  added the comment:


New changeset 2e1fef541c4a0a227af7bf1b59bfbccd3fb1a45e by Miss Islington (bot) 
in branch '3.10':
bpo-33479: Remove unqualified tkinter threadsafe claim. (GH-6990)
https://github.com/python/cpython/commit/2e1fef541c4a0a227af7bf1b59bfbccd3fb1a45e


--

___
Python tracker 

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



[issue44826] Specialize STORE_ATTR using PEP 659 machinery.

2021-08-10 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +26193
pull_request: https://github.com/python/cpython/pull/27708

___
Python tracker 

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



[issue25782] CPython hangs on error __context__ set to the error itself

2021-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26192
pull_request: https://github.com/python/cpython/pull/27707

___
Python tracker 

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



[issue25782] CPython hangs on error __context__ set to the error itself

2021-08-10 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 14.0 -> 15.0
pull_requests: +26191
pull_request: https://github.com/python/cpython/pull/27706

___
Python tracker 

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



[issue25782] CPython hangs on error __context__ set to the error itself

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset d5c217475c4957a8084ac3f92ae012ece5edc7cb by Irit Katriel in 
branch 'main':
bpo-25782: avoid hang in PyErr_SetObject when current exception has a cycle in 
its context chain (GH-27626)
https://github.com/python/cpython/commit/d5c217475c4957a8084ac3f92ae012ece5edc7cb


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue29077] build failure when enabling dtrace on FreeBSD

2021-08-10 Thread Mateusz Piotrowski


Mateusz Piotrowski <0...@freebsd.org> added the comment:

Patch for the FreeBSD Ports to fix the build failure: 
https://reviews.freebsd.org/D31489

--

___
Python tracker 

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



[issue33479] Document tkinter and threads

2021-08-10 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +26187
pull_request: https://github.com/python/cpython/pull/27704

___
Python tracker 

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



[issue33349] 2to3 fails to parse async generators in non-async functions

2021-08-10 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue33349] 2to3 fails to parse async generators in non-async functions

2021-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26190
pull_request: https://github.com/python/cpython/pull/27703

___
Python tracker 

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



[issue33479] Document tkinter and threads

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 6b37d0d5300813de31d66df1c77dad7e1027e4d8 by Terry Jan Reedy in 
branch 'main':
bpo-33479: Remove unqualified tkinter threadsafe claim. (GH-6990)
https://github.com/python/cpython/commit/6b37d0d5300813de31d66df1c77dad7e1027e4d8


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue33479] Document tkinter and threads

2021-08-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26188
pull_request: https://github.com/python/cpython/pull/27705

___
Python tracker 

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



[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

Rather than have us wading through all of the output, can you summarize the 
problem? After a brief look I don't see any actual compiler errors.

In make.out_3.9, at least, it looks like "generate-posix-vars failed", but I 
can't see why. What does

./python -E -S -m sysconfig --generate-posix-vars

produce?

Also, I'm not sure what the ".9" and ".10" files are supposed to be. Maybe 
accidentally included?

--
nosy: +eric.smith

___
Python tracker 

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



[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-10 Thread Ivan Marton


Change by Ivan Marton :


Added file: https://bugs.python.org/file50209/log_40469_single.py

___
Python tracker 

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



[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-10 Thread Ivan Marton


Ivan Marton  added the comment:

The assumed behaviour of TimedRotatingFileHandler is to rotate log files older 
than configured. Even when the script is executed multiple times.

self.rolloverAt (the variable that defines when the rollover should be 
performed) is set after each rollover and right after initializing the file 
handler instance.

If the instance is initialized once (like in your script) and a rollover is 
performed without having the object destroyed, the logger works fine, the 
rollover is done and the next round is scheduled properly.

The case is not so lucky if the script runs multiple time or the logger itself 
is initialized multiple times during one execution. In this case, since the 
MTIME is read each time when the TimedRotatingFileHandler's init is called, and 
the file is modified (by having a new line added to the end of the file). The 
next execution will read the new MTIME and will never perform any rollover.

I've slightly modified your example script to demonstrate these use-cases.

Example 1: Log a single line with the script, but execute it multiple times 
with delays between the execution!
In bash: for i in {1..101}; do python log_40469_single.py $i; sleep 30; done

Example 2: Log multiple lines, but reinitiate the logger object between the 
events!
See log_40469_new_instance.py

--
Added file: https://bugs.python.org/file50208/log_40469_new_instance.py

___
Python tracker 

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



[issue33337] Provide a supported Concrete Syntax Tree implementation in the standard library

2021-08-10 Thread Łukasz Langa

Change by Łukasz Langa :


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

___
Python tracker 

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



[issue33349] 2to3 fails to parse async generators in non-async functions

2021-08-10 Thread Łukasz Langa

Change by Łukasz Langa :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -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



[issue44872] FrameObject uses the old trashcan macros

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Irit! ✨ 🍰 ✨

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



[issue44872] FrameObject uses the old trashcan macros

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e9ec71ad2c7a1c83f03e172ba7c9f534912b8ba6 by Irit Katriel in 
branch '3.10':
bpo-44872: use new trashcan macros in framobject.c (GH-27683) (GH-27690)
https://github.com/python/cpython/commit/e9ec71ad2c7a1c83f03e172ba7c9f534912b8ba6


--

___
Python tracker 

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



[issue44872] FrameObject uses the old trashcan macros

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset ede1dc416de5eece02170e03387dc8496c2d00ae by Irit Katriel in 
branch '3.9':
bpo-44872: use new trashcan macros in framobject.c (GH-27683) (GH-27691)
https://github.com/python/cpython/commit/ede1dc416de5eece02170e03387dc8496c2d00ae


--

___
Python tracker 

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



[issue44872] FrameObject uses the old trashcan macros

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset b019ffed5debb13358a946a8e2d20594c7c181f3 by Irit Katriel in 
branch '3.8':
bpo-44872: use new trashcan macros in framobject.c (GH-27683) (GH-27692)
https://github.com/python/cpython/commit/b019ffed5debb13358a946a8e2d20594c7c181f3


--

___
Python tracker 

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



[issue41402] email: ContentManager.set_content calls nonexistent method encode() on bytes

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Johannes! ✨ 🍰 ✨

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



[issue39498] Signpost security considerations in library

2021-08-10 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue39498] Signpost security considerations in library

2021-08-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset fcbe8c63d78b5dd59470b5808d898b87d8ba0350 by Miss Islington (bot) 
in branch '3.9':
bpo-39498 Start linking the security warnings in the stdlib modules (GH-18272) 
(GH-27699)
https://github.com/python/cpython/commit/fcbe8c63d78b5dd59470b5808d898b87d8ba0350


--

___
Python tracker 

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



[issue39498] Signpost security considerations in library

2021-08-10 Thread miss-islington


miss-islington  added the comment:


New changeset d657da8155cc9611b901ea052f3eac28f99122b4 by Miss Islington (bot) 
in branch '3.10':
bpo-39498 Start linking the security warnings in the stdlib modules (GH-18272)
https://github.com/python/cpython/commit/d657da8155cc9611b901ea052f3eac28f99122b4


--

___
Python tracker 

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