[issue46005] [doc] replace 'distutils' examples with 'setuptools'

2021-12-12 Thread Elmir


Elmir  added the comment:

I think it would be very helpful to include an example how to build with 
setuptools as well. As it in the end boils down to two simple steps:

* install 'setuptools' package
* change import line:

"from distutils.core import setup, Extension" 

to

"from setuptools import setup, Extension"

It took me a lot of time to figure out that 'setuptools' have this 'drop-in 
replacement' API for distutils. IMHO, it's not very well documented anywhere.

I can make a PR with such addition, if you thinks it's good idea.

--

___
Python tracker 

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



[issue46057] argparse: embedded groups may prevent options from being in help output

2021-12-12 Thread László Attila Tóth

László Attila Tóth  added the comment:

According to the documentation only the ArgumentParser has add_argument_group 
option, which is not true, the code allows me to add a subgroup to any group. 
The complete example is in issue 4608: https://bugs.python.org/issue46058

If add_argument_group shouldn't be used for a regular argument group,
I suggest the following change: _ActionsContainer.add_argument_group should 
return self if title is not specified and raise error if 
add_argument_group("...") is called on a group with title.

This is close to the originally intended, documented behaviour.

I'd still allow groups without title in mutually exclusive groups and vice 
versa.

--

___
Python tracker 

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



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2021-12-12 Thread Larry Hastings


Larry Hastings  added the comment:

I can confirm that the behavior is fixed in ZFS on Linux.  My test case C 
program now prints "Everything is okay." when run on a ZFS partition on Linux, 
and test_touch_common from the current tree passes every time.  ZFS fixing this 
was the best possible outcome.

I'll go ahead and just close it now--why wait!  If somebody confirms that the 
test still fails on FreeBSD, please open a new issue.

Thanks for checking in, Irit!

--
stage: patch review -> resolved
status: pending -> closed

___
Python tracker 

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



[issue46060] Clarify asyncio.new_event_loop return value

2021-12-12 Thread Paul Bryan


Change by Paul Bryan :


--
keywords: +patch
nosy: +pbryan
nosy_count: 2.0 -> 3.0
pull_requests: +28299
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30078

___
Python tracker 

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



[issue46060] Clarify asyncio.new_event_loop return value

2021-12-12 Thread Paul Bryan


New submission from Paul Bryan :

Currently, the documentation states it creates a new event loop; it should also 
indicate that it returns the newly created event loop.

--
assignee: docs@python
components: Documentation
messages: 408425
nosy: docs@python, pbryan2
priority: normal
severity: normal
status: open
title: Clarify asyncio.new_event_loop return value
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue46056] Cannot use virtual environment on Windows 10 in corporate security settings

2021-12-12 Thread Eryk Sun


Eryk Sun  added the comment:

Try using symlinks if you're allowed, e.g. `python -m venv --symlinks `.

Note that a virtual environment created with symlinks is unreliable in some 
cases because ShellExecute[Ex]W() eagerly resolves a symlink before calling 
CreateProcessW().

Also, you won't be able to use EXE script wrappers in an active environment due 
to the security restrictions in place on your system. You'll need to use 
`python -m ` alternative commands, such as `python -m pip` instead of 
`pip`.

--
components:  -Windows
nosy: +eryksun

___
Python tracker 

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



[issue20741] Documentation archives should be available also in tar.xz format

2021-12-12 Thread Ned Deily


Ned Deily  added the comment:

Documentation downloads are still built and provided for each release (as 
linked to from https://www.python.org/doc/ and 
https://www.python.org/doc/versions/) as well as daily for the heads of each 
active bugfix and feature branch, in each case via the "Download these 
documents" link on the top page of the release/branch documentation set, for  
example, https://docs.python.org/3/ -> https://docs.python.org/3/download.html. 
The downloadable doc formats are still .zip and .bz2 while cPython source 
archives are still .tgz and .xz formats. Julien Palard (@mdk) is the release 
team documentation expert.  Julien, what do you think?

--
assignee:  -> mdk
components: +Documentation
nosy: +mdk, ned.deily
resolution: out of date -> 
status: pending -> open
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5

___
Python tracker 

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



[issue46052] IDLE: make Ctrl, Alt + IME non-ascii letter work on Windows

2021-12-12 Thread Eryk Sun

Eryk Sun  added the comment:

I think the following wiki article still applies even though it was first 
discussed in 2003: "KeySyms on platforms other than X11" [1]. In particular, it 
states the following:

On Windows and MacOS X Tk only supports keysyms correctly for a 
limited number of keys, namely special keys, and the ranges of ASCII
and ISO-8859-1 (support of ISO-8859-1 on MacOS X since 8.4.2).

I can confirm the result for the Russian keyboard mapping. The value of keysym 
is "??", even when combined with the control key. 

x:
char: 'ч', ord: 0447, code: 0058, sym: '??', num: 0447.
Ctrl+x:
char: '\x18', ord: 0018, code: 0058, sym: '??', num: 0447.
c:
char: 'с', ord: 0441, code: 0043, sym: '??', num: 0441.
Ctrl+c:
char: '\x03', ord: 0003, code: 0043, sym: '??', num: 0441.
v:
char: 'м', ord: 043c, code: 0056, sym: '??', num: 043c.
Crl+v:
char: '\x16', ord: 0016, code: 0056, sym: '??', num: 043c.

(I modified the keyevent function from msg408400 to use hexadecimal and repr 
formatting.)

I checked Ubuntu 20.04 with a Russian keyboard layout. It seems in Linux the 
combination with the control key changes keysym and keysym_num to use the ASCII 
characters "x", "c", and "v": 

x:
char: 'ч', ord: 0447, code: 0035, sym: 'Cyrillic_che', num: 06de.
Ctrl+x:
char: '\x18', ord: 0018, code: 0035, sym: 'x', num: 0078.
c:
char: 'с', ord: 0441, code: 0036, sym: 'Cyrillic_es', num: 06d3.
Ctrl+c:
char: '\x03', ord: 0003, code: 0036, sym: 'c', num: 0063.
v:
char: 'м', ord: 043c, code: 0037, sym: 'Cyrillic_em', num: 06cd.
Crl+v:
char: '\x16', ord: 0016, code: 0037, sym: 'v', num: 0076.

---
[1] https://wiki.tcl-lang.org/page/KeySyms+on+platforms+other+than+X11

--

___
Python tracker 

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



[issue46052] IDLE: make Ctrl, Alt + IME non-ascii letter work on Windows

2021-12-12 Thread Eryk Sun


Eryk Sun  added the comment:

The alternate keyboard shortcuts for the clipboard work fine with a Russian 
keyboard layout:

   copy: Ctrl+Insert
cut: Shift+Delete
  paste: Shift+Insert

Some programs also support Alt+Backspace for undo (Ctrl+Z). Watch out with 
Shift+Delete in GUI shells, since it physically deletes files, bypassing the 
recycle bin (trash), instead of cutting the selected files to the clipboard.

--
nosy: +eryksun

___
Python tracker 

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



[issue37584] Multiple test failures with OSError: [Errno 84] Invalid or incomplete multibyte or wide character on ZFS with utf8only=on

2021-12-12 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Confirmed.

Repro: Do an ubuntu 20.04 install and choose "experimental zfs" support during 
install - https://ubuntu.com/blog/zfs-focus-on-ubuntu-20-04-lts-whats-new).  On 
such a zfs filesystem, the following tests from a ./python -m test.regrtest run 
fail in 3.10:

11 tests failed:
test_cmd_line_script test_httpservers test_imp test_import
test_ntpath test_os test_posixpath test_socket test_unicode_file
test_unicode_file_functions test_zipimport

Move over to a tmpfs and all but test_httpservers now pass.  test_httpservers 
tries to create such a path on /tmp

==
ERROR: test_undecodable_filename 
(test.test_httpservers.SimpleHTTPServerTestCase)
--
Traceback (most recent call last):
  File "/home/greg/test/cpython/Lib/test/test_httpservers.py", line 400, in 
test_undecodable_filename
with open(os.path.join(self.tempdir, filename), 'wb') as f:
OSError: [Errno 84] Invalid or incomplete multibyte or wide character: 
'/tmp/tmpnt9ch98x/@test_124227_tmp\udce7w\udcf0.txt'


I expect any filesystem mounted to reject non-UTF8 pathnames to cause similar 
failures.  Our test suite needs to detect this environment and skip these tests 
there.

--
nosy: +gregory.p.smith
versions: +Python 3.10, Python 3.11 -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



[issue16247] Report failing url in URLError?

2021-12-12 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

It is going to take a few weeks for me to get to my alerts, I will address
this as soon as I get to it .

Thanks for the triage, Irit.

On Mon, Dec 13, 2021, 12:31 AM Irit Katriel  wrote:

>
> Change by Irit Katriel :
>
>
> --
> status: open -> pending
>
> ___
> Python tracker 
> 
> ___
>

--
status: pending -> open

___
Python tracker 

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



Re: Isn't TypeError built in?

2021-12-12 Thread Chris Angelico
On Mon, Dec 13, 2021 at 12:31 PM Mike Dewhirst via Python-list
 wrote:
>
> Obviously something is wrong elsewhere but I'm not sure where to look.
> Ubuntu 20.04 with plenty of RAM.
>
>  def __del__(self):
>  try:
>  for context_obj in self._context_refs:
>  try:
>  delattr(context_obj, self._attr_name)
>  except AttributeError:
>  pass
>
>  except TypeError:# THIS IS LINE 96 IN THE APACHE2 ERROR
> LOG BELOW
>
>  # WeakSet.__iter__ can crash when interpreter is shutting
> down due
>  # to _IterationGuard being None.
>  pass
>
> [Mon Dec 13 01:15:49.875993 2021] [mpm_event:notice] [pid 1033:tid
> 140446449658944] AH00493: SIGUSR1 received.  Doing graceful restart
> [Mon Dec 13 01:15:49.878443 2021] [so:warn] [pid 1033] AH01574: module
> dav_module is already loaded, skipping
> [Mon Dec 13 01:15:49.885659 2021] [mpm_event:notice] [pid 1033:tid
> 140446449658944] AH00489: Apache/2.4.41 (Ubuntu) SVN/1.13.0
> OpenSSL/1.1.1f mod_wsgi/4.6.8 Python/3.8 configured -- resuming normal
> operations
> [Mon Dec 13 01:15:49.885664 2021] [core:notice] [pid 1033:tid
> 140446449658944] AH00094: Command line: '/usr/sbin/apache2'
> Exception ignored in: 
> Traceback (most recent call last):
>File "/usr/local/lib/python3.8/dist-packages/asgiref/local.py", line
> 96, in __del__
> NameError: name 'TypeError' is not defined
> Exception ignored in: 
> Traceback (most recent call last):
>File "/usr/local/lib/python3.8/dist-packages/asgiref/local.py", line
> 96, in __del__
> NameError: name 'TypeError' is not defined
>
> Any hints welcome ...

During interpreter shutdown, all kinds of things can go weird. The
order that things get destroyed isn't always clearly defined.

Is it possible to do the cleanup work before interpreter shutdown?
Alternatively: maybe take a local reference to the exception types you
need to refer to (just "AttributeError = AttributeError" at top level
should do it), which should keep them alive longer (I think). Worst
case, capture *all* exceptions, then look at e.__class__.__name__ and
match on that.

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


[issue40059] Provide a toml module in the standard library

2021-12-12 Thread Shantanu


Shantanu  added the comment:

Given that this currently seems blocked on the broad question of "how should 
additions and removals to the stdlib be managed", I'd like to not focus too 
hard just yet on the specifics of tomli. I assume it's unlikely, but for all we 
know, the SC could determine that all newly included modules have to be written 
from scratch, following along the lines of recent additions like zoneinfo, 
graphlib and importlib.metadata.

There's a lot we could bikeshed or debate... e.g., it's not even clear to me 
what a toml package in the stdlib would be named, never mind what it means for 
an unreleased version of a commonly used third party toml package dropping 
support for an imminently EOL version of Python. I'm possibly totally out of 
line, but in my head, the process would look something like this:

Step 1: Hear back from the SC about criteria and considerations for new modules 
in the stdlib
Step 2: Determine whether a TOML library *in the abstract* is something that 
would meet the outlined criteria (potentially e.g. is this something we even 
want? is this something we can maintain?)
Step 3: Determine if we have an implementation (written from scratch, copied, 
or derived from something pre-existing) that would meet the outlined criteria
Step 4: Do all the rest of the work to meet the outlined criteria (potentially 
e.g. go through PEP process, create proposed impl, write a backport, bikeshed 
api and name, etc)

I guess I have the following questions:

- Is my understanding correct that this issue is blocked on SC guidance?
- Is there anything we could do in advance of SC guidance that would be 
productive?
  Brett previously mentioned bringing it up with the author of tomli, as per 
https://github.com/hukkin/tomli/issues/141 they seem supportive
- Is there a good place to follow along or be notified of SC thoughts?
  I see no mention of stdlib changes in 
https://github.com/python/steering-council and the discuss thread linked above 
seems to have petered out.

--

___
Python tracker 

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



Re: Isn't TypeError built in?

2021-12-12 Thread Paul Bryan
Yes, TypeError is built in. The only thing I can think of is that
something has deleted `TypeError` from `__builtins__`? It would be
interesting to see what's in `__builtins__` when `__del__` is called.

On Mon, 2021-12-13 at 12:22 +1100, Mike Dewhirst via Python-list wrote:
> Obviously something is wrong elsewhere but I'm not sure where to
> look. 
> Ubuntu 20.04 with plenty of RAM.
> 
>  def __del__(self):
>  try:
>  for context_obj in self._context_refs:
>  try:
>  delattr(context_obj, self._attr_name)
>  except AttributeError:
>  pass
> 
>  except TypeError:        # THIS IS LINE 96 IN THE APACHE2
> ERROR 
> LOG BELOW
> 
>  # WeakSet.__iter__ can crash when interpreter is
> shutting 
> down due
>  # to _IterationGuard being None.
>  pass
> 
> [Mon Dec 13 01:15:49.875993 2021] [mpm_event:notice] [pid 1033:tid 
> 140446449658944] AH00493: SIGUSR1 received.  Doing graceful restart
> [Mon Dec 13 01:15:49.878443 2021] [so:warn] [pid 1033] AH01574:
> module 
> dav_module is already loaded, skipping
> [Mon Dec 13 01:15:49.885659 2021] [mpm_event:notice] [pid 1033:tid 
> 140446449658944] AH00489: Apache/2.4.41 (Ubuntu) SVN/1.13.0 
> OpenSSL/1.1.1f mod_wsgi/4.6.8 Python/3.8 configured -- resuming
> normal 
> operations
> [Mon Dec 13 01:15:49.885664 2021] [core:notice] [pid 1033:tid 
> 140446449658944] AH00094: Command line: '/usr/sbin/apache2'
> Exception ignored in: 
> Traceback (most recent call last):
>    File "/usr/local/lib/python3.8/dist-packages/asgiref/local.py",
> line 
> 96, in __del__
> NameError: name 'TypeError' is not defined
> Exception ignored in: 
> Traceback (most recent call last):
>    File "/usr/local/lib/python3.8/dist-packages/asgiref/local.py",
> line 
> 96, in __del__
> NameError: name 'TypeError' is not defined
> 
> Any hints welcome ...
> 
> Thanks
> 
> Mike
> 
> -- 
> Signed email is an absolute defence against phishing. This email has
> been signed with my private key. If you import my public key you can
> automatically decrypt my signature and be sure it came from me. Just
> ask and I'll send it to you. Your email software can handle signing.
> 

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


Isn't TypeError built in?

2021-12-12 Thread Mike Dewhirst via Python-list
Obviously something is wrong elsewhere but I'm not sure where to look. 
Ubuntu 20.04 with plenty of RAM.


    def __del__(self):
    try:
    for context_obj in self._context_refs:
    try:
    delattr(context_obj, self._attr_name)
    except AttributeError:
    pass

    except TypeError:        # THIS IS LINE 96 IN THE APACHE2 ERROR 
LOG BELOW


    # WeakSet.__iter__ can crash when interpreter is shutting 
down due

    # to _IterationGuard being None.
    pass

[Mon Dec 13 01:15:49.875993 2021] [mpm_event:notice] [pid 1033:tid 
140446449658944] AH00493: SIGUSR1 received.  Doing graceful restart
[Mon Dec 13 01:15:49.878443 2021] [so:warn] [pid 1033] AH01574: module 
dav_module is already loaded, skipping
[Mon Dec 13 01:15:49.885659 2021] [mpm_event:notice] [pid 1033:tid 
140446449658944] AH00489: Apache/2.4.41 (Ubuntu) SVN/1.13.0 
OpenSSL/1.1.1f mod_wsgi/4.6.8 Python/3.8 configured -- resuming normal 
operations
[Mon Dec 13 01:15:49.885664 2021] [core:notice] [pid 1033:tid 
140446449658944] AH00094: Command line: '/usr/sbin/apache2'

Exception ignored in: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/asgiref/local.py", line 
96, in __del__

NameError: name 'TypeError' is not defined
Exception ignored in: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/asgiref/local.py", line 
96, in __del__

NameError: name 'TypeError' is not defined

Any hints welcome ...

Thanks

Mike

--
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Just
ask and I'll send it to you. Your email software can handle signing.



OpenPGP_signature
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue46052] IDLE: make Ctrl, Alt + IME non-ascii letter work on Windows

2021-12-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I closed #31244 as a duplicate of this.

The modifier code for tkinter.Event.__repr__ can be used to construct the 
modifier part of the reconstructed event sequence.  Just join with '-' instead 
of '|'.

--
title: Ctrl+C, C+V in tk.Text on Windows do not work with Cyrillic keys -> 
IDLE: make Ctrl,Alt + IME non-ascii letter work on Windows

___
Python tracker 

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



[issue31244] IDLE: work around shortcuts bug in Windows' IMEs and tk

2021-12-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

What makes IDLE different from other desktop apps is that is it written in 
Python, uses the tkinter wrapping of cross-platform tcl/tk, and allows users to 
customize nearly all hotkey shortcuts.  But tk only allows Ascii chars, with 
modifiers, for hotkeys.  This issue would be much easier if IDLE had a fixed 
set of bindings, or even a fixed set for each major platform.

Issue 46052 is a duplicate of this.  In experiments reported there, using the 
Win10 Russian IME, I determined that the event.char for a Ctrl + letter-key 
combination is the corresponding Ascii control character, even when switched to 
Russian.  The difference is that event.keysym is '??' instead of an ascii 
letter and event.keysym_num is the unicode ordinal of the russian letter 
instead of the ascii letter.  So ('c', 99) becomes ('??', 1089).  I propose on 
#46052 to solve these issues by undoing this change and generating the event 
that would have happened in ENG mode.

--
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed
superseder:  -> Ctrl+C, C+V in tk.Text on Windows do not work with Cyrillic keys

___
Python tracker 

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



[issue46059] Typo in match Statement example

2021-12-12 Thread Vivek Vashist


New submission from Vivek Vashist :

Possible Typo in match statement example. 
https://docs.python.org/3/tutorial/controlflow.html#match-statements


BROKEN:
> python
Python 3.10.0b4 (default, Nov 15 2021, 18:26:05) [Clang 12.0.0 
(clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from enum import Enum
>>> class Color(Enum):
... RED = 0
... GREEN = 1
... BLUE = 2
...
>>> match color:
... case Color.RED:
... print("I see red!")
... case Color.GREEN:
... print("Grass is green")
... case Color.BLUE:
... print("I'm feeling the blues :(")
...
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'color' is not defined. Did you mean: 'Color'?


WORKING:

> python
Python 3.10.0b4 (default, Nov 15 2021, 18:26:05) [Clang 12.0.0 
(clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>
>>> from enum import Enum
>>> class Color(Enum):
... RED = 0
... GREEN = 1
... BLUE = 2
...
>>> match Color:
... case Color.RED:
... print("I see red!")
... case Color.GREEN:
... print("Grass is green")
... case Color.BLUE:
... print("I'm feeling the blues :(")

--
assignee: docs@python
components: Documentation
messages: 408415
nosy: docs@python, vivekvashist
priority: normal
severity: normal
status: open
title: Typo in match Statement example
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



[issue46052] Ctrl+C, C+V in tk.Text on Windows do not work with Cyrillic keys

2021-12-12 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This is a duplicate of #31244, but I continue here with more experiments using 
the code above.  I first confirmed that on Windows, CapsLock is really 'caps 
inversion.  Keycode 67 is the keycode for 'C' given in 
https://www.tcl.tk/man/tcl/TkCmd/keysyms.html (Ascii keyboards have the 
capitals on keycaps), but the chars 'c' and 'C', without and with shift, are 4 
different events.

char: c, ord: 99, code: 67, sym: c, num: 99.
code: 16, sym: Shift_L, num: 65505.
char: C, ord: 67, code: 67, sym: C, num: 67.
code: 20, sym: Caps_Lock, num: 65509.
char: C, ord: 67, code: 67, sym: C, num: 67.
code: 16, sym: Shift_L, num: 65505.
char: c, ord: 99, code: 67, sym: c, num: 99.

Next, the same keypresses with Ctrl added.  At least on Windows, Ctrl+c, 
Shift+Ctrl+c, Ctrl+C, and Shift+Ctrl+C are different events that have the same 
Ascii code but are differentiated by the key sym that would have been generated 
without the control modifier and the state of the Shift key.  (Note, for 
instance, that on the file menu, the addition of 'Shift' modifies 'Save' to 
'Save as').

code: 17, sym: Control_L, num: 65507.
char: , ord: 3, code: 67, sym: c, num: 99.
code: 17, sym: Control_L, num: 65507.
code: 16, sym: Shift_L, num: 65505.
char: , ord: 3, code: 67, sym: C, num: 67.
code: 20, sym: Caps_Lock, num: 65509.
code: 17, sym: Control_L, num: 65507.
char: , ord: 3, code: 67, sym: C, num: 67.
code: 17, sym: Control_L, num: 65507.
code: 16, sym: Shift_L, num: 65505.
char: , ord: 3, code: 67, sym: c, num: 99.

I loaded the Win 10 Russian package.  Repeating the no-ctrl block, we get the 
Cyrillic с and С.  The keysym field is '??' instead of the char because 
non-ascii letters are not valid as keysyms.  The keysym_num field is correct as 
if the keysym were the non-ascii letter.

char: с, ord: 1089, code: 67, sym: ??, num: 1089.
code: 16, sym: Shift_L, num: 65505.
char: С, ord: 1057, code: 67, sym: ??, num: 1057.
code: 20, sym: Caps_Lock, num: 65509.
char: С, ord: 1057, code: 67, sym: ??, num: 1057.
code: 16, sym: Shift_L, num: 65505.
char: с, ord: 1089, code: 67, sym: ??, num: 1089.

With Ctrl added, the generated character is still ascii 3, control-C and the 
keycode is still 67.  But the keysym and keysym_num are changed and they no 
longer match neither ascii 'c' or 'C'.  So the event matches neither the 
control-c or control-C events and the copy event is not invoked.

code: 17, sym: Control_L, num: 65507.
char: , ord: 3, code: 67, sym: ??, num: 1089.
code: 17, sym: Control_L, num: 65507.
code: 16, sym: Shift_L, num: 65505.
char: , ord: 3, code: 67, sym: ??, num: 1057.
code: 20, sym: Caps_Lock, num: 65509.
code: 17, sym: Control_L, num: 65507.
char: , ord: 3, code: 67, sym: ??, num: 1057.
code: 17, sym: Control_L, num: 65507.
code: 16, sym: Shift_L, num: 65505.
char: , ord: 3, code: 67, sym: ??, num: 1089.

The workaround considered in #31244 was to add key-x bindings specific to a 
particular Windows IME.  But this does not work as key sequences only allow 
ascii alphanumerics as keysyms.  (See 
https://www.tcl.tk/man/tcl8.6/TkCmd/bind.html, event details.)

There are non-ascii letter descriptions, such as 'Cyrillic_es' listed in 
https://www.tcl.tk/man/tcl/TkCmd/keysyms.html, but I suspect that these only 
work for native keyboards, with the non-ascii chars on the keycaps, that 
generate the keycodes specific to each key as listed in that doc.  Cyrillic_es 
has keycode 1747, not 67.  When I tried binding '' there was 
no TclError, but a Russian es, 'с' or 'С', did not invoke the handler.

Instead of expanding keybindings, we should consider collapsing events to undo 
the IME translation.  '??' is not a valid keysym, so there seems to be no 
generic 'non-Ascii IME letter' event.  But we could try replacing the keysym 
with the ascii char that would have been there if there were no IME.  The 
problem is that modifying the python event will not change the tk event.  Nor 
can it be used with event_generate.  Rather it has to be turn back into 
'sequence' string, taking into account the .state attribute.

Automated testing would be done by calling the key event handler with a 
synthesized Event instance.

EP: Since Key-X, where x is a non-ascii char, in not a legal sequence and 
cannot be bound to anything, it seems reasonable to ask that tk itself 
translate control key events into bindable control sequences.  They might 
object that this would break any code that catches '??' events in generic key 
handlers to do something language specific.  But perhaps they could add a 
non-default option.

--
assignee:  -> terry.reedy
stage:  -> test needed
versions: +Python 3.11 -Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 

[issue45995] string formatting: normalize negative zero

2021-12-12 Thread John Belmonte


John Belmonte  added the comment:

potential short-term solution for Decimal:

  if negative zero option is set and sign is negative:
  pre-round into a temp using mpd_qrescale()
  if mpd_iszero(temp):
  change sign to positive

--

___
Python tracker 

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



[issue22047] argparse improperly prints mutually exclusive options when they are in a group

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

While I was unable to reproduce this rendering error, there are other issues 
due to nesting of argument groups, and I wonder if we should deprecate those 
operations, along the lines of Paul's patch on this issue (but with deprecation 
rather than raising an exception).

Other related issues:  issue46057 (from today), issue16807, issue45690, 
issue43259, (there are probably more).

--
nosy: +rhettinger, serhiy.storchaka
status: pending -> open

___
Python tracker 

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



[issue46057] argparse: embedded groups may prevent options from being in help output

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

According to the docs it should be

>>> xgrp = parser.add_argument_group()

rather than

>>> xgrp = grp.add_argument_group()


This seems to work:



>>> parser = argparse.ArgumentParser()
>>> grp = parser.add_argument_group('Database settings')
>>> grp.add_argument('--db-config')
_StoreAction(option_strings=['--db-config'], dest='db_config', nargs=None, 
const=None, default=None, type=None, choices=None, help=None, metavar=None)
>>> xgrp = parser.add_argument_group()
>>> xgrp.add_argument('--db-password')
_StoreAction(option_strings=['--db-password'], dest='db_password', nargs=None, 
const=None, default=None, type=None, choices=None, help=None, metavar=None)
>>> parser.parse_args(['-h'])
usage: [-h] [--db-config DB_CONFIG] [--db-password DB_PASSWORD]

options:
  -h, --helpshow this help message and exit

Database settings:
  --db-config DB_CONFIG

  --db-password DB_PASSWORD

--

___
Python tracker 

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



[issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs

2021-12-12 Thread Jan Kaliszewski


Jan Kaliszewski  added the comment:

Sure. But don't you think there should be ``.__get__(a, type(a))`` rather than 
``.__get__(a, A)``? Then the whole statement would be true regardless of 
whether A is the actual type of a, or only a superclass of the type of a.

That would also be more consistent with the second point of the description, 
i.e., the one about *Instance Binding* (where we have 
``type(a).__dict__['x'].__get__(a, type(a))``).

Also, I believe that ``type(a).__mro__`` would be more consistent (than 
``a.__class__.mro``) with that point.

--

___
Python tracker 

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



[issue46057] argparse: embedded groups may prevent options from being in help output

2021-12-12 Thread László Attila Tóth

László Attila Tóth  added the comment:

The fix is something like this for _ArgumentGroup, but as the container may not 
be an _ArgumentGroup, it breaks the tests.

--- Lib/argparse.py
+++ Lib/argparse.py
@@ -1635,9 +1640,13 @@ def __init__(self, container, title=None, 
description=None, **kwargs):
 self._has_negative_number_optionals = \
 container._has_negative_number_optionals
 self._mutually_exclusive_groups = container._mutually_exclusive_groups
+self._container = container

 def _add_action(self, action):
-action = super(_ArgumentGroup, self)._add_action(action)
+if self.title:
+action = super(_ArgumentGroup, self)._add_action(action)
+else:
+action = self._container._add_action(action)
 self._group_actions.append(action)

--

___
Python tracker 

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



[issue39071] [doc] email.parser.BytesParser - parse and parsebytes work not equivalent

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

The relevant section in the docs is
https://docs.python.org/3/library/email.parser.html#email.parser.Parser
It currently doesn't advise against using the text parser in any way. 


At the top of the page, the second paragraph says:

"You can pass the parser a bytes, string or file object, and the parser will 
return to you the root EmailMessage instance of the object structure."

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, iritkatriel
title: email.parser.BytesParser - parse and parsebytes work not equivalent -> 
[doc] email.parser.BytesParser - parse and parsebytes work not equivalent
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 
3.7, Python 3.8

___
Python tracker 

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



[issue45985] AttributeError from @property inadvertantly flows into __getattr__

2021-12-12 Thread Alex Waygood


Change by Alex Waygood :


--
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue45729] [doc] "history and license" link has wrong target

2021-12-12 Thread Alex Waygood


Change by Alex Waygood :


--
nosy:  -AlexWaygood

___
Python tracker 

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



[issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue45840] Improve cross-references in the data model documentation

2021-12-12 Thread Alex Waygood


Change by Alex Waygood :


--
pull_requests: +28298
stage: backport needed -> patch review
pull_request: https://github.com/python/cpython/pull/30077

___
Python tracker 

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



[issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently

2021-12-12 Thread László Attila Tóth

László Attila Tóth  added the comment:

Checking the code the add_mutually_exclusive_group has only kwargs, so one part 
can be fixed (POC, breaks tests):

--- Lib/argparse.py
+++ Lib/argparse.py
@@ -1648,8 +1648,8 @@ def _remove_action(self, action):

 class _MutuallyExclusiveGroup(_ArgumentGroup):

-def __init__(self, container, required=False):
-super(_MutuallyExclusiveGroup, self).__init__(container)
+def __init__(self, container, required=False, title=None, 
description=None):
+super(_MutuallyExclusiveGroup, self).__init__(container, title, 
description)
 self.required = required
 self._container = container

@@ -2529,6 +2529,14 @@ def format_help(self):
 formatter.add_arguments(action_group._group_actions)
 formatter.end_section()

+for mutual_group in self._mutually_exclusive_groups:
+if not mutual_group.title:
+continue
+formatter.start_section(mutual_group.title)
+formatter.add_text(mutual_group.description)
+formatter.add_arguments(mutual_group._group_actions)
+formatter.end_section()
+
 # epilog
 formatter.add_text(self.epilog)

--

___
Python tracker 

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



[issue28884] Python 3.5.2 non-segfaulting bugs (from PyPy)

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

B7 passes on 3.11.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue6642] returning after forking a child thread doesn't call Py_Finalize

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.3, Python 
3.4

___
Python tracker 

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



[issue17120] Mishandled _POSIX_C_SOURCE and _XOPEN_SOURCE in pyconfig.h

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3, Python 3.4

___
Python tracker 

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



[issue34135] The results of time.tzname print broken.

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue17763] test_pydoc fails with the installed testsuite

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> third party
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



[issue46058] argparse: arg groups and mutually exclusive groups behave inconsitently

2021-12-12 Thread László Attila Tóth

New submission from László Attila Tóth :

I tried to add arguments to process DB-related settings, either from typing 
import Optional
from a file
or explicitly specifying them. In theory with nested groups (by 
add_argument_group
and add_mutually_exlusive_group) this can be implemented in almost 
straightforward way:


# test.py
import argparse

parser = argparse.ArgumentParser()
dbsettings = parser.add_argument_group('Database settings')
xdbgrp = dbsettings.add_mutually_exclusive_group(required=True)
xdbgrp.add_argument('--db-config')

grp = xdbgrp.add_argument_group(required=True)
grp.add_argument('--db-host')
grp.add_argument('--db-user')

xgrp = grp.add_mutually_exclusive_group()
xgrp.add_argument('--db-password')
xgrp.add_argument('--db-password-file')
parser.parse_args()


But there are issues:
1) the add_mutually_exclusive_group has only one optional parameter, 
required=False by default,
   so I cannot provide a title, I have to create yet another group (xdbgrp in 
the example)

2) I would expect the parser do the complete argument parsing and validation, 
so I don't
   need to implement certain steps. In this example I expect to have a 
--db-host arg
   if the --db-config is not specified. But if I add  ``required=True``, the 
argparse
   module expects that with --db-config the --db-host is also specified.
   In other words the xdbgrp mutually exclusive group fails to be mutually 
exclusive.

3) While xgrp behaves correctly, I cannot specify both --db-password and 
--db-password-file,
   I still can specify them with --db-config (see #2)

4) If I run it as: python3 test.py  --db-host x
   the command fails:
   usage: test.py [-h] --db-config DB_CONFIG --db-host DB_HOST [--db-user 
DB_USER]
   [--db-password DB_PASSWORD | --db-password-file DB_PASSWORD_FILE]
   test.py: error: one of the arguments --db-config is required

   So both --db-config and --db-host are required, the embedded group, grp 
fails to work,
   or prehaps again the xdbgrp fails (depends on the view)


5) Removing all required=True options the following is accepted:
   python3 test.py  --db-host x --db-config y
   so the xdbgrp mutually exclusive group again doesn't work.

6) Only xdbgrp is required, --db-host is not:
python3 test.py  --db-host x
usage: test.py [-h] --db-config DB_CONFIG [--db-host DB_HOST] [--db-user 
DB_USER]
[--db-password DB_PASSWORD | --db-password-file 
DB_PASSWORD_FILE]
test.py: error: one of the arguments --db-config is required
Again, the group embedded into a mutually exclusive group is not handled 
correctly

What is expected:
1) add_mutually_exclusive_group can have title/description, but unfortunately 
it is not
backward compatible

2) If I add a mutally exclusive group, it has XOR relation between its 
arguments and
   argument groups.

3) An argument group is handled as a single entity similar to an argument.
   Basically this is the same as #2.

4) A required argument affects only its argument group and the parent group
   and so on till the parser, but this chain stops at a mutually exclusive 
group,
   based on #2 and #3 .

--
components: Library (Lib)
messages: 408405
nosy: Laszlo.Attila.Toth
priority: normal
severity: normal
status: open
title: argparse: arg groups and mutually exclusive groups behave inconsitently
type: behavior
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



[issue16247] Report failing url in URLError?

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
status: open -> pending

___
Python tracker 

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



[issue20741] Documentation archives should be available also in tar.xz format

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
status: closed -> pending

___
Python tracker 

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



[issue20741] Documentation archives should be available also in tar.xz format

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
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



[issue20907] behavioral differences between shutil.unpack_archive and ZipFile.extractall

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue12165] [doc] clarify documentation of nonlocal

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

The doc has been updated by now and mentions "excluding globals".
I'm changing the title to reflect Terry's last comment.

One comment on his suggestion: I would remove/change "the nonlocal statement is 
similar to the global statement" because it's not obvious in what way it is 
similar just from the sentence, I think this is more confusing then helpful.

--
keywords: +easy -patch
nosy: +iritkatriel
title: Nonlocal does not include global; clarify doc -> [doc] clarify 
documentation of nonlocal
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4

___
Python tracker 

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



[issue46051] Make @atexit.register work for functions with arguments

2021-12-12 Thread quapka


quapka  added the comment:

I'm adding the tests I've written for this issue. First, the tests that do pass 
already: 
https://github.com/quapka/cpython/commit/913055932be4be1c61ac8383615045f8bceee4e8

Secondly, the ones that I'd expect to pass as well, but fail atm:
https://github.com/quapka/cpython/commit/916968fcebe0266baebce7209ef6db25c091b604

--

___
Python tracker 

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



[issue39306] Lib/configparser.py - RawConfigParser.set does not pass non-truthy values through to Interpolation.before_set

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

Hans, as mentioned on the PR, the merit of this change needs to be discussed. 
If you would like to pursue this, please begin by explaining the use case.

If you lost interest in this problem, let's close this issue.

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue25299] argparse: TypeError: __init__() takes at least 4 arguments (4 given)

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

This is working on 3.11:

>>> from argparse import ArgumentParser
>>> parser = ArgumentParser()
>>> parser.add_argument("--foo", help="foo", action='store_const')
_StoreConstAction(option_strings=['--foo'], dest='foo', nargs=0, const=None, 
default=None, type=None, choices=None, help='foo', metavar=None)
>>> parser.print_usage()
usage: [-h] [--foo]
>>> 

So I agree this issue can be closed.

--
nosy: +iritkatriel
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue37602] nonzero fixer problem

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +iritkatriel
nosy_count: 5.0 -> 6.0
pull_requests: +28297
status: pending -> open
pull_request: https://github.com/python/cpython/pull/30075

___
Python tracker 

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



[issue46052] Ctrl+C, C+V in tk.Text on Windows do not work with Cyrillic keys

2021-12-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

It appears that your particular keyboard program is translating Ctrl + letter 
key combinations to something other than the default Ascii Control-letter code. 
 Do you see the same problem with Notepad?  To test what tcl/tk and hence 
tkinter see, expand the test code to

import tkinter as tk
r = tk.Tk()
t = tk.Text(r)
t.pack()

def keyevent(e):
if c := e.char:
print(f'char: {c}, ord: {ord(c)}, ', end='')
print(f'code: {e.keycode}, sym: {e.keysym}, num: {e.keysym_num}.')
t.bind('', keyevent)

If I type c and ctrl + c in the tk box, I see the following in either the IDLE 
Shell or Command Prompt.

char: c, ord: 99, code: 67, sym: c, num: 99.
code: 17, sym: Control_L, num: 65507.
char: , ord: 3, code: 67, sym: c, num: 99.

I expect the third line will be different for you when you switch to Russian.

Your immediate fix is to use either the IDLE Edit menu or the right-click 
context menu to access copy and paste functions.  A longer term fix might be to 
get a different Russian keyboard program.

Assuming that I am correct above, I will make this an IDLE doc issue to add 
something about non-ascii keyboard issues, and include the test program above.

--
title: Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys -> Ctrl+C, 
C+V in tk.Text on Windows do not work with Cyrillic keys

___
Python tracker 

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



[issue46054] Incorrect error when parsing non-utf8 files

2021-12-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset c6d1c52c166968fb722ae26d44aa2c1c030dc613 by Pablo Galindo Salgado 
in branch 'main':
bpo-46054: Correct non-utf8 character tests in test_exceptions (GH-30074)
https://github.com/python/cpython/commit/c6d1c52c166968fb722ae26d44aa2c1c030dc613


--

___
Python tracker 

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



[issue46054] Incorrect error when parsing non-utf8 files

2021-12-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 94483f1e3cec182fabe19268e579f63045bc984a by Miss Islington (bot) 
in branch '3.10':
bpo-46054: Fix parsing error when parsing non-utf8 characters in source files 
(GH-30068) (GH-30069)
https://github.com/python/cpython/commit/94483f1e3cec182fabe19268e579f63045bc984a


--

___
Python tracker 

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



[issue27258] Exception in BytesGenerator.flatten

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

I am also unable to reproduce the issue on 3.11 with the attached script and 
input.

Please create a new issue if this problem still exists in a current python 
version (>= 3.9).

--
nosy: +iritkatriel
resolution:  -> works for me
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



[issue46057] argparse: embedded groups may prevent options from being in help output

2021-12-12 Thread László Attila Tóth

László Attila Tóth  added the comment:

And the leading part is the same for both the mutually exclusive and the 
argument groups:

usage: test1.py [-h] [--db-config DB_CONFIG] [--db-password DB_PASSWORD]

optional arguments:
  -h, --helpshow this help message and exit

Database settings:


--

___
Python tracker 

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



[issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys

2021-12-12 Thread E. Paine


E. Paine  added the comment:

Sorry for the spam...

OK, making the corresponding ctypes calls to the commands reported in 
issue31244 succeeds in the Python REPL, but the Tk text's behaviour doesn't 
change. In IDLE, the ctypes calls fail.

ctypes.windll.Kernel32.SetConsoleCP(1251)
ctypes.windll.Kernel32.SetConsoleOutputCP(1251)
locale.setlocale(locale.LC_ALL, 'Russian')

Hence, I don't think this a viable option. And it would not be viable for 
either this project, nor Tk, to write our own codepages, so I'm not sure 
whether it is worth raising it with the Tk team.

--

___
Python tracker 

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



[issue46057] argparse: embedded groups may prevent options from being in help output

2021-12-12 Thread László Attila Tóth

László Attila Tóth  added the comment:

Sorry, these are two bugs in fact. The current one, the help with minmal code:

import argparse

parser = argparse.ArgumentParser()
grp = parser.add_argument_group('Database settings')
grp.add_argument('--db-config')
xgrp = grp.add_argument_group()
xgrp.add_argument('--db-password')
parser.parse_args(['-h'])


The group's help output shows only --db-config option:

Database settings:
  --db-config DB_CONFIG

If I change the xgrp to be mutually exclusive group as:
xgrp = grp.add_mutually_exclusive_group()

then the output is the same as I expect for the previous code, too:

Database settings:
  --db-config DB_CONFIG
  --db-password DB_PASSWORD

--

___
Python tracker 

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



[issue1599254] mailbox: other programs' messages can vanish without trace

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11 - the test in mailbox-test.patch fails.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5

___
Python tracker 

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



[issue46054] Incorrect error when parsing non-utf8 files

2021-12-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +28296
pull_request: https://github.com/python/cpython/pull/30074

___
Python tracker 

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



[issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys

2021-12-12 Thread E. Paine


E. Paine  added the comment:

Actually, doing a bit more research, issue31244 came up (and more specifically 
msg300716). It was concluded there that the issue should not be fixed, though 
there was some C/C++ code reported in the last message that the OP claims could 
potentially solve the issue if added to either Tk or Python.

--

___
Python tracker 

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



[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +28294
pull_request: https://github.com/python/cpython/pull/30073

___
Python tracker 

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



[issue45635] Tidy up error handling in traceback.c / python run.c

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +28295
pull_request: https://github.com/python/cpython/pull/30073

___
Python tracker 

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



[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests:  -28293

___
Python tracker 

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



[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +iritkatriel
nosy_count: 3.0 -> 4.0
pull_requests: +28293
pull_request: https://github.com/python/cpython/pull/30073

___
Python tracker 

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



[issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys

2021-12-12 Thread E. Paine


E. Paine  added the comment:

I have reproduced the behaviour described in Wish (from the Tk head). Having 
tried other applications, I can also confirm that it is normal for inputs to be 
treated in this manner (e.g. using Ctrl-C on my Latin keyboard with the input 
device set to Russian copies to the clipboard). I'll take it up with the Tk 
team.

--

___
Python tracker 

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



[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy -patch

___
Python tracker 

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



[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

--
components: +Library (Lib)
nosy: +iritkatriel
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue46057] argparse: embedded groups may prevent options from being in help output

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

Please complete the bug report: How did you run this function, what output did 
you get and what output did you expect?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue46057] argparse: embedded groups may prevent options from being in help output

2021-12-12 Thread László Attila Tóth

New submission from László Attila Tóth :

I tried to use the following code where the --db-password is not shown in the 
--help output (Originally I wanted to use mutually exclusive groups but that 
feature also works strangely, so I changed them to regular groups).

def register_db_args(parser: argparse.ArgumentParser):
grp = parser.add_argument_group('Database settings')
grp.add_argument('--db-config', dest='db_config_file',
 help='Config file containg all details including password')

grp.add_argument('--db-host')
grp.add_argument('--db-port')
grp.add_argument('--db-user')

xgrp = grp.add_argument_group()
xgrp.add_argument('--db-password')
xgrp.add_argument('--db-password-env')
xgrp.add_argument('--db-password-file')

--
components: Library (Lib)
messages: 408388
nosy: Laszlo.Attila.Toth
priority: normal
severity: normal
status: open
title: argparse: embedded groups may prevent options from being in help output
type: behavior
versions: Python 3.10, Python 3.11, 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



[issue1525919] email package content-transfer-encoding behaviour changed

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

The encoding functions are now doing

orig = msg.get_payload(decode=True)

Does this fix the double-encoding issue?


This change was made in 
https://github.com/python/cpython/commit/00ae435deef434f471e39bea3f3ab3a3e3cd90fe

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



Re: Sad news: Fredrik Lundh ("Effbot") has passed away

2021-12-12 Thread Skip Montanaro
Like many others, I'm saddened to hear of Fredrik Lundh's passing. I
vaguely recall meeting him just once, probably at a Python workshop,
before they grew big enough to be called conferences. Effbot.org was
my Tkinter, ElemenTree, and PIL reference and cheat sheet.

My attention to Python development has waxed and waned over the years.
Most of the time, the trip through the Python folder in my mail
program was generally pretty quick, hitting the 'd' key far more often
than I'd stop to read a message. There are only a few people whose
messages I'd always read. Effbot was one. In my opinion, Fredrik ranks
up there with Guido, Tim Peters and Barry Warsaw.

I went to effbot.org and saw the "on hiatus" message. Searching
through The Wayback Machine, it seems it went on hiatus in late
November, 2020. The 11 November 2020 snapshot appears to be the last
usable version:

https://web.archive.org/web/2020145627/http://effbot.org/

Probably worth a bookmark in your browser.

Rest easy /F ...

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


[issue40477] Python Launcher app on macOS 10.15+ fails to run scripts

2021-12-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Pfff Apple's documentation is too incomplete.

In recent versions the apple events entitlement only works when the program 
also has an NSAppleEventsUsageDescription key in Info.plist with a string value 
that describes why it needs the entitlement, this information is shown to the 
user on first launch.

When I add this key to info.plist and resign the launcher works.

I forgot to create a screenshot of this and cannot recreate the system dialog 
that gets shown, probably documentement somewhere that I haven't found yet...

For now I used:

NSAppleEventsUsageDescription
Python Launcher needs this to run scripts in a Terminal window

This requires no code changes.

--

___
Python tracker 

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



[issue16594] SocketServer should set SO_REUSEPORT along with SO_REUSEADDR when present

2021-12-12 Thread AnLong


Change by AnLong :


--
keywords: +patch
nosy: +asaka
nosy_count: 2.0 -> 3.0
pull_requests: +28292
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30072

___
Python tracker 

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



[issue46056] Cannot use virtual environment on Windows 10 in corporate security settings

2021-12-12 Thread Eric V. Smith


Change by Eric V. Smith :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
title: Cannot use virtual environment on Windows 10 in cooperate security 
settings -> Cannot use virtual environment on Windows 10 in corporate security 
settings

___
Python tracker 

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



[issue46055] Speed up binary shifting operators

2021-12-12 Thread Xinhang Xu


Xinhang Xu  added the comment:

I post a comment to the PR showing its performance improvement. I paste it 
below. I think the result not bad.

-

I use timeit to measure time costs and any other operators or calls are 
excluded. For each testcase, the former is dcd2796 and the latter is this PR's 
base 036bbb1.

64-bit Release building. Run in Windows 10 1709 (64-bit)

python -m timeit " i = 1; i <<= 3; i >>= 3"  # small value (cost down by 36%)
500 loops, best of 5: 92.7 nsec per loop
200 loops, best of 5: 145 nsec per loop

python -m timeit " i = 1; i <<= 10; i >>= 10"  # medium value (-25%)
200 loops, best of 5: 114 nsec per loop
200 loops, best of 5: 151 nsec per loop

python -m timeit " i = 1; i <<= 100; i >>= 100"  # big value  (-12%)
100 loops, best of 5: 209 nsec per loop
100 loops, best of 5: 238 nsec per loop

--

___
Python tracker 

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



[issue40477] Python Launcher app on macOS 10.15+ fails to run scripts

2021-12-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

It looks like this is related to code signing and entitlements, in particular:

* On my system Terminal.app is in the "Automation" list in the Security & 
Privacy control panel, and none of the installed Python Launchers are
* The script let below works (assuming PyObjC is installed):
```
import ScriptingBridge

command = """cd '' && 
'/Library/Frameworks/Python.framework/Versions/3.10/bin/python3'  
'/Users/ronald/issuequery.py'  && echo Exit status: $? && exit 1"""

app = 
ScriptingBridge.SBApplication.applicationWithBundleIdentifier_("com.apple.Terminal")

app.activate()
res = app.doScript_in_(command, None)
print(res)
```

* Python Launcher does not work when launched normally
* Python Launcher *does* work when I run "/Applcations/Python 3.X/Python 
Launcher/Contents/MacOS/Python Launcher" in Terminal.app and try to open a 
python file using Python Launcher
  - I've tried this with 3 variants of Python Launcher: 3.9.7 from python.org 
installer, no modifications; 3.10.1 from python.org installer, stripped 
signature and resigned ad-hoc; 3.11 installed from source with ScriptingBridge.

As mentioned before I've experimented with ScriptingBridge in Python Launcher, 
replacing "doscript.m" by the code below:
```
#import 
#import 
#import "doscript.h"

extern int
doscript(const char *command)
{
NSObject* terminalApp = [SBApplication 
applicationWithBundleIdentifier:@"com.apple.Terminal"];
//[terminalApp activate];
NSObject* res = [terminalApp doScript:[NSString 
stringWithUTF8String:command] in:nil];

NSRunAlertPanel(@"script result", @"%@", @"ok",nil, nil, res);

return 0;
}
```

That's equivalent to the python code I posted earlier. This is not production 
quality code, it compiles with a warning about "doScript:in:" that can be 
avoided by a different way of using ScriptingBridge. That's irrelevant for this 
experiment though.

When I test the call to "doScript:in:" *fails* (returns nil) when launching the 
app regularly, and *succeeds* when running as a terminal command (as mentioned 
earlier).

--

___
Python tracker 

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



[issue6942] email.generator.Generator memory consumption

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

Ross, the link to your code no longer works. Do you still have it, and if so 
could you paste/upload it here?

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys

2021-12-12 Thread Anton Bryl


Anton Bryl  added the comment:

> Also, how do you make your keyboard a Cyrillic keyboard.

On Windows, just install a keyboard layout for e.g. Russian. As soon as you 
switch to it, all Ctrl+Letter combinations stop working. Switch back to EN, and 
everything's working again.

As the code is written in Latin alphabet, it's only rarely a problem, but, as I 
mentioned, sometimes one needs to edit string constants, and then it's an 
inconvenience (normally the exact same key combinations work).

--

___
Python tracker 

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



[issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys

2021-12-12 Thread Anton Bryl


Anton Bryl  added the comment:

Tried the tkinter example.
The exact same problem occurs there as well: when a Cyrillic layout is on, 
Ctrl+Letter combinations do not work (it's in fact not just Ctrl+C and Ctrl+V, 
but apparently all of them).

--

___
Python tracker 

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



[issue18778] email docstrings and comments use python 2 language (Unicode strings)

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
title: email docstrings and comments say about Unicode strings -> email 
docstrings and comments use python 2 language (Unicode strings)

___
Python tracker 

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



[issue46056] Cannot use virtual environment on Windows 10 in cooperate security settings

2021-12-12 Thread wolfgang kuehn


Change by wolfgang kuehn :


--
title: Cannot use virtual environment on Windows 10 in cooperate security 
settingss -> Cannot use virtual environment on Windows 10 in cooperate security 
settings
type:  -> behavior

___
Python tracker 

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



[issue46056] Cannot use virtual environment on Windows 10 in cooperate security settingss

2021-12-12 Thread wolfgang kuehn


New submission from wolfgang kuehn :

I just installed Python3.10.1 from the Windows 10 App Store. 
Most workflows depend on creating virtual environments, but (1)

python -m venv venv

# -> Error 1260: Windows cannot open this program because it has been 
prevented by a software restriction policy

However, a (2)

python -m venv --without-pip venv

completes, only to not allow execution of (3)

.\venv\Scripts\python.exe
# -> Error 1260: Windows cannot open this program because it has been 
prevented by a software restriction policy


Reason for this probably are the (not so unreasonable) cooperate Software 
Restriction Policy (in our case enforced by Applocker):
You are not allowed to execute from where you are allowed to write.

So basically Python is broken in many MS Windows cooperate settings. Cooperate 
meaning (Software Restriction Policies) + (Usage of Virtual Environments). 

And my feeling is that it does not need to be, the virtual environment 
implementation with those *.exe copies being a kludge, IMHO.


Note: (2) is reminiscent of bpo-45337, which was fixed with 3.9.

--
components: Installation
messages: 408380
nosy: wolfgang-kuehn
priority: normal
severity: normal
status: open
title: Cannot use virtual environment on Windows 10 in cooperate security 
settingss
versions: Python 3.10, 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



[issue40477] Python Launcher app on macOS 10.15+ fails to run scripts

2021-12-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

FWIW, I'm experimenting with using Scripting Bridge instead of raw Apple Events 
in Python Laucher.  Mostly to check if that fixes the issue because I can run 
scripts in Terminal using Scripting Bridge from a Python script using PyObjC.

Scripting Bridge would also result in slightly easier to read code. 


On my machine (M1 Mac Book running macOS 12.0.1) Python Launcher cannot start 
scripts (as described in this issue). Same when I strip code signatures (and 
ad-hoc sign without using the hardened runtime)

--

___
Python tracker 

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



[issue27920] Embedding python in a shared library fails to import the Python module

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

3.4 is no longer maintained. Please create a new issue if you are still having 
this problem on a current python version (>= 3.9).

--
resolution:  -> out of date
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue25668] Deadlock in logging caused by a possible race condition with "format"

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> wont fix
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue18778] email docstrings and comments say about Unicode strings

2021-12-12 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

issue15745 has been fixed in the meantime (about 6 years ago).

If nobody objects I will close this as out of date. If there is still a problem 
with the test is will be reported for a current python version.

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue22833] The decode_header() function decodes raw part to bytes or str, depending on encoded part

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue24224] test_msilib is inadequate

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

It seems that most of the tests in this script were written after this issue 
was created. If there is still need to extend them, it would help to elaborate 
here on what is still needed. Otherwise, we could close this.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue6634] [doc] sys.exit() called from threads other than the main one: undocumented behaviour

2021-12-12 Thread Irit Katriel


Irit Katriel  added the comment:

Since 3.8 we have threading.excepthook() so the situation is different now: 

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

I think it still makes sense to change the wording of the doc for sys.exit() a 
bit, and add a reference to the relevant section of the threading doc.

--
keywords: +easy
nosy: +iritkatriel
title: sys.exit() called from threads other than the main one: undocumented 
behaviour -> [doc] sys.exit() called from threads other than the main one: 
undocumented behaviour
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5

___
Python tracker 

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



[issue13966] Add disable_interspersed_args() to argparse.ArgumentParser

2021-12-12 Thread Roundup Robot


Change by Roundup Robot :


--
nosy: +python-dev
nosy_count: 5.0 -> 6.0
pull_requests: +28291
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30071

___
Python tracker 

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



[issue45684] `functools.singledispatchmethod` does not define `__class_getitem__`

2021-12-12 Thread Alex Waygood


Alex Waygood  added the comment:

Closing this, as I don't think the use case I presented is strong enough, and 
there are ultimately more important things to worry about.

--
resolution:  -> not a bug
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



[issue46055] Speed up binary shifting operators

2021-12-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Could you please show any microbenchmarking results?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45855] Replace PyImport_ImportModuleNoBlock with PyImport_ImportModule in std modules

2021-12-12 Thread Georg Brandl


Change by Georg Brandl :


--
status: open -> closed

___
Python tracker 

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



[issue45855] Replace PyImport_ImportModuleNoBlock with PyImport_ImportModule in std modules

2021-12-12 Thread Georg Brandl


Georg Brandl  added the comment:


New changeset f4095e53ab708d95e019c909d5928502775ba68f by Georg Brandl in 
branch 'main':
bpo-45855: document that `no_block` has no use anymore in PyCapsule_Import 
(#29665)
https://github.com/python/cpython/commit/f4095e53ab708d95e019c909d5928502775ba68f


--

___
Python tracker 

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



[issue44674] dataclasses should allow frozendict default value

2021-12-12 Thread Eric V. Smith


Eric V. Smith  added the comment:

@gianni: can you verify that your use case works in 3.11?

--

___
Python tracker 

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



[issue45855] Replace PyImport_ImportModuleNoBlock with PyImport_ImportModule in std modules

2021-12-12 Thread Georg Brandl


Change by Georg Brandl :


--
status: closed -> open

___
Python tracker 

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



[issue45855] Replace PyImport_ImportModuleNoBlock with PyImport_ImportModule in std modules

2021-12-12 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: PyCapsule_Import still using PyImport_ImportModuleNoBlock -> Replace 
PyImport_ImportModuleNoBlock with PyImport_ImportModule in std modules

___
Python tracker 

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



[issue45855] PyCapsule_Import still using PyImport_ImportModuleNoBlock

2021-12-12 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 41026c3155012d6ea50e01205c163b6739c675b8 by Kumar Aditya in 
branch 'main':
bpo-45855: Replaced deprecated `PyImport_ImportModuleNoBlock` with 
PyImport_ImportModule (GH-30046)
https://github.com/python/cpython/commit/41026c3155012d6ea50e01205c163b6739c675b8


--

___
Python tracker 

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



[issue45874] urllib.parse.parse_qsl does not parse empty query string with strict parsing

2021-12-12 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset e6fe10d34096a23be7d26271cf6aba429313b01d by Christian Sattler in 
branch 'main':
bpo-45874: Handle empty query string correctly in urllib.parse.parse_qsl 
(#29716)
https://github.com/python/cpython/commit/e6fe10d34096a23be7d26271cf6aba429313b01d


--
nosy: +asvetlov

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2021-12-12 Thread John Belmonte


John Belmonte  added the comment:

> For Decimal, we'd need to "own" the string formatting, taking that 
> responsibility away from mpdecimal, but there are already other reasons to do 
> that.

After some digging, I believe this is the background on forking pieces of 
mpdecimal (and why the existing source copy inside Python doesn't count as a 
fork):
  https://bugs.python.org/issue45708#msg405895
  https://github.com/python/cpython/pull/29438

If I understand correctly, the PR for supporting underscore separators in 
Decimal formatting is only taking control of generating a mpd_spec_t from the 
spec string.  Formatting itself is still done by mpd_qformat_spec().

So there's outstanding work to also pull the formatting code itself into 
_decimal.c.  (And this is wanted anyway to reconcile existing libmpdec 
formatting modifications:  
https://github.com/python/cpython/commit/298131a44896a4fec1ea829814ad52409d59aba5)

And this is all because vendors have the crazy practice of unbundling libmpdec 
from Python.  (If a project is bundling the source of another, there may be 
some reason...?)

--

___
Python tracker 

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