[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2021-06-30 Thread Savage Hood


Change by Savage Hood :


--
assignee:  -> christian.heimes
components: +Installation, Interpreter Core, Library (Lib), Windows, XML, 
ctypes, email
nosy: +barry, paul.moore, r.david.murray, 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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-30 Thread miss-islington


miss-islington  added the comment:


New changeset 94a4136c8eba349dc7eebe561ddaedbd0a89eb91 by Miss Islington (bot) 
in branch '3.10':
bpo-43425: Update _osx_support not to use distutils.log (GH-26968)
https://github.com/python/cpython/commit/94a4136c8eba349dc7eebe561ddaedbd0a89eb91


--

___
Python tracker 

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



[issue43770] Rework C types initialization

2021-06-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset dd3adc013b21ec1338bb5fea2e2c04a4fc650306 by Victor Stinner in 
branch 'main':
bpo-43770: Cleanup _PyObject_GetMethod() (GH-26946)
https://github.com/python/cpython/commit/dd3adc013b21ec1338bb5fea2e2c04a4fc650306


--

___
Python tracker 

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



[issue32732] LoggingAdapter ignores extra kwargs of Logger#log()

2021-06-30 Thread Samuel Henrique

Samuel Henrique  added the comment:

Hello Vinay Sajip,

I would like to kindly ask you to please reconsider and give your thoughts on 
my description of the issue here.

Let me try to work based on your last reply:
> ...has been around since Jan 2008, and it seems that no one in that time has 
> raised this as a must-have

This is a fair statement and it certainly shows that this is not a big enough 
issue for enough people to complain about. I believe it falls into the 
"papercut" category of issues and people just override the "process" method 
when they hit it.

> 1. If you want to pass different kwargs in every time, use a logger.
> 2. If you want to pass particular contextual information in which fits the 
> "extra" parameter approach, use a LoggerAdapter.
> 3. If that doesn't do it for you, subclass LoggerAdapter and implement what 
> you need.

We could improve the logging library by removing the limitation #1 with no 
apparent downsides, so please bear with me for my example below.

> You haven't really explained why you need this to work in this particular 
> way, so I suspect it could be an XY problem.

So Steffen Schuldenzucker already provided an use case, I have one which is 
very similar and hopefully easily recognizable as a common (or at least not 
rare) usage pattern of logging:

As a logging user, I would like to have a set of extra keys in the formatter, 
some required and some optional, such that I can make use of LoggerAdapter to 
set the constant extra values only once, and still pass the dynamic extra 
values on each "log" method.

Pseudo code:
# assume logger is a logger object with a formatter that allows for dynamic 
extra keys (dynamic = optional extra keys)
adapted_logger = logging.LoggerAdapter(logger, extra={"invocation_id": 
"invocation_id_value"})
adapted_logger.info("test", extra={"resource_owner": "resource_owner_value"})

In this example I expect the log entry to contain both extra keys: 
"invocation_id" and "resource_owner". invocation_id is reused in every log 
entry but resource_owner changes based on what's being processed.

For reference, this is an example of a Formatter which allows for dynamic extra 
keys and formats log entries to json serialized strings:

class ExtraFormatter(logging.Formatter):
"""
Dynamically adds any extra key to a json-like output.
"""

def format(self, record: logging.LogRecord) -> str:
default_attrs = vars(
logging.LogRecord(None, None, None, None, None, None, None)
).keys()
extras = set(record.__dict__.keys()) - set(default_attrs)

log_items = {"message": "%(message)s"}
for attr in extras:
log_items[attr] = f"%({attr})s"
format_str = json.dumps(log_items)
self._style._fmt = format_str

return super().format(record)

The reason I believe this is a papercut type of issue is that I would expect 
the Formatter to control whether or not to show the extra key, not the 
LoggerAdapter. It is counter intuitive to me that the LoggerAdapter would 
silently drop any extra keys provided to the log methods, and I would expect 
that LoggerAdapter would at least not allow for the parameter to be passed then 
(I don't like this alternative either, but it removes the feeling of being 
tricked).

Again, this is a problem that can easily be workaround-ed by overriding the 
"process" method. But there seems to be a very good opportunity to improve the 
Adapter instead and avoid letting other people hit this issue. I'm curious 
about your opinion on any downsides to this change as I couldn't come up with 
anything.

There is also a problem with the current documentation, in which the 
LoggerAdapter doc led me (and other people, when we had to debug this issue) to 
believe the Adapter would not silently drop the extra parameters. The only 
place where this behavior is mentioned is in the logging-cookbook, in the 
following part:
"Of course, if you had passed an ‘extra’ keyword argument in the call to the 
adapter, it will be silently overwritten."

The "Of course" part is a little bit weird cause it implies it's an obvious 
behavior, whereas the sentence just before this one says: "The default 
implementation of this method leaves the message alone, but inserts an ‘extra’ 
key in the keyword argument whose value is the dict-like object passed to the 
constructor.". Note how it uses the word "inserts" instead of "overrides".

So the documentation has to be updated, either to mention this behavior in the 
LoggerAdapter documentation or to remove the part about extra being silently 
overwritten in the cookbook, the only place this is mentioned (if this gets 
changed).

I worked on a patch, with tests, before noticing this issue was open, so I'm 
gonna attach my patch to this message anyway. I also pushed the commit to my 
fork at 
https://github.com/samueloph/cpython/commit/a0c0e68db9adc405d65fd529a7e17c0c026a85af

To summarize, I would like you to consider 

[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25541
pull_request: https://github.com/python/cpython/pull/26978

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-30 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset c8979f780e4b7d6db5693cb26a2956cc785abb48 by Dong-hee Na in branch 
'main':
bpo-43425: Update _osx_support not to use distutils.log (GH-26968)
https://github.com/python/cpython/commit/c8979f780e4b7d6db5693cb26a2956cc785abb48


--

___
Python tracker 

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



[issue44531] Add _PyType_AllocNoTrack() function: allocate without tracking in the GC

2021-06-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 818628c2da99ba0376313971816d472c65c9a9fc by Victor Stinner in 
branch 'main':
bpo-44531: Add _PyType_AllocNoTrack() function (GH-26947)
https://github.com/python/cpython/commit/818628c2da99ba0376313971816d472c65c9a9fc


--

___
Python tracker 

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



[issue43412] object.h -Wcast-qual warning

2021-06-30 Thread STINNER Victor

STINNER Victor  added the comment:

> Duplicated by https://bugs.python.org/issue44378, which has a fix merged.

Right. I close the issue as a duplicate.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Py_IS_TYPE(): cast discards ‘const’ qualifier from pointer 
target type

___
Python tracker 

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



[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-06-30 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 1b28187a0e3e914ee48de8032cbba0a965dd5563 by Batuhan Taskaya in 
branch 'main':
bpo-44313: generate LOAD_ATTR/CALL_FUNCTION for top-level imported objects 
(GH-26677)
https://github.com/python/cpython/commit/1b28187a0e3e914ee48de8032cbba0a965dd5563


--

___
Python tracker 

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



[issue44461] 'Pdb' object has no attribute 'botframe'

2021-06-30 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Thanks Irit. Reviewing now...

--
assignee:  -> jaraco

___
Python tracker 

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



[issue39846] Register .whl as a unpack format in shutil unpack

2021-06-30 Thread Dominic Davis-Foster


Dominic Davis-Foster  added the comment:

I have run into this myself and was surprised unpack_archive didn't support 
wheels. I would like to see support added, and don't mind doing the work myself.

That said, I can see there being an issue with the number of supported 
zip-based formats ballooning: Java JARs, Android APKs etc.
However, wheels have a use case for easily extracting them -- that's how 
they're installed. I can't see a use case for being able to *easily* extract 
other formats.

If there's no opposition I will start work on a PR.

--
nosy: +domdfcoding
versions: +Python 3.11 -Python 3.8, Python 3.9

___
Python tracker 

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



[issue33140] shutil.chown should not be defined in Windows

2021-06-30 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Steve: makes sense, I closed the PR; thanks for looking at this and taking the 
time to explain!

--

___
Python tracker 

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



[issue33140] shutil.chown should not be defined in Windows

2021-06-30 Thread Steve Dower


Steve Dower  added the comment:

I agree that's theoretically how it should go, but we've had enough examples of 
undocumented/buggy behaviour where the fix was worse than the bug (to the point 
where we brought back an undocumented C field that was deprecated in 3.0 
because removing it in 3.8 broke too many people). 

A couple of versions with a warning on will reduce the surprise. People are 
(slowly) learning that DeprecationWarnings matter, so I don't think it'll be 
wasted effort.

--

___
Python tracker 

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



[issue33140] shutil.chown should not be defined in Windows

2021-06-30 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Steve: it seems to me that the goal of normal deprecation process is, given 
that a functionality is available and documented, prepare to find a replacement 
for it by some future version.

In this case it's documented not to be available and doesn't work so this 
should perhaps fall under fixing a bug?

It's true that this is backwards incompatible for the reason you pointed out 
(and I missed), but I think breaking compatibility is ok in new versions for 
bug fixes? (as long as it's added to "what's new", which I haven't done yet).

If I'm wrong about this, I'll go ahead and make another PR for deprecation and 
close this one..

--

___
Python tracker 

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



[issue33140] shutil.chown should not be defined in Windows

2021-06-30 Thread Steve Dower


Steve Dower  added the comment:

We can't delete the definition without going through a deprecation process, as 
it will break existing code with a new exception at the point of access rather 
than the point of use. At best, we can short-circuit those errors and raise 
them with a more appropriate description.

For 3.11, we can deprecate the function on Windows and plan to remove it in 
3.13. I don't see any problem with this, but it's a different change from PR 
26973.

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



[issue44535] Cannot build in VS 2022

2021-06-30 Thread Steve Dower


Change by Steve Dower :


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



[issue41180] marshal load bypass code.__new__ audit event

2021-06-30 Thread Steve Dower


Change by Steve Dower :


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



[issue44535] Cannot build in VS 2022

2021-06-30 Thread miss-islington


miss-islington  added the comment:


New changeset 67e394562d67cbcd0ac8114e5439494e7645b8f5 by Miss Islington (bot) 
in branch '3.9':
bpo-44535: Enable building with Visual Studio 2022 on Windows (GH-26962)
https://github.com/python/cpython/commit/67e394562d67cbcd0ac8114e5439494e7645b8f5


--

___
Python tracker 

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



[issue44535] Cannot build in VS 2022

2021-06-30 Thread miss-islington


miss-islington  added the comment:


New changeset 6843a3b9300eb80c2bf5dac7dd363dae9e6f000d by Miss Islington (bot) 
in branch '3.10':
bpo-44535: Enable building with Visual Studio 2022 on Windows (GH-26962)
https://github.com/python/cpython/commit/6843a3b9300eb80c2bf5dac7dd363dae9e6f000d


--

___
Python tracker 

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



[issue43412] object.h -Wcast-qual warning

2021-06-30 Thread Leif Walsh


Leif Walsh  added the comment:

Duplicated by https://bugs.python.org/issue44378, which has a fix merged.

--
nosy: +leif.walsh

___
Python tracker 

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



[issue42369] Reading ZipFile not thread-safe

2021-06-30 Thread Kevin Mehall


Kevin Mehall  added the comment:

I think I found the root cause of this problem and proposed a fix in 
https://github.com/python/cpython/pull/26974

To monkey-patch this fix on existing versions of Python, I'm using:

class PatchedSharedFile(zipfile._SharedFile):
def __init__(self, *args):
super().__init__(*args)
self.tell = lambda: self._pos
zipfile._SharedFile = PatchedSharedFile

--

___
Python tracker 

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



[issue44535] Cannot build in VS 2022

2021-06-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25540
pull_request: https://github.com/python/cpython/pull/26976

___
Python tracker 

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



[issue44535] Cannot build in VS 2022

2021-06-30 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44535] Cannot build in VS 2022

2021-06-30 Thread Steve Dower


Steve Dower  added the comment:


New changeset d3a95c1b6eacbbbd92c294744e7ed41932f3f63e by Steve Dower in branch 
'main':
bpo-44535: Enable building with Visual Studio 2022 on Windows (GH-26962)
https://github.com/python/cpython/commit/d3a95c1b6eacbbbd92c294744e7ed41932f3f63e


--

___
Python tracker 

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



[issue42369] Reading ZipFile not thread-safe

2021-06-30 Thread Kevin Mehall


Change by Kevin Mehall :


--
keywords: +patch
nosy: +kevinmehall
nosy_count: 5.0 -> 6.0
pull_requests: +25538
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26974

___
Python tracker 

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



[issue40066] Enum: modify __repr__, __str__; update docs

2021-06-30 Thread Michael Cuthbert


Michael Cuthbert  added the comment:

It may be helpful for the enum module to come with transitional functions like 
"pre310_str()" "pre310_repr()" "pre310_flag_str()" etc. so that people who are 
writing doctests that need to function on both < 3.10 and 3.10+ can temporarily 
do a "Enum.__str__ = pre310_str" in their test suites (and of course restore it 
later) until <=3.9 is no longer supported.  Otherwise everyone with doctest 
suites will be doing this ourselves.

--
nosy: +mscuthbert

___
Python tracker 

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



[issue33140] shutil.chown should not be defined in Windows

2021-06-30 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Created the PR: https://github.com/python/cpython/pull/26973/files

--

___
Python tracker 

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



[issue33140] shutil.chown should not be defined in Windows

2021-06-30 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
keywords: +patch
nosy: +andrei.avk
nosy_count: 6.0 -> 7.0
pull_requests: +25537
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/26973

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2021-06-30 Thread Steve Dower


Steve Dower  added the comment:


New changeset 95919b0d2744adb87acf696ae1de905cf02a95a6 by Steve Dower in branch 
'main':
bpo-41180: Fixes documentation to specify correct event name and add 
versionchanged (GH-26972)
https://github.com/python/cpython/commit/95919b0d2744adb87acf696ae1de905cf02a95a6


--

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2021-06-30 Thread Steve Dower


Steve Dower  added the comment:


New changeset 863e3d5c7e037b24b8294b041ed7686b522973d8 by Steve Dower in branch 
'3.9':
bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and 
marshal.dumps (GH-26971)
https://github.com/python/cpython/commit/863e3d5c7e037b24b8294b041ed7686b522973d8


--

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2021-06-30 Thread Steve Dower


Steve Dower  added the comment:


New changeset a5764d3d96341441d3f70fb5c96a82610a3f4842 by Steve Dower in branch 
'3.10':
bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and 
marshal.dumps (GH-26970)
https://github.com/python/cpython/commit/a5764d3d96341441d3f70fb5c96a82610a3f4842


--

___
Python tracker 

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



[issue44541] collections.abc.Sequence index implementation

2021-06-30 Thread Ken Jin


Ken Jin  added the comment:

Closing this issue since OP(Maciej) has marked it as "not a bug".

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



[issue41180] marshal load bypass code.__new__ audit event

2021-06-30 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +25536
pull_request: https://github.com/python/cpython/pull/26972

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2021-06-30 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +25535
pull_request: https://github.com/python/cpython/pull/26971

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2021-06-30 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +25534
pull_request: https://github.com/python/cpython/pull/26970

___
Python tracker 

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



[issue44541] collections.abc.Sequence index implementation

2021-06-30 Thread Maciej Kopeć

Maciej Kopeć  added the comment:

Sorry for the hastily posted issue, when stop is not given this should work 
properly, and since stop is exclusive in python, this shall be expected 
behaviour.

--
resolution:  -> not a bug

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-30 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +25533
pull_request: https://github.com/python/cpython/pull/26969

___
Python tracker 

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



[issue44541] collections.abc.Sequence index implementation

2021-06-30 Thread Maciej Kopeć

New submission from Maciej Kopeć :

Hello,

https://github.com/python/cpython/blob/3.9/Lib/_collections_abc.py#L1012
Shouldn't the loop condition be i <= 0 not i < 0? The implementation now is 
causing not to search in 1-element sequences, since it raises ValueError. 
Please let me know if this is the expected behaviour.

Kind regards,
Maciej Kopeć

--
messages: 396783
nosy: LordVilgefortz
priority: normal
severity: normal
status: open
title: collections.abc.Sequence index implementation
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



[issue41180] marshal load bypass code.__new__ audit event

2021-06-30 Thread Steve Dower


Steve Dower  added the comment:


New changeset 139de04518bd98a975b7c98ab8a38e570dc585e4 by Steve Dower in branch 
'main':
bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and 
marshal.dumps (GH-26961)
https://github.com/python/cpython/commit/139de04518bd98a975b7c98ab8a38e570dc585e4


--

___
Python tracker 

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



[issue44538] ast.Slice 3.9.6 documentation bug

2021-06-30 Thread Tim


Tim  added the comment:

I was using 3.8. I followed the same steps on 3.9 and confirmed it worked - 
closing now.

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



[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2021-06-30 Thread Safihre


Safihre  added the comment:

Is anyone available to give feedback on the remaining questions/problems in the 
PR?

I don't want to be pushy and if it's only changed in 3.11, I understand, but 
just hoping for some progress :)
Also willing to dive into it myself, but not a network/python-core specialist 
to really get all the details right away.

--

___
Python tracker 

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



[issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

2021-06-30 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +25532
pull_request: https://github.com/python/cpython/pull/26968

___
Python tracker 

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



[issue34723] lower() on Turkish letter "İ" returns a 2-chars-long string

2021-06-30 Thread qdinar

qdinar  added the comment:

Şahin Kureta said: "I know it is not finalized and released yet but are you 
going to implement Version 14.0.0 of the Unicode Standard? It finally solves 
the issue of Turkish lower/upper case 'I' and 'i'." .

this looks like that unicode version 14 has some new things about that. it is 
not so. it same as version 13. compare 
https://www.unicode.org/Public/13.0.0/ucd/SpecialCasing.txt and 
https://www.unicode.org/Public/14.0.0/ucd/SpecialCasing-14.0.0d8.txt ( if it is 
404 try to enter from https://www.unicode.org/Public/14.0.0/ucd/ ).

--
nosy: +qdinar

___
Python tracker 

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



[issue44524] __name__ attribute in typing module

2021-06-30 Thread Lars


Lars  added the comment:

I have been doing some research, but note that I don't have much experience 
with the typing module. That said, there seem to be 2 main cases:

 - '_SpecialForm': with instances Any, Union, etc.
 - '_BaseGenericAlias'/'_SpecialGenericAlias': base classes collections classes.

I think '_SpecialForm' can be enhanced to have '__name__' by replacing the 
'_name' attribute with '__name__'. Maybe add '__qualname__' as well. I cannot 
say whether there are many more attributes that could be implemented to have 
the same meaning as in 'type'. The meaning of attributes like '__mro__' seem 
difficult to define.
Alternatively '__getattr__' could be added (but that might be too much):

def __getattr__(self, attr):
return getattr(self._getitem, attr)

'_BaseGenericAlias''_SpecialGenericAlias' the '__getattr__' method could 
perhaps be adapted (or overridden in '_SpecialGenericAlias') as follows, from:

def __getattr__(self, attr):
# We are careful for copy and pickle.
# Also for simplicity we just don't relay all dunder names
if '__origin__' in self.__dict__ and not _is_dunder(attr):
return getattr(self.__origin__, attr)
raise AttributeError(attr)

to:

def __getattr__(self, attr):
if '__origin__' in self.__dict__:
return getattr(self.__origin__, attr)
raise AttributeError(attr)

or perhaps:

def __getattr__(self, attr):
if '__origin__' in self.__dict__ and hasattr(type, attr):
return getattr(self.__origin__, attr)
raise AttributeError(attr)

to forward unresolved attribute names to the original class.

I have written some tools and tested some with the above solutions and this 
seems to solve the missing '__name__' issue and make the typing abc's much more 
in line with the collection abc's. However I did not do any unit/regression 
testing (pull the repo, etc.)

tools are attached.

--
Added file: https://bugs.python.org/file50135/typing_attributes.py

___
Python tracker 

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



[issue43770] Rework C types initialization

2021-06-30 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue34798] pprint ignores the compact parameter for dicts

2021-06-30 Thread Irit Katriel


Irit Katriel  added the comment:

I made PR26967 to break up the paragraph about the constructor params so that 
it's easier to read, and also added emphasis around the "sequence" point.

--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

___
Python tracker 

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



[issue34798] pprint ignores the compact parameter for dicts

2021-06-30 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue44540] venv: activate.bat fails for venv with special characters in PATH

2021-06-30 Thread MB113


New submission from MB113 :

If your virtual env Scripts folder is in a path with a special character (for 
batch-scripts) it will give this error:  

The system cannot find the path specified.

In my case it was a '&' in my path.

Now I see that the fix from specifically this issue: 
https://bugs.python.org/issue36634 has caused my problems.

So in the end neither works.
set "VIRTUAL_ENV=__VENV_DIR__" doesn't work with quotes
set VIRTUAL_ENV=__VENV_DIR__  doesn't work with 'special chars' (&*)

--
components: Library (Lib), Windows
messages: 396776
nosy: MB113, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: venv: activate.bat fails for venv with special characters in PATH
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



[issue24499] Python Installer text piles up during installation process

2021-06-30 Thread Irit Katriel


Irit Katriel  added the comment:

Please create a new issue if you are still seeing this on a current version.

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

___
Python tracker 

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



[issue42238] Deprecate suspicious.py?

2021-06-30 Thread Julien Palard


Change by Julien Palard :


--
pull_requests: +25530
pull_request: https://github.com/python/cpython/pull/26966

___
Python tracker 

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



[issue42238] Deprecate suspicious.py?

2021-06-30 Thread Julien Palard


Julien Palard  added the comment:

Another true positive:

... versionchanged:: 3.11

from : 6cb145d23f5cf69b6d7414877d142747cd3d134c / 
https://github.com/python/cpython/pull/26820

I also think it can be implemented in rstlint.

--

___
Python tracker 

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



[issue44539] Imghdr JPG Quantized

2021-06-30 Thread Mohamad Mansour


Change by Mohamad Mansour :


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

___
Python tracker 

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



[issue25653] ctypes+callbacks+fork+selinux = crash

2021-06-30 Thread Petr Viktorin


Petr Viktorin  added the comment:

Here's a simpler reproducer.

--
nosy: +petr.viktorin
Added file: https://bugs.python.org/file50134/y.py

___
Python tracker 

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



[issue44539] Imghdr JPG Quantized

2021-06-30 Thread Mohamad Mansour


Change by Mohamad Mansour :


--
components: +Library (Lib) -C API

___
Python tracker 

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



[issue42514] Relocatable framework for macOS

2021-06-30 Thread macmule


macmule  added the comment:

Just wondering if any movement on this etc.

This is something I've been struggling with too, and have attempted to overcome 
via Greg's project to no avail.

--
nosy: +macmule

___
Python tracker 

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



[issue44539] Imghdr JPG Quantized

2021-06-30 Thread Mohamad Mansour


New submission from Mohamad Mansour :

Previous method to check JPG images was using the following command (h[6:10] in 
(b'JFIF', b'Exif'))
However, its not always the case as some might start with b'\xff\xd8\xff\xdb' 
header.
Reference:
https://www.digicamsoft.com/itu/itu-t81-36.html
https://web.archive.org/web/20120403212223/http://class.ee.iastate.edu/ee528/Reading%20material/JPEG_File_Format.pdf

--
components: C API
messages: 396771
nosy: m.mansour
priority: normal
severity: normal
status: open
title: Imghdr JPG Quantized
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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-30 Thread Yurii Karabas


Yurii Karabas <1998uri...@gmail.com> added the comment:

@Ken I will pick up this issue, thanks for asking.

--

___
Python tracker 

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



[issue44538] ast.Slice 3.9.6 documentation bug

2021-06-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What Python version did you tried?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue43232] Prohibit previously deprecated operations on asyncio.trsock.TransportSocket

2021-06-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1d08d85cbe49c0748a8ee03aec31f89ab8e81496 by Illia Volochii in 
branch 'main':
bpo-43232: Remove previously deprecated methods on TransportSocket (GH-24538)
https://github.com/python/cpython/commit/1d08d85cbe49c0748a8ee03aec31f89ab8e81496


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue43232] Prohibit previously deprecated operations on asyncio.trsock.TransportSocket

2021-06-30 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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