[issue45148] ensurepip upgrade fails

2021-09-09 Thread baterflyrity


New submission from baterflyrity :

Upgrading pip via ensurepip unfortunately doesn't do anything wealthy.

```bash
user@host MINGW64 ~
$ pip list | grep pip
pip   21.2.3
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the 'C:\Python39\python.exe -m pip install 
--upgrade pip' command.

user@host MINGW64 ~
$ py -m ensurepip --upgrade
Looking in links: c:\Users\BATERF~1\AppData\Local\Temp\tmpuv4go5fy
Requirement already satisfied: setuptools in c:\python39\lib\site-packages 
(57.4.0)
Requirement already satisfied: pip in c:\python39\lib\site-packages (21.2.3)

user@host MINGW64 ~
$ pip list | grep pip
pip   21.2.3
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the 'C:\Python39\python.exe -m pip install 
--upgrade pip' command.
```

--
components: Windows
messages: 401436
nosy: baterflyrity, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: ensurepip upgrade fails
versions: Python 3.9

___
Python tracker 

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



[issue45148] ensurepip upgrade fails

2021-09-09 Thread baterflyrity


baterflyrity  added the comment:

See also: https://github.com/pypa/pip/issues/10453

--

___
Python tracker 

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



[issue45148] ensurepip upgrade fails

2021-09-09 Thread Paul Moore


Paul Moore  added the comment:

>From the documentation:

> upgrade indicates whether or not to upgrade an existing installation of an 
> earlier version of pip to the bundled version.

Note the comment "to the bundled version". This command will not access the 
internet (also noted in the documentation) and so will not get a later version 
than the bundled one.

To get the latest version of pip, you need to use

/path/to/your/python -m pip install --upgrade pip

Note:

1. You must *not* use the pip executable, you must use `python -m pip`, as the 
command will be upgrading the pip executable and Windows won't let you upgrade 
an executable you are using.
2. You should use the full path to your Python, or ensure by other means that 
you are running the correct copy of Python. This command only upgrades the copy 
of pip associated with the Python interpreter you use to run the upgrade 
command.

--

___
Python tracker 

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



[issue45148] ensurepip upgrade fails

2021-09-09 Thread Paul Moore


Change by Paul Moore :


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



[issue44344] Documentation for pow() should include the possibility of complex numbers as a return type

2021-09-09 Thread Mark Dickinson


Mark Dickinson  added the comment:

@Erik: Do you have a moment to look at the PR (GH-27853) and see if the 
proposed changes work for you?

--

___
Python tracker 

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



[issue45149] Cover directory and zipfile execution in __main__ module docs

2021-09-09 Thread Nick Coghlan


New submission from Nick Coghlan :

bpo-39452 covered significant improvements to the __main__ module documentation 
at https://docs.python.org/dev/library/__main__.html, making it a better 
complement to the CPython CLI documentation at 
https://docs.python.org/dev/using/cmdline.html#command-line

This follow up ticket covers the `__main__` variant that the previous ticket 
didn't cover: directory and zipfile execution (which underlies the utility of 
the `zipapp` stdlib module: https://docs.python.org/dev/library/zipapp.html)

The relevant info is present in the CLI and runpy.run_path documentation, so 
this ticket just covers adding that info to the `__main__` module docs.

--
messages: 401440
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Cover directory and zipfile execution in __main__ module docs
type: enhancement

___
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-09-09 Thread Nick Coghlan


Nick Coghlan  added the comment:

These changes are excellent - thanks for the patch!

Something even the updated version doesn't cover yet is directory and zipfile 
execution, so I filed bpo-45149 as a follow up ticket for that (the info does 
exist elsewhere in the documentation, so it's mostly just a matter of adding it 
to the newly expanded page, and deciding what new cross-references, if any, 
would be appropriate)

--
nosy: +ncoghlan

___
Python tracker 

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



[issue45148] ensurepip upgrade fails

2021-09-09 Thread baterflyrity


baterflyrity  added the comment:

> Note the comment "to the bundled version".

Thanks. Have not knew.

> 1. You must *not* use the pip executable, you must use `python -m pip`, as 
> the command will be upgrading the pip executable and Windows won't let you 
> upgrade an executable you are using.

You are wrong. Windows lets me update pip via pip.

Also must notice that ensurepip also deletes the current pip before installing 
it's own. So in case of "Permission denied" error it just deletes pip (see 
https://github.com/pypa/pip/issues/9527). Should i create new issue for this?

--

___
Python tracker 

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



[issue45148] ensurepip upgrade fails

2021-09-09 Thread Paul Moore


Paul Moore  added the comment:

> You are wrong. Windows lets me update pip via pip.

You have misinterpreted what you are seeing.

> Should i create new issue for this?

No, you should follow the correct process and use `python -m pip`, and not use 
pip directly.

--

___
Python tracker 

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



[issue45146] Add a possibility for asyncio.Condition to determine the count of currently waiting consumers

2021-09-09 Thread Mykola Mokhnach


Mykola Mokhnach  added the comment:

This improvement request is also applicable to other asyncio synchronization 
primitives that contain a waiting queue.

--

___
Python tracker 

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



[issue45017] move opcode-related logic from modulefinder to dis

2021-09-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What is wrong with this? Is such logic used in the dis module or any other 
module outside modulefinder?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue44129] zipfile: Add descriptive global variables for general purpose bit flags

2021-09-09 Thread Vincent Michel


Change by Vincent Michel :


--
nosy: +vxgmichel
nosy_count: 2.0 -> 3.0
pull_requests: +26670
pull_request: https://github.com/python/cpython/pull/28250

___
Python tracker 

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



[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread Vincent Michel


Change by Vincent Michel :


--
pull_requests: +26671
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28250

___
Python tracker 

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



[issue44129] zipfile: Add descriptive global variables for general purpose bit flags

2021-09-09 Thread Vincent Michel


Change by Vincent Michel :


--
pull_requests:  -26670

___
Python tracker 

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



[issue45017] move opcode-related logic from modulefinder to dis

2021-09-09 Thread Irit Katriel

Irit Katriel  added the comment:

The modulefinder module shouldn’t know what sequence of opcodes the compiler 
emits for import. 

For example, if the compiler changes you get a fairly high level test failure 
that you need to debug. After this refactor the test failure is more obviously 
pointing to what changed.

--

___
Python tracker 

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



[issue45148] ensurepip upgrade fails

2021-09-09 Thread baterflyrity


baterflyrity  added the comment:

>> You are wrong. Windows lets me update pip via pip.
>
>You have misinterpreted what you are seeing.

I don't know technical details but i can successfully use this command: `pip 
install --upgrade pip`.

>No, you should follow the correct process and use `python -m pip`, and not use 
>pip directly.

On pip's issues tracker i was suggested to use `ensurepip --upgrade`. Therefore 
it deletes global system's pip when is ran without sudo or admin rights (when 
the current version of pip is lower then bundled).

--

___
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-09-09 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 49acac00c08838d8080ce00d02c05284b94f8fb2 by Victor Stinner in 
branch 'main':
bpo-44860: Update test_sysconfig for posix_user platlib (GH-28235)
https://github.com/python/cpython/commit/49acac00c08838d8080ce00d02c05284b94f8fb2


--

___
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-09-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26672
pull_request: https://github.com/python/cpython/pull/28251

___
Python tracker 

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



[issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora Rawhide 3.x: Linux kernel 5.15 regression

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



[issue45136] test_sysconfig: test_user_similar() fails if sys.platlibdir is 'lib64'

2021-09-09 Thread Miro Hrončok

Miro Hrončok  added the comment:

The 3.10 backport is in https://github.com/python/cpython/pull/28251

--

___
Python tracker 

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



[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread Matthias Urlichs

Matthias Urlichs  added the comment:

Please do. However, I do think that changing the stdstream related ioctl calls 
also is a good idea, if only for code regularity/completeness sake. 

(Besides, nothing prevents somebody from starting a FUSE file system and then 
redirecting stdout to it …)

--

___
Python tracker 

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



[issue45148] ensurepip upgrade fails

2021-09-09 Thread Paul Moore


Paul Moore  added the comment:

> I don't know technical details but i can successfully use this command: `pip 
> install --upgrade pip`.

On Windows (and not under something like cygwin or msys, which have their own 
rules)? Anyway, it's not that important, the recommended approach is `python -m 
pip`, so whether using the non-recommended approach works or not doesn't really 
matter.

> On pip's issues tracker i was suggested to use `ensurepip --upgrade`.

Let's take that question back to the pip tracker. If you want the latest 
version of pip (as opposed to the bundled version) ensurepip isn't the right 
approach.

--

___
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-09-09 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 11103eb1f2199cacd8c2e29e3db0d19199885b45 by Miss Islington (bot) 
in branch '3.10':
bpo-44860: Update test_sysconfig for posix_user platlib (GH-28235) (GH-28251)
https://github.com/python/cpython/commit/11103eb1f2199cacd8c2e29e3db0d19199885b45


--

___
Python tracker 

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



[issue45148] ensurepip upgrade fails

2021-09-09 Thread baterflyrity


baterflyrity  added the comment:

OK, ive caught the salt of ensurepip.

--

___
Python tracker 

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



[issue45136] test_sysconfig: test_user_similar() fails if sys.platlibdir is 'lib64'

2021-09-09 Thread STINNER Victor


STINNER Victor  added the comment:

I mark this issue as a duplicate of bpo-44860.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> sysconfig's posix_user scheme has different platlib value to 
distutils's unix_user

___
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-09-09 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-45136 as a duplicate of this issue.

--

___
Python tracker 

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



[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-09 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue. I'm not comfortable with the backport.

For me, this change is not a bugfix, but a new feature. It can break 
applications which rely on the exact error message in their test suite. I'm not 
sure why it was backported to Python 3.9. Moreover, I'm not comfortable to 
backport it to 3.10.1 and not 3.10.0.

I would prefer to only change the behavior in Python 3.11. If you want to get 
it in 3.10, I suggest to convince Pablo to get in 3.10.0.

Otherwise, I suggest to revert it in 3.9 and 3.10.

Well, the qualified name is usually the same than the short name, so only few 
applications should be impacted. But it's annoying when the Python behavior 
changes in a minor version (3.x.y).

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue45150] Add a file_digest() function in hashlib

2021-09-09 Thread Tarek Ziadé

New submission from Tarek Ziadé :

I am proposing the addition of a very simple helper to return the hash of a 
file.

--
assignee: tarek
components: Library (Lib)
messages: 401457
nosy: tarek
priority: normal
severity: normal
status: open
title: Add a file_digest() function in hashlib

___
Python tracker 

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



[issue45150] Add a file_digest() function in hashlib

2021-09-09 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +26673
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28252

___
Python tracker 

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



[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread Vincent Michel

Vincent Michel  added the comment:

There are a couple of reasons why I did not make changes to the stdstream 
related functions. 

The first one is that a PR with many changes is less likely to get reviewed and 
merged than a PR with fewer changes. The second one is that it's hard for me to 
make sure that those functions are always called with the GIL already held. 
Maybe some of them never hold the GIL in the first place, and I'm not familiar 
enough with the code base to tell.

So in the end it will probably be up to the coredev reviewing the PR, but 
better start small.

> Besides, nothing prevents somebody from starting a FUSE file system and then 
> redirecting stdout to it …

I ran some checks and `python -c 'input()' < my-fuse-mountpoint/data_in` does 
indeed trigger an ioctl call to the corresponding fuse file system. But how 
would `my-fuse-mountpoint/data_in` be the stdin for the process that itself 
starts the fuse filesystem? I don't see how to generate this deadlock, apart 
from setting up interprocess communication between the fuse process and the 
`my-fuse-mountpoint/data_in`-as-stdin process.

--

___
Python tracker 

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



[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

"{__module__}.{__name__}" is just incorrect reference if __name__ != 
__qualname__. Error messages should always use "{__module__}.{__qualname__}" or 
just "{__name__}". I see this as a bug. Fortunately very few code is affected.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45150] Add a file_digest() function in hashlib

2021-09-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +christian.heimes, gregory.p.smith
type:  -> enhancement
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



[issue45017] move opcode-related logic from modulefinder to dis

2021-09-09 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

Does find_imports/find_store_names have to be public? I think the relocation is 
fine, but making them public without any use case from outside can be avoided 
at least for now.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue45150] Add a file_digest() function in hashlib

2021-09-09 Thread Christian Heimes


Christian Heimes  added the comment:

Hey Tarek, long time no see!

* the _sha256 module is optional, can be disabled and is not available in some 
distributions.

* I also don't like to use sha256 has default. It's slow, even slower than 
sha512. Any default makes it also harder to upgrade to a better, more secure 
default in the future.

* like hmac.new() a file_digest() should accept PEP 452-compatible arguments 
and hash name as digstmod argument, not just a callable.

* a filename argument prevents users from passing in file-like objects like 
BytesIO.

* 4096 bytes chunk size is very conservative. The call overhead for read() and 
update() may dominate the performance of the function.

* The hex argument feels weird.

In a perfect world, the hash and hmac objects should get an "update_file" 
method. The OpenSSL-based hashes could even release the GIL and utilize 
OpenSSL's BIO layer to avoid any Python overhead.

--

___
Python tracker 

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



[issue45150] Add a file_digest() function in hashlib

2021-09-09 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Hey Christian, I hope things are well for you!
Thanks for all the precious feedback, I'll rework the patch accordingly

--

___
Python tracker 

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



[issue45017] move opcode-related logic from modulefinder to dis

2021-09-09 Thread Irit Katriel

Irit Katriel  added the comment:

I agree, I’ll make them private.

--

___
Python tracker 

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



[issue20499] Rounding errors with statistics.variance

2021-09-09 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

> rhettinger requested a review from stevendaprano yesterday

This is not a complaint Raymond, but you're too quick for me!

Your changes look good to me, thank you.

--

___
Python tracker 

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



[issue20499] Rounding errors with statistics.variance

2021-09-09 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Regarding the call to sorted that you removed.

I just realised that this was buggy! In my testing, I found that there was a 
consistent speed-up by summing fractions in order of increasing denominators 
(small denominators first):


>>> from fractions import Fraction
>>> from timeit import Timer
>>> from random import shuffle
>>>
>>> d1 = [Fraction(1, d) for d in range(1, 1000)]
>>> d2 = d1[:]
>>> shuffle(d2)
>>>
>>> t1 = Timer('sum(d)', setup='from __main__ import d1 as d')
>>> t2 = Timer('sum(d)', setup='from __main__ import d2 as d')
>>> 
>>> min(t1.repeat(number=100, repeat=7)) # small dens first
1.048042511974927
>>> min(t1.repeat(number=100, repeat=7))
1.0449080819962546
>>>
>>> min(t2.repeat(number=100, repeat=7)) # random order
1.2761094039888121
>>> min(t2.repeat(number=100, repeat=7))
1.2763739289948717

Summing larger denominators before smaller denominators is even slower:

>>> d3 = list(reversed(d1))
>>> t3 = Timer('sum(d)', setup='from __main__ import d3 as d')
>>> 
>>> min(t3.repeat(number=100, repeat=7)) # large dens first
1.658168482826
>>> min(t3.repeat(number=100, repeat=7))
1.6580656860023737


But then I screwed up by sorting the *tuples* (num, den) which would have the 
effect of summing small *numerators* first, not denominators.

Thanks for catching that they way I had written it, the sort would have had at 
best no real performance benefit.

--

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Eric V. Smith


Change by Eric V. Smith :


--
keywords: +easy, newcomer friendly

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Saurabh Jaiswal


Saurabh Jaiswal  added the comment:

i want to take this change, i just want to know the steps how to push this 
changes and raise PR for the same

--
nosy: +saurabh37

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Ross Martin


Ross Martin  added the comment:

I would like to fix this, if it hasnt been assigned already.

--
nosy: +MrRBM97

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread D.Lintin


D.Lintin  added the comment:

Already create a pull request, thanks.

--
nosy: +dlintin

___
Python tracker 

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



[issue45017] move opcode-related logic from modulefinder to dis

2021-09-09 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 04676b69466d2e6d2903f1c6879d2cb292721455 by Irit Katriel in 
branch 'main':
bpo-45017: move opcode-related logic from modulefinder to dis (GH-28246)
https://github.com/python/cpython/commit/04676b69466d2e6d2903f1c6879d2cb292721455


--

___
Python tracker 

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



[issue45017] move opcode-related logic from modulefinder to dis

2021-09-09 Thread Irit Katriel


Change by Irit Katriel :


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



[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 06148b1870fceb1a21738761b8e1ac3bf654319b by Vincent Michel in 
branch 'main':
bpo-44219: Release the GIL during isatty syscalls (GH-28250)
https://github.com/python/cpython/commit/06148b1870fceb1a21738761b8e1ac3bf654319b


--
nosy: +vstinner

___
Python tracker 

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



[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26675
pull_request: https://github.com/python/cpython/pull/28256

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Nitish Sharma


Nitish Sharma  added the comment:

Yeah, are you talking about this PR?

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

--
nosy: +nitss007

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread D.Lintin


D.Lintin  added the comment:

no, this one: https://github.com/python/cpython/pull/28253

--

___
Python tracker 

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



[issue44492] Building a C extension on Big Sur and SDK v10.15 fails

2021-09-09 Thread Phil Thompson


Phil Thompson  added the comment:

Is this likely to be fixed for v3.10? At the very least a wheel should have the 
correct platform tag.

--

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Eric V. Smith


Eric V. Smith  added the comment:

Please see the dev guide https://devguide.python.org/ for setting the 
description of the PR. If it's set correctly, the PR will be attached to this 
issue.

--

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Saurabh Jaiswal


Saurabh Jaiswal  added the comment:

PR raised for the same
https://github.com/python/cpython/pull/28257

On Thu, 9 Sept 2021 at 18:19, Saurabh Jaiswal 
wrote:

>
> Saurabh Jaiswal  added the comment:
>
> i want to take this change, i just want to know the steps how to push this
> changes and raise PR for the same
>
> --
> nosy: +saurabh37
>
> ___
> Python tracker 
> 
> ___
>

-- 

*Thanks & Regards*

Saurabh Jaiswal

*www.saurabhjaiswal.com *

*+91-7032917377*

--

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Saurabh Jaiswal


Saurabh Jaiswal  added the comment:

Fix done on the latest Branch as suggested

--
keywords: +patch
message_count: 8.0 -> 9.0
pull_requests: +26676
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28257

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread D.Lintin


Change by D.Lintin :


--
pull_requests: +26677
pull_request: https://github.com/python/cpython/pull/28253

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread D.Lintin


D.Lintin  added the comment:

Just updated the description to attach to the issues, thanks.

--

___
Python tracker 

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



[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset 5c65834d801d6b4313eef0684a30e12c22ccfedd by Miss Islington (bot) 
in branch '3.9':
bpo-44219: Release the GIL during isatty syscalls (GH-28250)
https://github.com/python/cpython/commit/5c65834d801d6b4313eef0684a30e12c22ccfedd


--

___
Python tracker 

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



[issue45067] Failed to build _curses on CentOS 7

2021-09-09 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

A change like this will be required since these funcs were introduced only 
recently and nurses shipped with centos was older.

% git diff
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 61aaf85522..6fb6c490e6 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -135,7 +135,7 @@ typedef chtype attr_t;   /* No attr_t type is 
available */
 #define STRICT_SYSV_CURSES
 #endif

-#if NCURSES_EXT_COLORS+0 && NCURSES_EXT_FUNCS+0
+#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20170401) && 
(defined(NCURSES_EXT_COLORS) && NCURSES_EXT_COLORS >= 20170401)
 #define _NCURSES_EXTENDED_COLOR_FUNCS   1
 #else
 #define _NCURSES_EXTENDED_COLOR_FUNCS   0

--

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks to both of you. Unfortunately, I have to pick one PR to use, and since 
dlintin had the earlier one, I'll use it.

--

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread D.Lintin


D.Lintin  added the comment:

Thankyou!

--

___
Python tracker 

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



[issue45151] Logger library with task scheduler

2021-09-09 Thread Brian Hunt

New submission from Brian Hunt :

Version: Python 3.9.3
Package: Logger + Windows 10 Task Scheduler
Error Msg: None

Behavior:
I built a logging process to use with a python script that will be scheduled 
with Windows 10 task scheduler (this could be a bug in task scheduler too, but 
starting here). I noticed it wasn’t working and started trying to trace the 
root of the issue.

If I created a new file called scratch.py and ran some code, the logs showed 
up. However, the exact same code in the exact same folder (titled: run_xyz.py) 
didn’t log those same messages. It appears that something in either the task 
scheduler or logger library doesn’t like the fact that my file name contains an 
underscore because as soon as I pointed my task scheduler task that didn’t log 
to my other file, it worked again. Also, when I finally removed the underscores 
it started working. I believe it is Logger library related because the task 
with underscores does in fact run the python code and generate the script 
output.



Code in both files:
-a_b_c.py code---
import os
import pathlib
import sys

pl_path = pathlib.Path(__file__).parents[1].resolve()
sys.path.append(str(pl_path))



from src.Core.Logging import get_logger
#
logger = get_logger(__name__, False)
logger.info("TESTING_USing taskScheduler")



---src.Core.Logging.py get_logger code
import logging
import datetime
import time
import os

# from logging.handlers import SMTPHandler

from config import build_stage, log_config
from Pipelines.Databases import sqlAlchemy_logging_con


class DBHandler(logging.Handler):
def __init__(self, name):
"""

:param name: Deprecated
"""
logging.StreamHandler.__init__(self)
self.con = sqlAlchemy_logging_con()
self.sql = """insert into Logs (LogMessage, Datetime, FullPathNM, 
LogLevelNM, ErrorLine) values ('{message}', '{dbtime}', '{pathname}', 
'{level}', '{errLn}')"""
self.name = name



def formatDBTime(self, record):
record.dbtime = datetime.strftime("#%Y/%m/%d#", 
datetime.localtime(record.created))

def emit(self, record):
creation_time = time.strftime("%Y-%m-%d %H:%M:%S", 
time.localtime(record.created))

try:
self.format(record)

if record.exc_info:
record.exc_text = 
logging._defaultFormatter.formatException(record.exc_info)
else:
record.exc_text = ""

sql = self.sql.format(message=record.message
  , dbtime=creation_time
  , pathname=record.pathname
  , level=record.levelname
  , errLn=record.lineno)

self.con.execute(sql)




except:
pass


def get_logger(name, use_local_logging=False):
"""
Returns a logger based on a name given. Name should be __name__ variable or 
unique for each call.
Never call more than one time in a given file as it clears the logger. Use 
config.log_config to define configuration
of the logger and its handlers.
:param name:
:return: logger
"""
logger = logging.getLogger(name)
logger.handlers.clear()

# used to send logs to local file location. Level set to that of logger
if use_local_logging:
handler = logging.FileHandler("Data\\Output\\log_" + build_stage + 
str(datetime.date.today()).replace("-","") + ".log")
handler.setLevel(log_config['logger_level'])
logger.addHandler(handler)

dbhandler = DBHandler(name)
dbhandler.setLevel(log_config['db_handler_level'])
logger.addHandler(dbhandler)
logger.setLevel(log_config['logger_level'])



return logger

--
components: IO, Library (Lib), Windows
messages: 401482
nosy: btjehunt, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Logger library with task scheduler
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Eric V. Smith


Eric V. Smith  added the comment:

@pablogsal: You might want to merge this back to 3.10.0, once it's merged to 
3.10. I'll merge it shortly, once the tests have run.

--
keywords:  -patch
nosy: +pablogsal
stage: patch review -> 

___
Python tracker 

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



[issue45151] Logger library with task scheduler

2021-09-09 Thread Eric V. Smith


Eric V. Smith  added the comment:

Can you simplify this to not use any external libraries?

--
components:  -IO, Windows
nosy: +eric.smith

___
Python tracker 

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



[issue45152] Prepare for splitting LOAD_CONST into several opcodes

2021-09-09 Thread Irit Katriel


New submission from Irit Katriel :

This issue is to prepare the code for splitting LOAD_CONST to several opcodes.

There are a number of places in the code where an opcode is compared to 
LOAD_CONST (such as dis, the compiler, and the peephole optimizer). These need 
to be refactored to make the query "is this a hasconst opcode", and the value 
calculation needs to be refactored into a single place, which can later be 
updated to get the value from places other than co_consts.

--
assignee: iritkatriel
components: Interpreter Core, Library (Lib)
messages: 401485
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Prepare for splitting LOAD_CONST into several opcodes
type: enhancement
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



[issue45152] Prepare for splitting LOAD_CONST into several opcodes

2021-09-09 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue45152] Prepare for splitting LOAD_CONST into several opcodes

2021-09-09 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue45153] Except multiple types of exceptions with OR keyword is not working

2021-09-09 Thread Shlomi


New submission from Shlomi :

When I want to catch multiple types of exceptions naturally 'OR' keyword is 
used. But it doesn't work. The interpreter doesn't show any error for the 
syntax, so developer may think it would work.

Small example:

try:
myfunc()
except ConnectionResetError or ConnectionAbortedError:
print("foo")
except Exception as e:
print("bar")

When myfunc() throws 'ConnectionAbortedError' the interpreter enters "bar" 
block, and not "foo" block.

--
components: Interpreter Core
messages: 401486
nosy: ShlomiRex
priority: normal
severity: normal
status: open
title: Except multiple types of exceptions with OR keyword is not working
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue45154] Enumerate() function or class?

2021-09-09 Thread Sanmitha

New submission from Sanmitha :

I was learning about enumerate(). While learning, when I used,

>>>help(enumerate)

Help on class enumerate in module builtins:

class enumerate(object)
| enumerate(iterable, start=0)
|
| Return an enumerate object.
|
| iterable
| an object supporting iteration
|
| The enumerate object yields pairs containing a count (from start, which
| defaults to zero) and a value yielded by the iterable argument.
|
| enumerate is useful for obtaining an indexed list:
| (0, seq[0]), (1, seq[1]), (2, seq[2]), …
|
| Methods defined here:
|
| getattribute(self, name, /)

| Return getattr(self, name).
|
| iter(self, /)
| Implement iter(self).
|
| next(self, /)
| Implement next(self).
|
| reduce(…)
| Return state information for pickling.

Static methods defined here:
new(*args, **kwargs) from builtins.type
Create and return a new object. See help(type) for accurate signature.

Even when I gave as,

>>>enumerate


But, when I checked the documentation in the official website of python, 
www.python.org for enumerate()

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

It showed that enumerate() is a function which violated the information shown 
by help().

I couldn’t get whether enumerate() is a class or a function. Anyone please help 
me out of this please…

By the way, I had python 3.8.3. I even checked in python 3.6 and 3.7.10.

--
assignee: docs@python
components: Documentation
messages: 401487
nosy: Sanmitha Sadhishkumar, docs@python
priority: normal
severity: normal
status: open
title: Enumerate() function or class?
type: enhancement
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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread D.Lintin


D.Lintin  added the comment:

1 failing checks.

--

___
Python tracker 

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



[issue36424] Pickle fails on frozen dataclass that has slots

2021-09-09 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

This actually can't be closed yet as the fix was not backported to 3.9

--

___
Python tracker 

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



[issue45139] Docs: add source directive for minor translation simplification

2021-09-09 Thread Zachary Ware


Zachary Ware  added the comment:

Note that this is suggesting to introduce a `.. source` directive, not adjust 
the existing `:source:` role.

There's nothing preventing the use of the existing pattern in special cases, 
while using the new directive in the common cases.  I don't have context for 
how much effort this would actually save translators (perhaps we could get 
representatives from various languages/workflows could chime in?) so it might 
not be worth it on other grounds, but I don't think this should be shot down 
just for "but sometimes" :)

--
nosy: +zach.ware
title: Docs: More surrounding text into the "source" directive -> Docs: add 
source directive for minor translation simplification
type:  -> enhancement

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +26679
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28259

___
Python tracker 

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



[issue45153] Except multiple types of exceptions with OR keyword is not working

2021-09-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Expression `A or B` gets you A if A is true.

If you want to catch several types of exception by one "except", use except 
with a tuple:

except (ConnectionResetError, ConnectionAbortedError):

--
nosy: +serhiy.storchaka
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



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-09 Thread E. Paine


E. Paine  added the comment:

It turns out the problem is a combination of the font and IDLE preview content. 
With the phaistos font installed, inserting the content of the "Devanagari, 
Tamil" or "East Asian" sections into a Tk text widget causes it to freeze. For 
example, the following will fail:

pack [text .t]
.t insert end \u0966

The reason for this still confuses me, since Tk would never default (I believe) 
to trying to use phaistos font (and therefore it's installation should not 
affect this). I will report it to the Tk team.

--

___
Python tracker 

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



[issue45139] Docs: add source directive for minor translation simplification

2021-09-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

New directives introduce complexity. They should be saved for pervasive and 
non-trivial problems.

The motivation for this change is dubious (that a translator can't easily 
handle a simple fixed string pattern).  The OP grants that this is a "only 
small burden".   In general, translation is a large, difficult and time 
consuming task.  Adding this directive would not change that noticeably 
(changing the source text is among the easiest and most trivial subtasks).  It 
may even make translators job more difficult because it entails knowing how to 
edit the directive as opposed to use basic knowledge to make a simple in-line 
text substitution.

OTOH, there are costs.  Every new directive takes time to learn and remember.  
This is especially problematic when the directives are specific to one project; 
otherwise, the documentation skills don't translate across projects.  
Generally, it is best to use dirt simple, standard Sphinx markup, especially 
for trivial tasks like this one.

I do a lot of documentation work and am constantly wrestling will sphinx, many 
times unsuccessfully. Even among core developers, very few people already know 
all the directives that we already have.  Making the list longer doesn't make 
our lives easier unless a directive is solves a challenging problem and is 
commonly used.

--

___
Python tracker 

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



[issue45154] Enumerate() function or class?

2021-09-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

In pure python, generators are implemented as functions.  In CPython, the only 
way to implement them is as a class.  From a user's point of view, enumerate(), 
map(), zip(), and filter() are used like a functions (they doesn't have 
non-dunder methods).  Accordingly, they don't have class markup in the docs 
even though technically they are classes.  The docs are mostly consistent in 
this regard and have opted for the presentation that tends to be the most 
helpful to users.

--
assignee: docs@python -> rhettinger
nosy: +rhettinger
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



[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 23c46778d65870784cb6d4de30f43aac62d71e73 by Miss Islington (bot) 
in branch '3.10':
bpo-44219: Release the GIL during isatty syscalls (GH-28250) (GH-28255)
https://github.com/python/cpython/commit/23c46778d65870784cb6d4de30f43aac62d71e73


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45067] Failed to build _curses on CentOS 7

2021-09-09 Thread Senthil Kumaran


Change by Senthil Kumaran :


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

___
Python tracker 

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



[issue45067] Failed to build _curses on CentOS 7

2021-09-09 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

I have created a pull request - https://github.com/python/cpython/pull/28260

Please review this.

--
assignee:  -> orsenthil
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread STINNER Victor


STINNER Victor  added the comment:

> In my case, the file in question is implemented as a FUSE mount which is 
> served by the same process (different thread of course). Thus holding the GIL 
> at this point causes a rather interesting deadlock.

Since the change fixes a deadlock, I agree to backport it to 3.9 and 3.10.

Thanks for the fix!

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



[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +26681
pull_request: https://github.com/python/cpython/pull/28261

___
Python tracker 

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



[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-09 Thread Łukasz Langa

Łukasz Langa  added the comment:

I agree with Serhiy, I consider this a bugfix. Let's raise it to "release 
blocker" to let Pablo decide if this should wait for 3.10.1 or get bumped up to 
3.10.0.

--
nosy: +pablogsal
priority: normal -> release blocker

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-09 Thread Eric V. Smith


Eric V. Smith  added the comment:

Changes merged to master and 3.10. Thanks, everyone!

@pablogsal: You can merge this to 3.10.0 if you see fit, but I'm going to close 
this issue.

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



[issue44344] Documentation for pow() should include the possibility of complex numbers as a return type

2021-09-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The pow() docs could use substantial updating.  All of the logic for pow() is 
implemented in base.__pow__(exp, [mod]).  Technically, it isn't restricted to 
numeric types, that is just a norm.  The relationship between "pow(a,b)" and 
"a**b" is that both make the same call, a.__pow__(b).  The discussion of 
coercion rules dates back to Python 2 where used to have a coerce() builtin.  
Now, the cross-type logic is buried in either in type(a).__pow__ or in 
type(b).__rpow__.  The equivalence of pow(a, b, c) to a more efficient form of 
"a ** b % c" is a norm but not a requirement and is only supported by ints or 
third-party types.

My suggestions

1st paragraphs:  Stay at a high level, covering only the most common use case 
and simple understanding of how most people use pow():

   Return *base* to the power *exp* giving the same result
   as ``base**exp``.

   If *mod* is present and all the arguments are integers,
   return *base* to the power *exp*, modulo *mod*.  This
   gives the same result as ``base ** exp % mod`` but is
   computed much more efficiently.

2nd paragraph:  Be precise about what pow() actually does, differentiating the 
typical case from what is actually required:

   The :func:`pow` function calls the base's meth:`__pow__` method
   falling back to the exp's meth:`__rpow__` if needed.  The logic
   and semantics of those methods varies depending on the type.
   Typically, the arguments have numeric types but this is not required.
   For types that support the three-argument form, the usual semantics
   are that ``pow(b, e, m)`` is equivalent to ``a ** b % c`` but
   this is not required.

3rd paragraph: Cover behaviors common to int, float, and complex.

4th paragraph and later:  Cover type specific behaviors (i.e. only int supports 
the three argument form and the other arguments must be ints as well).

--
nosy: +rhettinger

___
Python tracker 

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



[issue45152] Prepare for splitting LOAD_CONST into several opcodes

2021-09-09 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +26682
pull_request: https://github.com/python/cpython/pull/28262

___
Python tracker 

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



[issue45152] Prepare for splitting LOAD_CONST into several opcodes

2021-09-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I didn't know this was in the works.  Can you point me to the relevant 
discussion about why LOAD_CONST would be split?

--
nosy: +rhettinger

___
Python tracker 

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



[issue45152] Prepare for splitting LOAD_CONST into several opcodes

2021-09-09 Thread Irit Katriel


Irit Katriel  added the comment:

It's related to this work: https://github.com/faster-cpython/ideas/issues/65

--

___
Python tracker 

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



[issue39955] argparse print_help breaks when help is blank space

2021-09-09 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> In argparse empty choices cannot be printed in the help
type: crash -> behavior

___
Python tracker 

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



[issue36463] python37.dll crashing 0xc000041d

2021-09-09 Thread Irit Katriel


Irit Katriel  added the comment:

Closing as there isn't enough information here for us to do anything about 
this.  Also, Python 3.7 is no longer in maintenance. 


If you are still having this problem with a current version (>= 3.9) please 
create a new issue with information on how we can reproduce the problem.

--
nosy: +iritkatriel
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-09 Thread STINNER Victor


STINNER Victor  added the comment:

If the change is considered as a bugfix, it can wait for the next 3.9.x and 
3.10.x release.

If it's considered as a feature (which is backward incompatible), it should 
only land in 3.10 if it's in 3.10.0, but be reverted in the 3.9 branch.

Honestly, I don't care about which option is taken, I'm just worried about the 
consistency of branches.

--

___
Python tracker 

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



[issue38596] simple example give a Linux core dumped with atk-bridge

2021-09-09 Thread Irit Katriel


Irit Katriel  added the comment:

Python 3.7 is no longer maintained. If you are still seeing crashes in a 
current version (>= 3.9) then please create a new issue.

However, note that a bug report is more likely to get attention if it shows a 
bug in python, rather than just reporting that a complicated a system built on 
top of python is crashing.

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



[issue38573] Not Implemented Error in stdLib HTMLParser

2021-09-09 Thread Irit Katriel


Irit Katriel  added the comment:

Changing type since this is an exception and not a crash.

I get a different error now:

>>> parser.feed(bytearray.fromhex('3c215b63612121').decode('ascii'))
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/iritkatriel/src/cpython-1/Lib/html/parser.py", line 110, in feed
self.goahead(0)
^^^
  File "/Users/iritkatriel/src/cpython-1/Lib/html/parser.py", line 178, in 
goahead
k = self.parse_html_declaration(i)
^^
  File "/Users/iritkatriel/src/cpython-1/Lib/html/parser.py", line 263, in 
parse_html_declaration
return self.parse_marked_section(i)
   
  File "/Users/iritkatriel/src/cpython-1/Lib/_markupbase.py", line 154, in 
parse_marked_section
raise AssertionError(
^
AssertionError: unknown status keyword 'ca' in marked section

--
nosy: +iritkatriel
type: crash -> behavior

___
Python tracker 

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



[issue24544] Race condition and crash when embedding multi-thread script

2021-09-09 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2.7 is no longer maintained. Please create a new issue if you are having 
problems with this in a current version (>= 3.9).

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



[issue45067] Failed to build _curses on CentOS 7

2021-09-09 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset 794430700defb913512f871b701a888aa730de81 by Senthil Kumaran in 
branch 'main':
bpo-45067 - Verify the version of ncurses for extended color support feature 
usage. (GH-28260)
https://github.com/python/cpython/commit/794430700defb913512f871b701a888aa730de81


--

___
Python tracker 

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



[issue45067] Failed to build _curses on CentOS 7

2021-09-09 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue23249] test_win32 fails on aarch64

2021-09-09 Thread Irit Katriel


Irit Katriel  added the comment:

I believe we are on libffi 3.3 now - the code on that branch looks very 
different from this patch. Can we close this issue?

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



[issue23249] test_win32 fails on aarch64

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



[issue44841] ZipInfo crashes on filemode

2021-09-09 Thread Irit Katriel


Irit Katriel  added the comment:

Crash typically means segfault or the like, not an exception. 

Can you provide code to create the file "test-one-dir.zip" so that we can 
reproduce the issue?

--
nosy: +iritkatriel
type: crash -> behavior

___
Python tracker 

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



[issue45152] Prepare for splitting LOAD_CONST into several opcodes

2021-09-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thanks for the link.  This is a worthwhile experiment.  However, the potential 
gains will be hard to come by.

The workload of LOAD_CONST is very small.  After paying for the usual dispatch 
logic overhead, all it does is an index into a struct member and an incref.  
Both the co_consts table and the popular constant objects are already likely to 
be in the L1 data cache.  


##DEBUG_LABEL: TARGET_LOAD_CONST
movslq  %r15d, %rax ## OpArg fetch, typically a zero code 
register rename   
movq-368(%rbp), %rcx## 8-byte Reload to access co_consts
movq24(%rcx,%rax,8), %rax   ## The actual indexing operation  (3 
cycles)
incq(%rax)  ## The incref  


A specialized opcode for a specific constant like None can 1) eliminate the 
oparg fetch (likely saving nothing), and 2) eliminate the two sequentially 
dependent memory access (this is a win):

##DEBUG_LABEL: TARGET_LOAD_NONE
  ​  movq   __Py_NoneStruct@GOTPCREL(%rip), rax
incq(%rax)  ## The incref


Any more general opcode for loading small ints would still need the oparg fetch 
and the incref.  To win, it would need to convert the oparg into an int more 
efficiently than the two movq steps.  If the small int table is in a fixed 
location (not per-subinterpreter), then you can save 2 cycles with the simpler 
address computation:

##DEBUG_LABEL: TARGET_SMALLINT
movslq  %r15d, %rax ## OpArg fetch, typically a zero code 
register rename 
movq__Py_SmallInt@GOTPCREL(%rip), %rcx## Find an array of 
ints
movq(%rcx,%rax,8), %rax ## Cheaper address computation takes 1 
cycle
incq(%rax)  ## The incref 

The 2 cycle win (intel-only) will be partially offset by the additional 
pressure on the L1 data cache.  Right now, the co_consts is almost certainly in 
cache, holding only the constants that actually get used (at a rate of 8 per 
cache line).  Accesses into a small_int array will push other data out of L1.

IIRC, Serhiy already experimented with a LOAD_NONE opcode and couldn't get a 
measurable win.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45152] Prepare for splitting LOAD_CONST into several opcodes

2021-09-09 Thread Irit Katriel

Irit Katriel  added the comment:

I’m not sure we’re hoping this to be faster, just reduce the code object size 
and not be slower. (Smaller code object could be faster to unmarshal).

--

___
Python tracker 

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



  1   2   >