[Python-announce] [Python announce] dictf 1.0.0 released!

2023-04-25 Thread Eric Mendes
Hi, everyone! I'm not sure if this is useful to anyone, nor original. It's a problem you can easily solve with a dict comprehension, but I love a pretty syntax, so I made this: https://github.com/Eric-Mendes/dictf It can be especially useful for filtering huge dicts before turning

[Python-announce] [Python announce] unexpected-isaves 2.1.2 released!

2023-04-17 Thread Eric Mendes
only generate arts using minecraft, the cells of a spreadsheet, ascii characters, or rubik's cubes, but if you have any ideas that fit into the project's goal please let me know <https://github.com/Eric-Mendes/unexpected-isaves/issues/10>, or - even better - submit a merge request with you

Re: [Python-Dev] Small lament...

2023-04-01 Thread Eric Fahlgren
Oh, man, it has been a while. The last one I remember is PEP 404 (if you can find it :) ), dated 2011 and it wasn't an April Fool's... On Sat, Apr 1, 2023 at 11:23 AM Skip Montanaro wrote: > Just wanted to throw this out there... I lament the loss of waking up on > April 1st to see a creative

[Python-announce] [Python announce] unexpected-isaves 1.5.0 released!

2023-02-01 Thread Eric Mendes
minecraft or the cells of a spreadsheet, but if you have any ideas that fit into the project's goal please let me know via github issues, or - even better - submit a merge request with your work! Source code: https://github.com/Eric-Mendes/unexpected-isaves PyPI: https://pypi.org/project/unexpected

[Python-announce] unexpected-isaves 1.3 just released!

2023-01-03 Thread Eric Mendes
Now supporting different minecraft versions. https://github.com/Eric-Mendes/unexpected-isaves [image: image.png] ___ Python-announce-list mailing list -- python-announce-list@python.org To unsubscribe send an email to python-announce-list-le

[issue47247] Default arguments for access 'mode' parameters in pathlib and os should display as octal literals

2022-04-07 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a duplicate of #46782. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue47247> ___ ___

[issue47237] Inheritance from base class with property in class makes them non-instantiatable

2022-04-06 Thread Eric V. Smith
Eric V. Smith added the comment: What would dataclasses do that's different from a regular class? -- ___ Python tracker <https://bugs.python.org/issue47

[issue47237] Inheritance from base class with property in class makes them non-instantiatable

2022-04-06 Thread Eric V. Smith
Change by Eric V. Smith : -- title: Inheritance from Protocol with property in class makes them non-instantiatable -> Inheritance from base class with property in class makes them non-instantiatable ___ Python tracker <https://bugs.pyth

[issue47237] Inheritance from Protocol with property in class makes them non-instantiatable

2022-04-06 Thread Eric V. Smith
Eric V. Smith added the comment: Here's the error without dataclasses: -- from typing import Protocol class SomeProtocol(Protocol): @property def some_value(self) -> str: ... class SomeClass(SomeProtocol): def __init__(self, some_value): self.some_value = some_va

[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 <https://bugs.python.org/issue47

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

[issue47185] code.replace(co_code=new_code) no longer catch exceptions on Python 3.11

2022-04-01 Thread Eric Snow
Change by Eric Snow : -- nosy: +Mark.Shannon ___ Python tracker <https://bugs.python.org/issue47185> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-04-01 Thread Eric Snow
Eric Snow added the comment: Looks like gh-32218 worked. -- status: open -> closed ___ Python tracker <https://bugs.python.org/issue47146> ___ ___ Python-

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-04-01 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. If you have a more concrete proposal, either re-open this or bring it up on python-ideas. -- resolution: -> rejected stage: -> resolved status: pending -> closed ___ Pytho

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-31 Thread Eric Snow
Eric Snow added the comment: Specifically: https://github.com/python/cpython/actions/workflows/build.yml. -- status: pending -> open ___ Python tracker <https://bugs.python.org/issu

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-31 Thread Eric Snow
Eric Snow added the comment: I'll keep an eye on PRs for the next day or so. -- resolution: -> fixed stage: patch review -> resolved status: open -> pending ___ Python tracker <https://bugs.python.or

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-31 Thread Eric Snow
Eric Snow added the comment: New changeset e7bb7c2f047b4f97e4426c42ae209c969808069d by Eric Snow in branch 'main': bpo-47146: Stop Depending On regen-deepfreeze For regen-global-objects (gh-32218) https://github.com/python/cpython/commit/e7bb7c2f047b4f97e4426c42ae209c969808069d

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-31 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +30294 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32218 ___ Python tracker <https://bugs.python.org/issu

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-31 Thread Eric Snow
Eric Snow added the comment: Brandt pointed out this is consistently reproducible locally: make clean regen-all -j I'll get this sorted out today. -- ___ Python tracker <https://bugs.python.org/issue47

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-31 Thread Eric Snow
Eric Snow added the comment: I re-ran jobs that had failed before I merged that gh-32206. Several passed, but the following are still failing: * https://github.com/python/cpython/pull/32188 + https://github.com/python/cpython/runs/5773938424 * https://github.com/python/cpython/pull/32132

[issue47166] Dataclass transform should ignore TypeAlias variables

2022-03-31 Thread Eric V. Smith
Eric V. Smith added the comment: Same question as Alex: what does the TypeAlias being inside the class offer that being at module level doesn't? -- ___ Python tracker <https://bugs.python.org/issue47

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-30 Thread Eric Snow
Eric Snow added the comment: New changeset db4dada5108dd49ebca23e4559a53630a2df8447 by Eric Snow in branch 'main': bpo-47146: Avoid Using make Recursively (gh-32206) https://github.com/python/cpython/commit/db4dada5108dd49ebca23e4559a53630a2df8447

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-30 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +30281 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32206 ___ Python tracker <https://bugs.python.org/issu

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-30 Thread Eric Snow
Eric Snow added the comment: Looks like this is still an intermittent problem: * https://github.com/python/cpython/pull/32195 + failed: https://github.com/python/cpython/runs/5756616733 + failed: https://github.com/python/cpython/runs/5753267869 + failed: https://github.com/python

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

2022-03-29 Thread Eric V. Smith
Eric V. Smith added the comment: My personal usage of a topological sort are restricted to maybe 100 entries max, so I can't really test this in any meaningful way. That, and the project that uses it is stuck on 3.6, so I haven't switched to the graphlib version yet

[issue47155] Strange behavior on the tuple that includes list

2022-03-29 Thread Eric V. Smith
Eric V. Smith added the comment: There's also this StackOverflow question about it: https://stackoverflow.com/questions/38344244/tuples-operator-throws-exception-but-succeeds -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -&

[issue47155] Strange behavior on the tuple that includes list

2022-03-29 Thread Eric V. Smith
Eric V. Smith added the comment: This is an FAQ: https://docs.python.org/3/faq/programming.html#why-does-a-tuple-i-item-raise-an-exception-when-the-addition-works -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue47

[issue47149] DatagramHandler doing DNS lookup on every log message

2022-03-29 Thread Eric V. Smith
Eric V. Smith added the comment: > I blame the lack of standard POSIX functions for doing DNS lookups > asynchronously and in a way that provides TTL information to the client. I totally agree with that! And I agree it would be nice to have some way of doing non-blocking lookups

[issue47149] DatagramHandler doing DNS lookup on every log message

2022-03-29 Thread Eric V. Smith
Eric V. Smith added the comment: Hmm. I'm not sure we should try to work around a bad resolver issue. What's your platform, and how did you install Python? -- ___ Python tracker <https://bugs.python.org/issue47

[issue47149] DatagramHandler doing DNS lookup on every log message

2022-03-29 Thread Eric V. Smith
Eric V. Smith added the comment: > Do you mean expiring the IP address when the TTL is reached? Yes, that's what I mean. Isn't the resolver library smart enough to cache lookups and handle the TTL timeout by itself? -- ___ Python tracker <

[issue47149] DatagramHandler doing DNS lookup on every log message

2022-03-29 Thread Eric V. Smith
Eric V. Smith added the comment: If you don’t look it up every time, how do you deal with DNS timeouts? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue47

[issue39971] [doc] Error in functional how-to example

2022-03-29 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue39971> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31140] Insufficient error message with incorrect formated string literal

2022-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, they should update Python. A lot of work went in to fixing these issues, and won't be backported. -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracke

[issue47137] MemoryError in codeop.compile_command

2022-03-28 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue47137> ___ ___

[issue47129] Improve errors messages in f-string syntax errors

2022-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, @macgors! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python

[issue47129] Improve errors messages in f-string syntax errors

2022-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 7b44ade018cfe6f54002a3cee43e8aa415d4d635 by Maciej Górski in branch 'main': bpo-47129: Add more informative messages to f-string syntax errors (32127) https://github.com/python/cpython/commit/7b44ade018cfe6f54002a3cee43e8aa415d4d635

[issue47137] MemoryError in codeop.compile_command

2022-03-28 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +pablogsal title: MemoryError -> MemoryError in codeop.compile_command versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issu

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow
Eric Snow added the comment: Looks like that fixed it, per https://github.com/python/cpython/pull/32134. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow
Eric Snow added the comment: New changeset 4c116f716bd1c174d6530b9a7a5ed3863927a109 by Eric Snow in branch 'main': bpo-47146: Eliminate a race between make regen-deepfreeze and make regen-global-objects. (gh-32162) https://github.com/python/cpython/commit

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +30240 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32162 ___ Python tracker <https://bugs.python.org/issu

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow
Eric Snow added the comment: There's probably something racy with make. See: https://github.com/python/cpython/runs/5712538599?check_suite_focus=true#step:10:1147 -- ___ Python tracker <https://bugs.python.org/issue47

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow
New submission from Eric Snow : The "Check if generated files are up to date" GitHub check for PRs has been failing recently. It may also impact local usage of "make regen-all". Example: https://github.com/python/cpython/runs/5719012664 This may be related to gh-32061.

[issue47137] MemoryError

2022-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: A simpler reproducer is: codeop.compile_command('[' * 100) Verified I get MemoryError on cygwin PYthon 3.8.12. A length of 99 does not show a problem. On Windows 3.11.0a5+, I get: >>> codeop.compile_command('[' * 201) Traceback (most recent

[issue36643] Forward reference is not resolved by dataclasses.fields()

2022-03-27 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Jelle here: dataclasses shouldn't be calling get_type_hints(). -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-27 Thread Eric V. Smith
Change by Eric V. Smith : -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue46992> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue47129] Improve errors messages in f-string syntax errors

2022-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: >From a suggestion by @Jelle on the python discord server: how about just >"f-string: expression required before '!'"? -- ___ Python tracker <https://bugs.py

[issue47129] Improve errors messages in f-string syntax errors

2022-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not convinced this is an improvement. I don't think someone trying '!' in an f-string expression happens often enough to worry about that specific error message. And a generic "optional specifier" isn't great. If we're going to do this,

[issue46712] Share global string identifiers in deepfreeze

2022-03-23 Thread Eric Snow
Eric Snow added the comment: New changeset febf54bcf3fdc45ad84b4073e24bbaaee0ac8b2a by Eric Snow in branch 'main': bpo-46712: Do not Regen Deep-Frozen Modules before Generating Global Objects (gh-32061) https://github.com/python/cpython/commit/febf54bcf3fdc45ad84b4073e24bbaaee0ac8b2a

[issue46541] Replace _Py_IDENTIFIER() with statically initialized objects.

2022-03-23 Thread Eric Snow
Eric Snow added the comment: New changeset 21412d037b07c08266e96dfd0c0e44a1b7693bc1 by Eric Snow in branch 'main': bpo-46541: Add a Comment About When to Use _Py_DECLARE_STR(). (gh-32063) https://github.com/python/cpython/commit/21412d037b07c08266e96dfd0c0e44a1b7693bc1

[issue46541] Replace _Py_IDENTIFIER() with statically initialized objects.

2022-03-22 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +30154 pull_request: https://github.com/python/cpython/pull/32063 ___ Python tracker <https://bugs.python.org/issue46

[issue46964] The global config should not be stored on each interpreter

2022-03-22 Thread Eric Snow
Eric Snow added the comment: Here are reasons why PyConfig relates to the runtime and not each interpreter: * PyConfig was introduced so embedders could dictate how the *runtime* should be initialized * after initialization, it represents how the runtime was initialized * in the public API

[issue46712] Share global string identifiers in deepfreeze

2022-03-22 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +30151 pull_request: https://github.com/python/cpython/pull/32061 ___ Python tracker <https://bugs.python.org/issue46

[issue46712] Share global string identifiers in deepfreeze

2022-03-22 Thread Eric Snow
Eric Snow added the comment: > After a new `&_Py_ID(__orig_class__)` is added to > Objects/genericaliasobject.c, running `make regen-global-objects` starts > > gcc -pthread -c [snipped] -DPy_BUILD_CORE -o Objects/genericaliasobject.o > Objects/genericaliasobjec

[issue47073] Solution for recursion error when comparing dataclass objects

2022-03-20 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org/issue47073> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for all of your work, @ariebovenberg! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 82e9b0bb0ac44d4942b9e01b2cdd2ca85c17e563 by Arie Bovenberg in branch 'main': bpo-46382 dataclass(slots=True) now takes inherited slots into account (GH-31980) https://github.com/python/cpython/commit/82e9b0bb0ac44d4942b9e01b2cdd2ca85c17e563

[issue47055] `issubclass` on two different subclasses of abstract base class like `os.PathLike` returns unexpected value on early versions of Py3.7 and Py3.8

2022-03-18 Thread Eric V. Smith
Eric V. Smith added the comment: Since those releases are no longer supported, I don't think there's any place you could put this that would be seen. And we wouldn't want to put a note in a current release about a bug in a non-supported version that was fixed in another non-supported

[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-03-18 Thread Eric V. Smith
Eric V. Smith added the comment: I thought there was an existing issue that covered this, but now I can't find it. I'd prefer #2, create a separate issue. -- ___ Python tracker <https://bugs.python.org/issue46

[issue47023] re.sub shows key error on regex escape chars provided in repl param

2022-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: I agree the error message could be better. Also, "s.error('bad escape %s' % this, len(this))" should probably be "from None", since as @mrabarnett notes the KeyError is an implementation detail. -- __

[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: I don't have a problem saying that for a class to be used as a base class for a dataclass, its __slots__ must not be an iterator that's been exhausted. That doesn't seem like a very onerous requirement. I'm also not concerned about people using __slots__

[issue47023] re.sub shows key error on regex escape chars provided in repl param

2022-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, I assume that's what the OP intended, but then stumbled across the error with '\s'. In any event, I don't think there's a bug here so I'm going to close this. @siddheshsathe: if you disagree, please respond here. -- resolution: -> not a

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: Is there any reason to keep this issue open? The PR was merged. -- ___ Python tracker <https://bugs.python.org/issue46

[issue47023] re.sub shows key error on regex escape chars provided in repl param

2022-03-17 Thread Eric V. Smith
Change by Eric V. Smith : -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue47023> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: Serhiy: Could you point to some documentation on __slotnames__? I see a few references in the code to it, but it's not set on simple test class. >>> class A: ... __slots__=('a',) ... >>> A.__slotnames__ Traceback (most recent call last):

[issue47034] pickle not working correctly when custom field is directly initialized by constructors

2022-03-16 Thread Eric V. Smith
Eric V. Smith added the comment: You're probably doing something like: parent.i = 3 instead of: parent.child.field = 0.6 In the first one, you're setting an instance attribute on parent, on the second, you're modifying an attribute of the class attribute. In any event, there's no bug

[issue47034] pickle not working correctly when custom field is directly initialized by constructors

2022-03-16 Thread Eric V. Smith
Eric V. Smith added the comment: child is not an attribute of a Parent instance, but rather of the Parent class. So it's not going to be saved when you dump "parent", which is an instance of Parent. I'm not sure what you're doing when you create a Parent.__init__ method, but

[issue35212] Expressions with format specifiers in f-strings give wrong code position in AST

2022-03-16 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Incorrect exception highlighting for fstring format ___ Python tracker <https://bugs.python

[issue46404] 3.11a4: a small attrs regression

2022-03-15 Thread Eric V. Smith
Eric V. Smith added the comment: @frenzy: I'm not sure what your fix would do. You could either describe it in rough terms (if you'd like a pre-PR opinion on the approach), or I'm happy to wait to see your PR. -- ___ Python tracker <ht

[issue47023] re.sub shows key error on regex escape chars provided in repl param

2022-03-15 Thread Eric V. Smith
Eric V. Smith added the comment: Isn't '\s' covered by: " Unknown escapes of ASCII letters are reserved for future use and treated as errors" (https://docs.python.org/3/library/re.html#re.sub)? -- nosy: +eric.smith ___ Python track

[issue47025] bytes do not work on sys.path

2022-03-15 Thread Eric V. Smith
Eric V. Smith added the comment: In case it helps anyone: On Windows 3.11.0a5+ the full traceback is: $ ./python.bat demo.py Running Debug|x64 interpreter... Traceback (most recent call last): File "...\demo.py", line 23, in sys.exit(main()) ^^ Fil

[issue47020] float('nan')==math.nan does NOT evaluate to True (as suggested by documentation).

2022-03-14 Thread Eric V. Smith
Eric V. Smith added the comment: Jelle gives the correct reason for what you're seeing. Also note: >>> math.nan == math.nan False >>> float('nan') == float('nan') False If there's some specific part of the documentation that you think is misleading, please reopen

[issue45336] xml.etree.ElementTree.write does not support `standalone` option

2022-03-14 Thread Eric Vergnaud
Eric Vergnaud added the comment: Actually there are 2 distinct issues here: - ValueError: cannot use non-qualified names with default_namespace option - lack of 'standalone' option when writing XML PI -- ___ Python tracker <ht

[issue45336] xml.etree.ElementTree.write does not support `standalone` option

2022-03-14 Thread Eric Vergnaud
Eric Vergnaud added the comment: lxml tostring does not support the default_namespace value so not an option -- ___ Python tracker <https://bugs.python.org/issue45

[issue45336] xml.etree.ElementTree.write does not support `standalone` option

2022-03-14 Thread Eric Vergnaud
Eric Vergnaud added the comment: This is not a feature request, it's a bug fix request, so should be fixed asap. Why is it a bug ? XML spec says that "the default namespace does not apply to attribute names" (see section 6.3), therefore having a simple attribute name when using

[issue47002] argparse - "expected one argument" when used -: in argument

2022-03-13 Thread Eric V. Smith
Eric V. Smith added the comment: Here's a simplified reproducer: import argparse parser = argparse.ArgumentParser() parser.add_argument("-u", "--utc", choices=["-1:00"]) args = parser.parse_args() I assume this is related to argparse guessing if an argument is

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread Eric V. Smith
Eric V. Smith added the comment: I’m sorry, I don’t understand your proposal. Please answer my question about what “x” would be equal to under your proposed change. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread Eric V. Smith
Eric V. Smith added the comment: What would x be equal to here: def get_something_string(): return textwrap.dedent("""\ test text2 test text3 test text4""") x = f"""\ test text1 {get_someth

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread Eric V. Smith
Eric V. Smith added the comment: What would the presence of "<<" do? You haven't described your proposal. -- ___ Python tracker <https://bugs.py

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread Eric V. Smith
Eric V. Smith added the comment: What is the flag you mention? What would it do? This sounds like a new feature, which can only go in to 3.11. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue46

[issue44799] typing.get_type_hints() raises TypeError for a variable annotated by dataclasses.InitVar

2022-03-11 Thread Eric V. Smith
Eric V. Smith added the comment: I agree it's not worth fixing in 3.9 and 3.10. -- ___ Python tracker <https://bugs.python.org/issue44799> ___ ___ Python-bug

[issue46974] set function for lists on numbers, sometimes sorts elements from smallest to largest, and sometimes not

2022-03-10 Thread Eric V. Smith
Eric V. Smith added the comment: This is expected behavior. A set has no defined order. If you convert a set to a list, and you want some specific order, you'll need to sort it yourself. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -&g

[issue46972] Documentation: Reference says AssertionError is raised by `assert`, but not all AssertionErrors are.

2022-03-10 Thread Eric V. Smith
Eric V. Smith added the comment: > I would argue that "The reference documentation for X states that it gets > raised under condition Y" generally should be understood as "this is a > guarantee that also includes the guarantee that it is not raised under other &

[issue46972] Documentation: Reference says AssertionError is raised by `assert`, but not all AssertionErrors are.

2022-03-10 Thread Eric V. Smith
Eric V. Smith added the comment: The documentation doesn't say that assert statements are the only place AssertionError is raised, so I don't think it's incorrect. > From this, one can infer the guarantee "the -O flag will suppress > AssertionError exceptions from being raised

[issue46970] dataclass(slots=True) incompatible with __init_subclass__

2022-03-09 Thread Eric V. Smith
Eric V. Smith added the comment: This appears to be due to dataclasses needing to create a new class in order to set __slots__. I'll look at it, but I doubt there's anything that can be done. attrs has the same issue: File "x/.local/lib/python3.8/site-packages/attr/_make.py"

[issue46957] Logger with a custom class breaks on copy

2022-03-08 Thread Eric V. Smith
Eric V. Smith added the comment: In what way does it break? You haven't shown an error. Why are you deepcopying the logger? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue46

[issue46964] The global config should not be stored on each interpreter

2022-03-08 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +29879 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31771 ___ Python tracker <https://bugs.python.org/issu

[issue46964] The global config should not be stored on each interpreter

2022-03-08 Thread Eric Snow
New submission from Eric Snow : tl;dr let's move PyInterpreterState.config to _PyRuntimeState.config. Historically the runtime has been initialized using Py_Initialize(). PEP 587 added Py_InitializeFromConfig(), which takes a PyConfig and allows all sorts of customization of the runtime

[issue46945] Quantifier and Expanded Regex Expression Gives Different Results

2022-03-07 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Regular Expressions -Library (Lib) nosy: +ezio.melotti, mrabarnett ___ Python tracker <https://bugs.python.org/issue46

[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Eric V. Smith
Eric V. Smith added the comment: If you go with the second idea, I'd say something like f"More than {2 * tracebacklimit} additional stack frames not shown". It seems handy to know the magnitude of the problem. -- nosy: +eric.smith

[issue46941] Bug or plug not removed (The operator "is")

2022-03-06 Thread Eric V. Smith
Eric V. Smith added the comment: As others have noted, the behavior is intentional, so I'm closing this. -- nosy: +Dennis Sweeney, Jelle Zijlstra, eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Pytho

[issue46938] dataclass __post_init__ recursion

2022-03-06 Thread Eric V. Smith
Eric V. Smith added the comment: Yeah, I've come to the conclusion that it's not so simple, either. I'm also thinking that advising to call the base __init__ is a mistake. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46938] dataclass __post_init__ recursion

2022-03-06 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a bug in the code. I'll have a PR ready shortly. But since it's a non-trivial change, I'm going to target it for 3.11 only. -- assignee: docs@python -> eric.smith versions: -Python 3.10, Python

[issue46461] Kodi crashing

2022-03-06 Thread Eric V. Smith
Eric V. Smith added the comment: I don’t have Ubuntu to test on. Plus the steps to reproduce are too much for the average volunteer to work through. I don’t think we’ll be able to help. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Eric V. Smith
Eric V. Smith added the comment: I understand. Then I'm going to close this issue, since there's nothing we can do. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Eric V. Smith
Eric V. Smith added the comment: > I was running one python script Again: you need to show us the script that's causing this problem. I (and millions of others) run scripts all the time which do not fail in the way you describe. Unless you show us a script that causes the problem, we can

[Python-announce] Convert plain English to a datetime object with textime

2022-03-02 Thread Eric Mendes
t's just fun. https://github.com/Eric-Mendes/textime https://pypi.org/project/textime/ This project is open source and contributions are welcome and appreciated. Cheers! ___ Python-announce-list mailing list -- python-announce-list@python.org To unsubscribe sen

[issue46904] Python Decimal supports '#' format, C Decimal does not.

2022-03-02 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue46904> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46904] Python Decimal supports '#' format, C Decimal does not.

2022-03-02 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue46904> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46900] marshal.dumps represents the same list object differently

2022-03-02 Thread Eric V. Smith
Eric V. Smith added the comment: >From https://github.com/python/cpython/blob/main/Python/marshal.c: 41 is: #define TYPE_SMALL_TUPLE')' The difference between 41 and 169 is 128: #define FLAG_REF'\x80' /* with a type, add obj to index */ So the differe

[issue46712] Share global string identifiers in deepfreeze

2022-03-01 Thread Eric Snow
Eric Snow added the comment: New changeset 21099fc064c61d59c936a2f6a0db3e07cd5c8de5 by Eric Snow in branch 'main': bpo-46712: Let generate_global_objects.py Run on Earlier Python Versions (gh-31637) https://github.com/python/cpython/commit/21099fc064c61d59c936a2f6a0db3e07cd5c8de5

  1   2   3   4   5   6   7   8   9   10   >