[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-04-02 Thread Nick Coghlan


Nick Coghlan  added the comment:

Core dev forum thread: 
https://discuss.python.org/t/proposal-rename-pyinterpreterframe-struct-as-py-framedata/14213

The conclusion from the forum thread and associated PRs was that any of the 
further renaming proposed didn't provide sufficient additional clarity to 
justify further code churn in a semi public API.

 As a result, the final PR just documents the status quo in the internal C API 
frame header (since the conventions arising from the code-churn-minimising 
migration to a split data structure is hard to infer just from reading the 
code): https://github.com/python/cpython/pull/32281

--

___
Python tracker 

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



[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-04-02 Thread Nick Coghlan


Change by Nick Coghlan :


--
pull_requests: +30342
pull_request: https://github.com/python/cpython/pull/32281

___
Python tracker 

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



[issue47196] Function pointer cast in test_imp

2022-04-02 Thread Hood Chatham


Change by Hood Chatham :


--
pull_requests: +30341
pull_request: https://github.com/python/cpython/pull/32280

___
Python tracker 

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



[issue43557] Deprecate getlocale() and normalize() functions

2022-04-02 Thread STINNER Victor


Change by STINNER Victor :


--
title: Deprecate getdefaultlocale(), getlocale() and normalize() functions -> 
Deprecate getlocale() and normalize() functions

___
Python tracker 

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



[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2022-04-02 Thread STINNER Victor


Change by STINNER Victor :


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



[issue18624] Add alias for iso-8859-8-i which is the same as iso-8859-8

2022-04-02 Thread David Goncalves


Change by David Goncalves :


--
nosy: +dpg
nosy_count: 8.0 -> 9.0
pull_requests: +30340
pull_request: https://github.com/python/cpython/pull/32279

___
Python tracker 

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



[issue47031] math.nan should note that NANs do not compare equal to anything

2022-04-02 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Thanks for the bug report and patch!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue46033] Duplicated sentence in for statement documentation

2022-04-02 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue46033] Duplicated sentence in for statement documentation

2022-04-02 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 281f980d354d1709018a2dc77f79388faf3e56c0 by Michał D in branch 
'main':
bpo-46033: Clarify for-statement execution (GH-30025)
https://github.com/python/cpython/commit/281f980d354d1709018a2dc77f79388faf3e56c0


--
nosy: +terry.reedy

___
Python tracker 

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



[issue24563] [doc] Encoding declaration: doc supported encodings

2022-04-02 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue24563] [doc] Encoding declaration: doc supported encodings

2022-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset ce6af314ca8529d5ed0f307deb9c33029a69f4cb by Miss Islington (bot) 
in branch '3.10':
bpo-24563: Link encoding names to encoding declarations (GH-32274)
https://github.com/python/cpython/commit/ce6af314ca8529d5ed0f307deb9c33029a69f4cb


--

___
Python tracker 

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



[issue24563] [doc] Encoding declaration: doc supported encodings

2022-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset f4e280d8c5461fa5e928fa07f6cd1779a4ac43ba by Miss Islington (bot) 
in branch '3.9':
bpo-24563: Link encoding names to encoding declarations (GH-32274)
https://github.com/python/cpython/commit/f4e280d8c5461fa5e928fa07f6cd1779a4ac43ba


--

___
Python tracker 

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



[issue24563] [doc] Encoding declaration: doc supported encodings

2022-04-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30339
pull_request: https://github.com/python/cpython/pull/32276

___
Python tracker 

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



[issue24563] [doc] Encoding declaration: doc supported encodings

2022-04-02 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue24563] [doc] Encoding declaration: doc supported encodings

2022-04-02 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 01be5d6446abbdd95d0c18bd19a58a62b05568d8 by Terry Jan Reedy in 
branch 'main':
bpo-24563: Link encoding names to encoding declarations (GH-32274)
https://github.com/python/cpython/commit/01be5d6446abbdd95d0c18bd19a58a62b05568d8


--

___
Python tracker 

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



[issue24563] [doc] Encoding declaration: doc supported encodings

2022-04-02 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +30337
pull_request: https://github.com/python/cpython/pull/32274

___
Python tracker 

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



[issue24563] [doc] Encoding declaration: doc supported encodings

2022-04-02 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am writing a PR with an internal link.  I decided that linking to Standard 
Encodings is sufficient.  The Python Text Encodings section follows that. 
Anyone wanting to use any of those can experiment to see which work.

--

___
Python tracker 

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



[issue45099] asyncio.Task's documentation says that loop arg is removed when it's not

2022-04-02 Thread Jakub Kuczys


Jakub Kuczys  added the comment:

I'm not sure why this issue was mentioned in GH-32166 since it doesn't really 
address this but regardless, it appears that my issue has been fixed in 
PR-31388 and PR-31403 when Serhiy fixed the issue from bpo-46777 so thanks :)

--

___
Python tracker 

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



[issue45584] Clarifying truncating in documentation

2022-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset 694425817ba2b3a796acb3413a7111f6de4bd086 by Miss Islington (bot) 
in branch '3.9':
bpo-45584: Clarify `math.trunc` documentation (GH-29183)
https://github.com/python/cpython/commit/694425817ba2b3a796acb3413a7111f6de4bd086


--

___
Python tracker 

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



[issue45584] Clarifying truncating in documentation

2022-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset 3031b867531009d270d5d7d3e53e739c4cba8816 by Miss Islington (bot) 
in branch '3.10':
bpo-45584: Clarify `math.trunc` documentation (GH-29183)
https://github.com/python/cpython/commit/3031b867531009d270d5d7d3e53e739c4cba8816


--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Anthony: you should be able to build the _tkinter by manually specifying the 
compiler and linker flags using the `TCLTK_CFLAGS` and `TCLTK_LIBS` environment 
variables. AFAICS, the flags provided by pkgconfig in Ubuntu 20.04 should work 
well in 18.04 (possibly with minor adjustments; I didn't check).

--

___
Python tracker 

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



[issue45584] Clarifying truncating in documentation

2022-04-02 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Thanks for the patch!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue45584] Clarifying truncating in documentation

2022-04-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30336
pull_request: https://github.com/python/cpython/pull/32273

___
Python tracker 

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



[issue45584] Clarifying truncating in documentation

2022-04-02 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45584] Clarifying truncating in documentation

2022-04-02 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset ebbdbbff5d6840807e46ec61b8a323e94ee88de2 by Arthur Milchior in 
branch 'main':
bpo-45584: Clarify `math.trunc` documentation (GH-29183)
https://github.com/python/cpython/commit/ebbdbbff5d6840807e46ec61b8a323e94ee88de2


--
nosy: +JelleZijlstra

___
Python tracker 

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



[issue47089] Avoid sporadic failure of test_compileall on Windows

2022-04-02 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-37387 was closed 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



[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2022-04-02 Thread STINNER Victor


STINNER Victor  added the comment:

I close this issue as a duplicate of bpo-47089.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Avoid sporadic failure of test_compileall on Windows

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-02 Thread STINNER Victor


STINNER Victor  added the comment:

The re.template() function and the re.TEMPLATE functions are not documented and 
not tested.

The re.Scanner class is not documented but has a test_scanner() test in test_re.

--

___
Python tracker 

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



[issue47145] Improve graphlib.TopologicalSort by removing the prepare step

2022-04-02 Thread Larry Hastings


Larry Hastings  added the comment:

One final aside.  Let me preface this by saying: I'm not proposing the 
following for graphlib.TopologicalSort.  It's obviously too late to change that 
object this much.  It's just something I'm thinking about--maybe I'll use this 
in my own library.

Where we are now, the graphlib.TopologicalSort object is simultaneously a 
static representation of a graph--which the object doesn't provide a public API 
for you to examine!--and a stateful single-use iterator over that graph.  My 
proposed change to the API seems to increase the tension between these two sets 
of semantics.  Perhaps a better set of semantics, that more successfully maps 
my use case to the graph object, would be as follows:

* you can add() nodes and edges at any time.
* get_ready() always returns the current list of nodes with no 
prececessors.  There is no internal "we already told you about this one" state.
* replace done() with remove(), which removes the node and all edges 
from/to it from the graph.
* static_order() is still fine.

I think this would make it easy to reason about the object's behavior, and 
would be a better match to my use case where you're continually adding (and 
removing?) nodes, not just during an initial "populate the graph" phase.

Again, not appropriate to consider for graphlib.TopologicalSort.

--

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-02 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40259: "re.Scanner groups".

--

___
Python tracker 

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



[issue47145] Improve graphlib.TopologicalSort by removing the prepare step

2022-04-02 Thread Larry Hastings


Larry Hastings  added the comment:

I agree that the API should have as few surprises as possible.  AFAICT you 
haven't made any terminal pronouncements like "it's impossible to add this 
feature without too many unacceptable surprises", so I'll proceed assuming we 
can find an API (and semantics) that we're all happy with.

I've come around on the idea that forgetting "done" nodes is too surprising.  
The least surprising behavior is: once we've added a node to the graph, the 
graph remembers it.

Now I'll propose a second simple rule, which you've already touched on: you 
can't add a dependency after a node has been returned by get_ready().  
Attempting this always throws an exception; which exception specifically TBD.  
"Tough beans".

I think those two rules are easy enough to remember and to reason about.  It 
meaningfully expands the utility of the library with minimal surprise.  The 
library behaves identically for users of the existing API but permits new use 
cases too.  Adding this functionality would therefore mean fewer users would 
discover too late their use case isn't supported.


As far as my "long-lived graph objects will consume more and more memory over 
time" caveat, there's a better solution than "forget": graph.remove(*nodes).  
(My version already has a "remove" method, and I forgot that graphlib's 
doesn't.)  Allowing the user to remove a node from the graph gives them 
explicit control, and the semantics should be obvious and unsurprising; if 
you--the user--remove a node, and later you--the user--re-add that node to the 
graph, it behaves identically to any other node the graph has never seen 
before.  Removing a node intuitively removes all edges to that node.

Two notes on "remove" if we decide to go that route.  First, I'd ensure you can 
remove a node at any time. Nodes have three externally visible states wrt 
TopologicalSort:

1) added but not published by get_ready,
2) published by get_ready but not returned using done, and
3) done.  You should be able to remove a node in any of those three states.

Removing a node in 2) should be equivalent to calling done before calling 
remove; that is, if you're removing the node anyway, you don't need to call 
done.

Second, the current underlying implementation would make remove really slow.  
Nodes don't remember their predecessors, only their successors, so removing a 
node would be O(n).  If we expected remove to get a lot of use, we'd probably 
want to change how the graph is stored to speed up this operation.

--

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-02 Thread STINNER Victor


STINNER Victor  added the comment:

Old python-dev discussions on re.Scanner from 2000 to 2004:

* "[Python-Dev] A standard lexer?" (July 2000)
  
https://mail.python.org/archives/list/python-...@python.org/message/MQ4OMCVIVRJWNGHYGI3OUVZQPN5NNNAU/
  thread: 
https://mail.python.org/archives/list/python-...@python.org/thread/DLMYLYW3QRAAIZDEL3VA7M3TTUWMSPPB/#MQ4OMCVIVRJWNGHYGI3OUVZQPN5NNNAU

* "Scanner" (May 2001)
  
https://mail.python.org/archives/list/python-...@python.org/thread/7FGWHTFA2JT23TMVQXLGZLSKG7EGM44Q/#SVQBSSDWPYVHPRS363RWXWGKJTSEYQDP

* "iterator support for SRE?" (Oct 2001):
  
https://mail.python.org/archives/list/python-...@python.org/thread/IPJJX6MEW4ATOWHSRKLITL4CAZXDEJ5I/#IPJJX6MEW4ATOWHSRKLITL4CAZXDEJ5I

* "should sre.Scanner be exposed through re and documented?" (April 2003)
  
https://mail.python.org/archives/list/python-...@python.org/thread/BHVWYZVMDUJZIJMSSBAAXEH3JI7MTOIJ/#DDFDBY4D6OITPWO26Q5XPBFU7A5X6LXN

* "pre-PEP: Complete, Structured Regular Expression Group Matching" (Aug 2004)
  
https://mail.python.org/archives/list/python-...@python.org/thread/5M4YIZ2UFZF5AEWT3CGG74ZHERC6JV3B/#SNURCRGEYANPQVVQFZTY3LTXE2TFEKEP
  Search for "sre.Scanner".

  See also: "Using Regular Expressions for Lexical Analysis" (Feb 2002) by 
Fredrik Lundh
  
https://web.archive.org/web/20200220172033/http://effbot.org/zone/xml-scanner.htm

--

___
Python tracker 

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



[issue47200] Add ZipInfo.mode property

2022-04-02 Thread Ethan Furman


Change by Ethan Furman :


--
nosy: +alanmcintyre, serhiy.storchaka

___
Python tracker 

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



[issue4833] Explicit directories for zipfiles

2022-04-02 Thread Ethan Furman


Change by Ethan Furman :


--
nosy: +alanmcintyre, twouters

___
Python tracker 

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



[issue47200] Add ZipInfo.mode property

2022-04-02 Thread Ethan Furman


Change by Ethan Furman :


--
nosy: +ethan.furman, twouters

___
Python tracker 

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



[issue45114] bad example for os.stat

2022-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset dc9322a91d48c80afe8329bb509673a2f74fb925 by Miss Islington (bot) 
in branch '3.9':
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
https://github.com/python/cpython/commit/dc9322a91d48c80afe8329bb509673a2f74fb925


--

___
Python tracker 

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



[issue45114] bad example for os.stat

2022-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset 23c0200c436714a3f9b38d5e6cac230ceacd4c43 by Miss Islington (bot) 
in branch '3.10':
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
https://github.com/python/cpython/commit/23c0200c436714a3f9b38d5e6cac230ceacd4c43


--

___
Python tracker 

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



[issue46315] Add support for WebAssembly System Interface (wasm32-wasi)

2022-04-02 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 3df0e63aabef905b72fad78256f24b9270c63172 by Christian Heimes in 
branch 'main':
bpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266)
https://github.com/python/cpython/commit/3df0e63aabef905b72fad78256f24b9270c63172


--

___
Python tracker 

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



[issue45114] bad example for os.stat

2022-04-02 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


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



[issue45114] bad example for os.stat

2022-04-02 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45114] bad example for os.stat

2022-04-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30334
pull_request: https://github.com/python/cpython/pull/32268

___
Python tracker 

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



[issue45114] bad example for os.stat

2022-04-02 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset c93a0ac6972221787d8bea1c41a9feb667ed3d2c by 180909 in branch 
'main':
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
https://github.com/python/cpython/commit/c93a0ac6972221787d8bea1c41a9feb667ed3d2c


--
nosy: +JelleZijlstra

___
Python tracker 

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



[issue47203] ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application.

2022-04-02 Thread Eric V. Smith


Change by Eric V. Smith :


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

___
Python tracker 

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



[issue47031] math.nan should note that NANs do not compare equal to anything

2022-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset 5b80031fb0d2ea14f0d42a33309ce5464c4a6042 by Miss Islington (bot) 
in branch '3.9':
bpo-47031: Improve documentation for `math.nan` (GH-32170)
https://github.com/python/cpython/commit/5b80031fb0d2ea14f0d42a33309ce5464c4a6042


--

___
Python tracker 

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



[issue46315] Add support for WebAssembly System Interface (wasm32-wasi)

2022-04-02 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +30332
pull_request: https://github.com/python/cpython/pull/32266

___
Python tracker 

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



[issue40280] Consider supporting emscripten/webassembly as a build target

2022-04-02 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +30331
pull_request: https://github.com/python/cpython/pull/32266

___
Python tracker 

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



[issue47031] math.nan should note that NANs do not compare equal to anything

2022-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset 319a70cf99c9866c7fa47deecf04f6ebcfe35a54 by Miss Islington (bot) 
in branch '3.10':
bpo-47031: Improve documentation for `math.nan` (GH-32170)
https://github.com/python/cpython/commit/319a70cf99c9866c7fa47deecf04f6ebcfe35a54


--

___
Python tracker 

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



[issue26792] docstrings of runpy.run_{module,path} are rather sparse

2022-04-02 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
nosy: +JelleZijlstra
nosy_count: 4.0 -> 5.0
pull_requests: +30330
pull_request: https://github.com/python/cpython/pull/32265

___
Python tracker 

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



[issue47031] math.nan should note that NANs do not compare equal to anything

2022-04-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30329
pull_request: https://github.com/python/cpython/pull/32264

___
Python tracker 

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



[issue47031] math.nan should note that NANs do not compare equal to anything

2022-04-02 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue47203] ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application.

2022-04-02 Thread Jeremy Kloth


Jeremy Kloth  added the comment:

This error will occur when there is a 64-bit/32-bit conflict.  Normally, Python 
extension modules are installed in architecture dependent locations, however 
user-installed modules (pip install) can share a path referred to as "user 
site".

A quick check from the command-line can give you its location:

  py -m site

A scan of the paths listed as USER_BASE and USER_SITE might reveal a 
binascii.pyd  which would be shadowing the normally built-in module.

Another source of conflict would be a PYTHONPATH environment variable, if set.

--
nosy: +jkloth

___
Python tracker 

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



[issue47031] math.nan should note that NANs do not compare equal to anything

2022-04-02 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset 182e93c3f57b0c72e765c9896066d32e461c0865 by Charlie Zhao in 
branch 'main':
bpo-47031: Improve documentation for `math.nan` (GH-32170)
https://github.com/python/cpython/commit/182e93c3f57b0c72e765c9896066d32e461c0865


--
nosy: +JelleZijlstra

___
Python tracker 

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



[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2022-04-02 Thread Marek Suscak


Marek Suscak  added the comment:

Alright, the PR is up. This is my first contribution to Python and I had to 
sign the Contributor Agreement so it may take 1 business day before you're able 
to accept it. In the meantime, can you please review and let me know if 
anything needs to change? I wasn't sure where / how to add an entry in the 
NEWS.d folder. Can you please help me? Thanks!

--

___
Python tracker 

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



[issue41395] pickle and pickletools cli interface doesn't close input and output file.

2022-04-02 Thread Adam


Change by Adam :


--
nosy: +achhina
nosy_count: 7.0 -> 8.0
pull_requests: +30326
pull_request: https://github.com/python/cpython/pull/32257

___
Python tracker 

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



[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2022-04-02 Thread Marek Suscak


Change by Marek Suscak :


--
pull_requests: +30325
pull_request: https://github.com/python/cpython/pull/32256

___
Python tracker 

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



[issue47201] pip3.10.4 is configured with locations that require TLS/SSL, however the ssl module in Python is not available

2022-04-02 Thread Christian Heimes


Christian Heimes  added the comment:

CentOS 7 has an unsupported OpenSSL version. You need to build your own OpenSSL 
or use my work from https://github.com/tiran/cpython_builddep/#note

sudo yum install -y epel
sudo yum install -y openssl11-devel
sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure

--
nosy: +christian.heimes

___
Python tracker 

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



[issue40280] Consider supporting emscripten/webassembly as a build target

2022-04-02 Thread Christian Heimes


Christian Heimes  added the comment:

pmp-p wrote on GH-32253:
when using --enable-wasm-dynamic-linking i think --enable-shared should set 
-fPIC and -s SIDE_MODULE=1 for libpython.so

I have not tried --enable-shared with Emscripten yet. So far I have assumed 
that the result is a fat Python binary that can load additional shared 
libraries.

--

___
Python tracker 

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



[issue29920] Document cgitb.text and cgitb.html

2022-04-02 Thread Irit Katriel


Irit Katriel  added the comment:

Closing as the backport to 3.5/3.6 is no longer relevant and also cgitb is 
deprecated under 594.

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



[issue968063] Add fileinput.islastline()

2022-04-02 Thread Irit Katriel


Irit Katriel  added the comment:

I am closing this as the discussion ended in 2017 with something like three +0s.

Please raise this for discussion on python-ideas if you would like to pursue it 
further.

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



[issue968063] Add fileinput.islastline()

2022-04-02 Thread Irit Katriel


Irit Katriel  added the comment:

> This doesn't work because fileinput.filename()  and fileinput.filelineno()  
> are going to be wrong and pointing to the next file.


You won't have this problem if you work on one file at a time.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Christian Heimes


Christian Heimes  added the comment:

PS: Check out ./configure --help

--

___
Python tracker 

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



[issue27376] Add mock_import method to mock module

2022-04-02 Thread Irit Katriel


Irit Katriel  added the comment:

Closing as that's where the discussion of 2016 was leaning. Please raise this 
on python-ideas if you would like to bring it up again.

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



[issue47203] ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application.

2022-04-02 Thread StaticBits


New submission from StaticBits :

When I try importing the default library "binascii" using the command "import 
binascii", the result is the following error (also in the title):

ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 
application.

I've reinstalled Python and tried using the 32 bit version of Python, along 
with Python 3.9, but this error still persists.

Any help would be appreciated!

--
components: Library (Lib)
messages: 416573
nosy: puppy2655
priority: normal
severity: normal
status: open
title: ImportError: DLL load failed while importing binascii: %1 is not a valid 
Win32 application.
type: behavior
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



[issue47147] Allow `return yield from`

2022-04-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I concur with Terry.

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



[issue26023] Missing signatures operator module

2022-04-02 Thread Irit Katriel


Irit Katriel  added the comment:

I think this was fixed by now, this is an excerpt from help(operator):


lshift(a, b, /)
Same as a << b.

lt(a, b, /)
Same as a < b.

matmul(a, b, /)
Same as a @ b.

mod(a, b, /)
Same as a % b.

mul(a, b, /)
Same as a * b.

ne(a, b, /)
Same as a != b.

neg(a, /)
Same as -a.

not_(a, /)
Same as not a.

or_(a, b, /)
Same as a | b.

pos(a, /)
Same as +a.

pow(a, b, /)
Same as a ** b.

rshift(a, b, /)
Same as a >> b.

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Christian Heimes


Christian Heimes  added the comment:

As I said already, we require a pkg-config file for TCL/TK detection. It turned 
out to be too painful and too complicated to implement manual TCL/TK detection 
in configure.ac. Erlend and I tried and eventually gave up.

If your platform does not provide the pkg-config files, then you need to work 
around the problem or contribute a patch.

--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Anthony Sottile


Anthony Sottile  added the comment:

I could, but it's very unlikely to get fixed given I believe 18.04 is in 
security-only fixes and backporting a pkg-config file seems unlikely

this worked two days ago before this patch

--

___
Python tracker 

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



[issue24563] [doc] Encoding declaration: doc supported encodings

2022-04-02 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
title: Encoding declaration: doc supported encodings -> [doc] Encoding 
declaration: doc supported encodings
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5, Python 3.6

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Christian Heimes


Christian Heimes  added the comment:

Could you please open a distro bug with Ubuntu and report the issue? We require 
a pkg-config file for TCL/TK.

--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Anthony Sottile


Anthony Sottile  added the comment:

the `tk-dev` package on ubuntu bionic does not ship with a `pkg-config` file 
for tk so it does not build properly there: 

```
root@f0dd06a3e87c:/cpython# dpkg -L tk8.6-dev | grep pc
root@f0dd06a3e87c:/cpython# 
```

(a note: bionic reaches end of life in april 2023 so it is likely to still see 
significant use until then)

--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Christian Heimes


Christian Heimes  added the comment:

Please attach your config.log file. Did configure tell you that you are missing 
pkg-config?

--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Anthony Sottile


Anthony Sottile  added the comment:

this appears to break the tkinter extension for ubuntu bionic (18.04) -- I'm 
not entirely sure on the correct fix here but I get the following from trying 
to build there:

2022-04-02T15:52:08.0910452Z Python build finished successfully!
2022-04-02T15:52:08.0911924Z The necessary bits to build these optional modules 
were not found:
2022-04-02T15:52:08.0913469Z _tkinter


this is the tk I have available:

root@f0dd06a3e87c:/# dpkg -l | grep libtk
ii  libtk8.6:amd64   8.6.8-4 amd64  
  Tk toolkit for Tcl and X11 v8.6 - run-time files

--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue47202] Feature request: Throw an error when making impossible evaluation against an empty list

2022-04-02 Thread Eric V. Smith


Eric V. Smith  added the comment:

As Jelle says, this can't be a runtime Exception.

At best mypy or a linter could make iterating over an known empty list (like a 
literal []) a warning, not an error as suggested by the OP. I sometimes 
"comment out" loops by doing something like:

for i in []: # long_list_returning_function():
# lots of code here

I do this just to avoid re-indenting everything if I want to skip the loop 
during development.

--
nosy: +eric.smith

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> Is the "import _locale" still used in re/__init__.py? It cannot see any 
> reference to it in the code and test_re still if it's removed.

It is true.

> *Maybe* it's time to consider that re.template() and re.Scanner are no longer 
> experimental? Maybe change their status to alpha or beta? :-D

First we need to find original discussions for these features (it may be not 
easy) and decide whether we want to finish them or remove.

> In `Modules` folder, there are _sre.c/sre.h/sre_constants.h/sre_lib.h files. 
> Will them be put into a folder?

It is step 2.

> would it be possible to expose `parse_template` -- or at least some way to 
> validate that a regex replacement string is correct prior to executing the 
> replacement?

Maybe, in some form. Currently you can precompile a pattern, but for a 
replacement string you rely on a LRU cache. It is slower, and limited by the 
fixed size of the cache. I think it would be worth to add a function for 
compiling a replacement string. sub() etc should accept both string and a 
precompiled template object. It is a separate issue.

--

___
Python tracker 

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



[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2022-04-02 Thread Jeremy Kloth


Jeremy Kloth  added the comment:

bpo-47089 is a duplicate of this issue and is fixed.  This issue should be 
closed as well.

--

___
Python tracker 

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



[issue40280] Consider supporting emscripten/webassembly as a build target

2022-04-02 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +30324
pull_request: https://github.com/python/cpython/pull/32253

___
Python tracker 

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



[issue47202] Feature request: Throw an error when making impossible evaluation against an empty list

2022-04-02 Thread Luminair


Luminair  added the comment:

Thank you for the quick response Jelle! I do like mypy, and I will file this 
with them. Good luck with the migration to GitHub :)

--

___
Python tracker 

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



[issue47202] Feature request: Throw an error when making impossible evaluation against an empty list

2022-04-02 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

This sort of thing would be better caught by a linter or type checker. For 
example, mypy with the `--warn-unreachable` option will flag the `while None:` 
example.

Iterating over an empty list will not currently be caught by mypy, but it's 
common in real code to iterate over a list that may be empty, so it would be a 
major compatibility break for Python to error when iterating over an empty list.

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



[issue47202] Feature request: Throw an error when making impossible evaluation against an empty list

2022-04-02 Thread Luminair


New submission from Luminair :

Below are four examples of impossible code that operates on nothing. The latter 
two continue silently, throwing no errors. I saw a bug sneak by because of 
this. I wonder if it is within the scope of Python's design to throw Exceptions 
in these situations? 

x = 

for x in : print("This code is never reached")

while(None): print("This code is never reached")

emptylist = []
for x in emptylist:
if emptylist[x] == "This code is never reached":
print("This code is never reached")
else: print("This code is never reached")

--
components: Parser
messages: 416559
nosy: Luminair, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Feature request: Throw an error when making impossible evaluation 
against an empty list
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



[issue47201] pip3.10.4 is configured with locations that require TLS/SSL, however the ssl module in Python is not available

2022-04-02 Thread Alessandro Pioli


New submission from Alessandro Pioli :

After installation of 3.4.10 with openssl procedure 
https://docs.python.org/3/using/unix.html#on-linux
on centos 7.9 
pip get this error:

pip3.10 install -r requirements.txt 
WARNING: pip is configured with locations that require TLS/SSL, however the ssl 
module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL 
because the SSL module is not available.")': /simple/jinja2/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL 
because the SSL module is not available.")': /simple/jinja2/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL 
because the SSL module is not available.")': /simple/jinja2/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL 
because the SSL module is not available.")': /simple/jinja2/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL 
because the SSL module is not available.")': /simple/jinja2/
Could not fetch URL https://pypi.org/simple/jinja2/: There was a problem 
confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): 
Max retries exceeded with url: /simple/jinja2/ (Caused by SSLError("Can't 
connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement Jinja2 (from 
versions: none)
ERROR: No matching distribution found for Jinja2
WARNING: pip is configured with locations that require TLS/SSL, however the ssl 
module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem 
confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): 
Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect 
to HTTPS URL because the SSL module is not available.")) - skipping

--
components: Installation
messages: 416558
nosy: alessandro.pioli
priority: normal
severity: normal
status: open
title: pip3.10.4 is configured with locations that require TLS/SSL, however the 
ssl module in Python is not available
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



[issue47152] Reorganize the re module sources

2022-04-02 Thread Anthony Sottile


Anthony Sottile  added the comment:

would it be possible to expose `parse_template` -- or at least some way to 
validate that a regex replacement string is correct prior to executing the 
replacement?

I'm currently using that for my text editor: 
https://github.com/asottile/babi/blob/d37d7d698d560aef7c6a0d1ec0668672e039bd9a/babi/screen.py#L501

--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue47200] Add ZipInfo.mode property

2022-04-02 Thread Sam Ezeh


Change by Sam Ezeh :


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

___
Python tracker 

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



[issue47194] Upgrade to zlib v1.2.12 in CPython binary releases

2022-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset 16a809ffb7af14898ce9ec8165960d96cbcd4ec3 by Miss Islington (bot) 
in branch '3.10':
bpo-47194: Update zlib to v1.2.12 on Windows to resolve CVE-2018-25032 
(GH-32241)
https://github.com/python/cpython/commit/16a809ffb7af14898ce9ec8165960d96cbcd4ec3


--

___
Python tracker 

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



[issue47194] Upgrade to zlib v1.2.12 in CPython binary releases

2022-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset 0f0f85e9d8088eb789cda35477900df32adff546 by Miss Islington (bot) 
in branch '3.9':
bpo-47194: Update zlib to v1.2.12 on Windows to resolve CVE-2018-25032 
(GH-32241)
https://github.com/python/cpython/commit/0f0f85e9d8088eb789cda35477900df32adff546


--

___
Python tracker 

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



[issue47192] sys._getframe audit event has frame as argument in 3.8-3.10

2022-04-02 Thread Steve Dower


Steve Dower  added the comment:

This should be fixed in the docs and also in 3.11. Now that we've shipped 
releases that include the frame, we should keep doing it.

If it's impossible to get a frame object in 3.11 (because it would deoptimize 
all the work that's been done there), it should pass None. Changing the value 
of the argument is fine, but changing the schema is not.

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



[issue22738] improve 'python -h' documentation for '-c'

2022-04-02 Thread Irit Katriel


Irit Katriel  added the comment:

Closing as the discussion stalled about 7 years ago and was then leaning 
towards rejecting the suggestion.

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



[issue47194] Upgrade to zlib v1.2.12 in CPython binary releases

2022-04-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30322
pull_request: https://github.com/python/cpython/pull/32251

___
Python tracker 

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



[issue47194] Upgrade to zlib v1.2.12 in CPython binary releases

2022-04-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30321
pull_request: https://github.com/python/cpython/pull/32250

___
Python tracker 

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



[issue47194] Upgrade to zlib v1.2.12 in CPython binary releases

2022-04-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30320
pull_request: https://github.com/python/cpython/pull/32249

___
Python tracker 

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



[issue47194] Upgrade to zlib v1.2.12 in CPython binary releases

2022-04-02 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue47194] Upgrade to zlib v1.2.12 in CPython binary releases

2022-04-02 Thread Steve Dower


Steve Dower  added the comment:


New changeset 6066739ff7794e54c98c08b953a699cbc961cd28 by Zachary Ware in 
branch 'main':
bpo-47194: Update zlib to v1.2.12 on Windows to resolve CVE-2018-25032 
(GH-32241)
https://github.com/python/cpython/commit/6066739ff7794e54c98c08b953a699cbc961cd28


--

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-02 Thread Ma Lin


Ma Lin  added the comment:

In `Modules` folder, there are _sre.c/sre.h/sre_constants.h/sre_lib.h files. 
Will them be put into a folder?

--

___
Python tracker 

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



[issue27817] tkinter string variable misinterpreted as boolean

2022-04-02 Thread Irit Katriel


Change by Irit Katriel :


--
stage: test needed -> 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



[issue47200] Add ZipInfo.mode property

2022-04-02 Thread Sam Ezeh


New submission from Sam Ezeh :

Initially, I was looking at bpo-18262 and saw the following Stack Overflow 
thread that was linked.

https://stackoverflow.com/questions/434641/how-do-i-set-permissions-attributes-on-a-file-in-a-zip-file-using-pythons-zip/6297838

I've attached a patch that gives ZipInfo objects a `ZipInfo.mode` property 
getter and setter to get and set the file mode.

I considered adding ZipFile.chmod but I didn't know how it would work given 
that archives can contain duplicate files.

As an aside, I wondered if there's a way to update file attributes inside zip 
archives without deleting and rewriting them and if not, whether it would be 
worthwhile to add one.

--
components: Library (Lib)
files: sam_ezeh.patch
keywords: patch
messages: 416550
nosy: sam_ezeh
priority: normal
severity: normal
status: open
title: Add ZipInfo.mode property
type: enhancement
versions: Python 3.11
Added file: https://bugs.python.org/file50715/sam_ezeh.patch

___
Python tracker 

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



[issue47143] Add types.copy_class() which updates closures

2022-04-02 Thread STINNER Victor

STINNER Victor  added the comment:

Lumír Balhar:
> Do you think it's a good idea to start a PR with a copy of the implementation 
> from attrs for Python 3.11? We can then add tests for the new function and 
> also some for dataclasses where this new function is needed and try to find 
> all corner cases.

I'm worried that attrs license is MIT with an "advertisement clause" (the MIT 
license must be mentioned), whereas Python has a different license. I'm 
planning to contact the 3 authors of the code to ask their permission.

Also, I expect more feedback on this "idea" first:

> I would like to implement this function, but first I would like to discuss if 
> it makes sense to add such function and check if it's the right abstraction.

--

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-02 Thread STINNER Victor


STINNER Victor  added the comment:

It's funny to still see mentions of "experimental stuff" in Python 3.11 (2022), 
whereas these "experimental stuff" are there for 20 years.

*Maybe* it's time to consider that re.template() and re.Scanner are no longer 
experimental? Maybe change their status to alpha or beta? :-D


commit 770617b23e286f1147f9480b5f625e88e7badd50
Author: Fredrik Lundh 
Date:   Sun Jan 14 15:06:11 2001 +

SRE fixes for 2.1 alpha:

+# sre extensions (experimental, don't rely on these)
+T = TEMPLATE = sre_compile.SRE_FLAG_TEMPLATE # disable backtracking


commit 7cafe4d7e466996d5fc32e871fe834e0e0c94282
Author: Fredrik Lundh 
Date:   Sun Jul 2 17:33:27 2000 +

- actually enabled charset anchors in the engine (still not
  used by the code generator)

- changed max repeat value in engine (to match earlier array fix)

- added experimental "which part matched?" mechanism to sre; see
  http://hem.passagen.se/eff/2000_07_01_bot-archive.htm#416954
  or python-dev for details.


+# experimental stuff (see python-dev discussions for details)
+
+class Scanner:
(...)

--

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-02 Thread STINNER Victor


STINNER Victor  added the comment:

Is the "import _locale" still used in re/__init__.py? It cannot see any 
reference to it in the code and test_re still if it's removed.

The last reference to the _locale module has been removed in 2017 by the commit 
898ff03e1e7925ecde3da66327d3cdc7e07625ba.

diff --git a/Lib/re/__init__.py b/Lib/re/__init__.py
index c47a2650e3..b887722bbb 100644
--- a/Lib/re/__init__.py
+++ b/Lib/re/__init__.py
@@ -124,10 +124,6 @@
 import enum
 from . import _compiler, _parser
 import functools
-try:
-import _locale
-except ImportError:
-_locale = None
 
 
 # public symbols

--

___
Python tracker 

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



[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2022-04-02 Thread Łukasz Langa

Łukasz Langa  added the comment:

Marek, I can merge a fix for 3.9 for this. I don't think we should be removing 
_markupbase.ParserBase.error() in 3.9 as GH-8562 is doing. So we'd need a new 
patch, like GH-17643. However, that will need a test as well.

Would you be interested in creating the patch?

--

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-02 Thread STINNER Victor


STINNER Victor  added the comment:

$ ls Lib/re/
_compiler.py  _constants.py  __init__.py  _parser.py

Thanks, that's a nice enhancement!

Serhiy: Would you mind to explicitly document the 3 deprecated modules in 
What's New in Python 3.11?
https://docs.python.org/dev/whatsnew/3.11.html#deprecated

--

___
Python tracker 

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



[issue47143] Add types.copy_class() which updates closures

2022-04-02 Thread Lumír Balhar

Lumír Balhar  added the comment:

Do you think it's a good idea to start a PR with a copy of the implementation 
from attrs for Python 3.11? We can then add tests for the new function and also 
some for dataclasses where this new function is needed and try to find all 
corner cases.

--
nosy: +frenzy

___
Python tracker 

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



  1   2   >