[issue44291] Unify logging.handlers.SysLogHandler behavior with SocketHandlers

2021-06-05 Thread Vinay Sajip
Vinay Sajip added the comment: > Oh, sorry bad wording. OK, I see. Will take a look soon. > it looks like we can refactor SysLogHandler to inherit from SocketHandler. > Not sure if it should be done in this PR Better a separate PR for that, I feel. Removing the older Pythons from the

[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-06-05 Thread Andrei Kulakov
Andrei Kulakov added the comment: Mark: With sep=None, I don't think there is an issue. My only concern is when sep is set to some other value. The original issue was that the single empty str result is removed when using sep=None and that it's kept when sep is some other value. So the

[issue44318] Asyncio classes missing __slots__

2021-06-05 Thread wyz23x2
wyz23x2 added the comment: OK, so: >>> (1).__slots__ Traceback (most recent call last): File "", line 1, in AttributeError: 'int' object has no attribute '__slots__' >>> 4.5.__slots__ Traceback (most recent call last): File "", line 1, in AttributeError: 'float' object has no attribute

[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Batuhan, can you take a look? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44309] Add support for yescrypt in crypt.

2021-06-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +christian.heimes versions: +Python 3.11 -Python 3.10 ___ Python tracker ___ ___

[issue44309] Add support for yescrypt in crypt.

2021-06-05 Thread Christian Heimes
Christian Heimes added the comment: I'm against adding additional methods to the crypt module. - libcrypt / libxcrypt are unreliable providers. The library is only available on Unix-like platforms, not on Windows. Available algorithms are not consistent, e.g. some platforms only provide

[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-06-05 Thread Andrei Kulakov
Andrei Kulakov added the comment: To clarify with pseudocode, this is how it could work: '' => [] # sep=None, keep_single_empty=False '' => [''] # sep=None, keep_single_empty=True '' => [] # sep=',', keep_single_empty=False 'a,,' => ['a','','']# sep=',',

[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-06-05 Thread Mark Bell
Mark Bell added the comment: Andrei: That is a very interesting observation, thank you for pointing it out. I guess your example / argument also currently applies to whitespace separation too. For example, if we have a whitespace separated string with contents: col1 col2 col3 a b c x y z

[issue44318] Asyncio classes missing __slots__

2021-06-05 Thread Bluenix
New submission from Bluenix : Most of asyncio's classes are missing a __slots__ attribute - for example Lock, Event, Condition, Semaphore, BoundedSemaphore all from locks.py; or Future, FlowControlMixin, Queue, BaseSubprocessTransport from various other parts of asyncio. --

[issue44013] tempfile.TemporaryFile: name of file descriptor cannot be reused in consecutive initialization

2021-06-05 Thread Thomas Jollans
Thomas Jollans added the comment: Hello Xiang Zhong, You're almost correct, but not quite. File descriptors/file numbers are just integers assigned by the operating system, and Python has little to no control over them. The OS keeps a numbered list of open files for each process, and

[issue44310] Document that lru_cache uses hard references

2021-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a full duplicate of issue19859. Both ideas of using weak references and changing documentation were rejected. -- nosy: +serhiy.storchaka resolution: -> duplicate superseder: -> functools.lru_cache keeps objects alive forever

[issue44310] Document that lru_cache uses hard references

2021-06-05 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I saw the thread but the idea was rejected by @rhettinger who seems to suggest the changes in the documentation this time himself. Maybe he has changed his mind, in which case he can explain the circumstances of his decisions if he wants. --

[issue16970] argparse: bad nargs value raises misleading message

2021-06-05 Thread Bonifacio
Bonifacio added the comment: Every PR related to this issue (even the ones only referenced during the discussion) was already merged. Latest message is from more than one year and a half ago. The only thing left to do here would be the backport to 3.7, but according to Guido it could just

[issue44318] Asyncio classes missing __slots__

2021-06-05 Thread wyz23x2
Change by wyz23x2 : -- nosy: -wyz23x2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-05 Thread mike bayer
mike bayer added the comment: great news! Based on how many random factors were needed to reproduce as well as that it seemed to be gc related and appeared very suddenly, I had an intuition this was on the cpython side, thanks so much for doing this Pablo! --

[issue44317] Misleading mark of octal SyntaxErrors

2021-06-05 Thread wyz23x2
New submission from wyz23x2 : Python 3.10.0b2 (tags/v3.10.0b2:3173141, Jun 1 2021, 09:05:29) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> 0777 File "", line 1 0777 ^ SyntaxError: leading zeros in decimal integer

[issue16970] argparse: bad nargs value raises misleading message

2021-06-05 Thread Guido van Rossum
Guido van Rossum added the comment: Okay, I trust that this can be closed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue44318] Asyncio classes missing __slots__

2021-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is the problem with this? Setting __slots__ is needed if we want to save memory for creating a lot of instances. It can also be used for preventing adding arbitrary attributes and/or making weak references. Setting __slots__ in base class is required

[issue44318] Asyncio classes missing __slots__

2021-06-05 Thread Bluenix
Bluenix added the comment: > What is the problem with this? The problem is that asyncio *is not* defining __slots__. > Setting __slots__ in base class is required if you want to get a benefit of > setting __slots__ in any of subclasses. That is my use-case for this. --

[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread Ken Jin
Ken Jin added the comment: The newly added test ``test_recursion_direct`` seems to trigger a stack overflow on windows in debug mode instead of a RecursionError. Release mode isn't affected and the test passes there. One of the buildbots reflects this too:

[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > The stack size for a window build is currently set to 2MB, which is usually > lesser than *nix 8MB. So I think an easy solution is to increase the stack > size for windows builds. > I'm guessing release builds aren't affected because some of the >

[issue42194] Docs for argparse.BooleanOptionalAction missing "New in version 3.9"

2021-06-05 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: Am inclined to merge the former PR because yours is just an exact replica. Please note that we can merge such small fixes without the author signing the CLA but the author is advised to sign the CLA for future contributions. Source: informed by other core

[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-06-05 Thread Mark Bell
Mark Bell added the comment: > Instead, the discussion was focused on removing *all* empty strings from the > result. I imagine that the discussion focussed on this since this is precisely what happens when sep=None. For example, 'a b c ​'.split() == ['a', 'b', 'c']. I guess that

[issue44293] PEP 585 breaks inspect.isclass

2021-06-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Uploaded typing_inspect 0.7.0 to PyPI (it should work with Python 3.9 hopefully) -- ___ Python tracker ___

[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +25141 pull_request: https://github.com/python/cpython/pull/26554 ___ Python tracker ___

[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread ppperry
Change by ppperry : -- nosy: -ppperry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Batuhan, can you take a look? Yes. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue44317] Problems of int literal SyntaxErrors

2021-06-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Is this expected? Yes, is an edge case of python identifiying two tokens together except that there is no space: >>> 3 4 File "", line 1 3 4 ^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? I honestly don't share your

[issue44319] setup openssl faild on linux (ubuntu 20.04)

2021-06-05 Thread Christian Heimes
Change by Christian Heimes : -- assignee: christian.heimes -> nosy: -christian.heimes ___ Python tracker ___ ___ Python-bugs-list

[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >b) always skip the test on windows => we can do that but it might be > counterintuitive for the future Well, is not that the test is flaky technically, this means that the feature doesn't work on Windows (non release builds). So the reasoning

[issue44320] License for W3C C14N test suite is rendered as blockquote

2021-06-05 Thread OSAMU NAKAMURA
New submission from OSAMU NAKAMURA : The License text for W3C C14N test suite is rendered as quoted text, but it should be rendered same as others. - change`:` to `::` -- assignee: docs@python components: Documentation messages: 395197 nosy: OSAMU.NAKAMURA, docs@python priority:

[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +25137 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26550 ___ Python tracker ___

[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 317e9ed4363a86b1364573c5a5e30011a080ce6d by Miss Islington (bot) in branch '3.10': bpo-44304: Ensure the sqlite3 destructor callback is always called with the GIL held (GH-26551) (GH_26552)

[issue44186] TimedRotatingFileHandler overwrite log

2021-06-05 Thread Harry
Change by Harry : -- keywords: +patch pull_requests: +25140 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26553 ___ Python tracker ___

[issue44317] Suggestion for better syntax errors in tokenizer errors

2021-06-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: PR 26555 does some improvements to your examples: >>> 0777 File "", line 1 0777 ^ SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers >>> 0 File "", line 1 0

[issue44317] Suggestion for better syntax errors in tokenizer errors

2021-06-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +25142 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26555 ___ Python tracker

[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: After playing with it for a couple hours and without much success of creating a test environment (only using buildbots), I decided not to introduce hard limits. Even though they make the original tests to pass, they don't solve the problem overall and also

[issue39247] dataclass defaults and property don't work together

2021-06-05 Thread Benjamin Lee
Benjamin Lee added the comment: Would this issue not be trivially resolved if there was a way to specify alias in the dataclasses field? I.e.: _uploaded_by: str = dataclasses.field(alias="uploaded_by", default=None, init=False) Ultimately, the main goal is to make it so that the generated

[issue39247] dataclass defaults and property don't work together

2021-06-05 Thread Eric V. Smith
Eric V. Smith added the comment: > _uploaded_by: str = dataclasses.field(alias="uploaded_by", default=None, > init=False) That's an interesting idea. I'll play around with it. I'm not sure "alias" feels quite right, as it only applies to __init__ (if I'm understanding it correctly).

[issue44320] License for W3C C14N test suite is rendered as blockquote

2021-06-05 Thread OSAMU NAKAMURA
Change by OSAMU NAKAMURA : -- keywords: +patch pull_requests: +25143 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26556 ___ Python tracker ___

[issue44320] License for W3C C14N test suite is rendered as blockquote

2021-06-05 Thread miss-islington
miss-islington added the comment: New changeset 3b87137176f790e93493fcb5543001f1cab8daf7 by Miss Islington (bot) in branch '3.10': bpo-44320: Fix markup for W3C C14N test suite (GH-26556) https://github.com/python/cpython/commit/3b87137176f790e93493fcb5543001f1cab8daf7 --

[issue44320] License for W3C C14N test suite is rendered as blockquote

2021-06-05 Thread miss-islington
miss-islington added the comment: New changeset 8e2c0fd7ada79107f7e0d9c465e77fb36a9486e5 by Miss Islington (bot) in branch '3.9': bpo-44320: Fix markup for W3C C14N test suite (GH-26556) https://github.com/python/cpython/commit/8e2c0fd7ada79107f7e0d9c465e77fb36a9486e5 --

[issue44318] Asyncio classes missing __slots__

2021-06-05 Thread Bluenix
Bluenix added the comment: >>> (1).__dict__ Traceback (most recent call last): File "", line 1, in AttributeError: 'int' object has no attribute '__dict__' >>> 4.5.__dict__ Traceback (most recent call last): File "", line 1, in AttributeError: 'float' object has no attribute '__dict__'

[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +25138 pull_request: https://github.com/python/cpython/pull/26551 ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-06-05 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: PR 26351 adds the Py_TPFLAGS_IMMUTABLETYPE type flag to all types converted to heap type during 3.10 development. -- ___ Python tracker

[issue44317] Problems of int literal SyntaxErrors

2021-06-05 Thread wyz23x2
wyz23x2 added the comment: Another 2 problems: 1. >>> 0b1112 File "", line 1 0b1112 ^ SyntaxError: invalid digit '2' in binary literal >>> 0o5780 File "", line 1 0o5780 ^ SyntaxError: invalid digit '8' in octal literal But: >>> 0x2fag File "", line 1 0x2fag

[issue44319] setup openssl faild on linux (ubuntu 20.04)

2021-06-05 Thread Battant
New submission from Battant : Hello, Here is my configuration command for ubuntu distributions lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 20.04.2 LTS Release:20.04 Codename: focal linux kernel version uname -r 5.4.0-74-generic

[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > sqlit3.Cursor is prone to the same bug. No, is not: it doesn't drop the GIL in tp_clear. There is technically no bug, but is true that tp_clear should only clean Python references. Although in this case there are some sematics with the cleanup that

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-05 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- nosy: +shreyanavigyan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39247] dataclass defaults and property don't work together

2021-06-05 Thread Benjamin Lee
Benjamin Lee added the comment: > I'm not sure "alias" feels quite right, as it only applies to __init__ (if > I'm understanding it correctly). Maybe `init_alias` might be a better name. In any case, this would support private variables in dataclasses. --

[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-05 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: sqlit3.Cursor is prone to the same bug. Do you want me to create a new issue for it, or can I reuse this issue number, Pablo? I'll see if I can create a reproducer for that as well. -- ___ Python tracker

[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +lukasz.langa priority: normal -> release blocker resolution: fixed -> stage: resolved -> status: closed -> open ___ Python tracker ___

[issue44317] Suggestion for better syntax errors in tokenizer errors

2021-06-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- title: Problems of int literal SyntaxErrors -> Suggestion for better syntax errors in tokenizer errors ___ Python tracker ___

[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 6e3b7cf3af3ed7758b2c2193c1d393feb8ab8f72 by Pablo Galindo in branch 'main': bpo-44304: Ensure the sqlite3 destructor callback is always called with the GIL held (GH-26551)

[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +25139 pull_request: https://github.com/python/cpython/pull/26552 ___ Python tracker ___

[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-06-05 Thread Andrei Kulakov
Andrei Kulakov added the comment: > I imagine that the discussion focussed on this since this is precisely what > happens when sep=None. For example, 'a b c ​'.split() == ['a', 'b', > 'c']. I guess that the point was to provide users with explicit, manual > control over whether the

[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-06-05 Thread Andrei Kulakov
Andrei Kulakov added the comment: > Of course, but the main thing is that you spotted this before the PR was > merged :) I know, better late then never but also better sooner than late :-) -- ___ Python tracker

[issue39247] dataclass defaults and property don't work together

2021-06-05 Thread Michael Robellard
Michael Robellard added the comment: The sample I uploaded doesn't do any processing, but the use case originally had some logic inside the property getter/setter, would the alias idea allow for that? The purpose of the property is to add some logic to compute the value if it has not

[issue44320] License for W3C C14N test suite is rendered as blockquote

2021-06-05 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 71be46170490d08743c714b9fa4484038aa7a23e by NAKAMURA Osamu in branch 'main': bpo-44320: Fix markup for W3C C14N test suite (GH-26556) https://github.com/python/cpython/commit/71be46170490d08743c714b9fa4484038aa7a23e -- nosy: +corona10

[issue44320] License for W3C C14N test suite is rendered as blockquote

2021-06-05 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue44320] License for W3C C14N test suite is rendered as blockquote

2021-06-05 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +25144 pull_request: https://github.com/python/cpython/pull/26557 ___ Python tracker

[issue44320] License for W3C C14N test suite is rendered as blockquote

2021-06-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +25145 pull_request: https://github.com/python/cpython/pull/26558 ___ Python tracker ___

[issue44320] License for W3C C14N test suite is rendered as blockquote

2021-06-05 Thread Dong-hee Na
Change by Dong-hee Na : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___