[issue1436] logging.config.fileConfig, NameError: name 'RotatingFileHandler' is not defined

2007-11-20 Thread sebastian
sebastian added the comment: thank you very much... but: [...] the class and arguments are evaluated using the logging package's namespace. [...] does this mean, it is not possible to use user-defined handlers, naturally residing outside python's class library (and logging pack

[issue4028] Problem compiling the multiprocessing module on sunos5

2011-07-13 Thread Sebastian
Sebastian added the comment: Yes, it is. I encountered it at Solaris9 with python 2.7.1. -- nosy: +SebaM6 ___ Python tracker <http://bugs.python.org/issue4

[issue34350] Non obvious logging handler behaviour

2018-08-06 Thread Sebastian
New submission from Sebastian : In Python 3.6.3 I can do: import logging logger = logging.getLogger() logger.setLevel(logging.INFO) logger.info("this does not work") logging.info("PARTY") logger.info("this works") And it outputs: INFO:root:PARTY INFO:root:this

[issue8787] PySys_Get

2010-05-22 Thread Sebastian
New submission from Sebastian : Hi all, I found a bug in the exception handler. When I start the app without any arguments I get an output I expect: __main__:2:DeprecationWarning: Deprecated function. When I run the app with arguments, the arguments are printed somehow in the exception output

[issue8787] PySys_Get

2010-05-22 Thread Sebastian
Sebastian added the comment: Could anyone please correct the title? Thx :) -- ___ Python tracker <http://bugs.python.org/issue8787> ___ ___ Python-bugs-list m

[issue8787] warnings inside PyRun_SimpleString() display argv[1]

2010-05-25 Thread Sebastian
Sebastian added the comment: Oh, damn. I really forgot the argv filename thing. Nevermind :) But back to topic. __file__ might be not the best solution for that. What does Python when embedded, and __file__ is not set? That can happen when the source of your code is not a file (multiline

[issue8787] warnings inside PyRun_SimpleString() display argv[1]

2010-05-25 Thread Sebastian
Sebastian added the comment: attached a patch for this issue now. Now it first uses the name of the script, instead of __file__. -- keywords: +patch Added file: http://bugs.python.org/file17461/_warnings.c.patch ___ Python tracker <h

[issue8787] warnings inside PyRun_SimpleString() display argv[1]

2010-05-30 Thread Sebastian
Sebastian added the comment: any news on this? -- ___ Python tracker <http://bugs.python.org/issue8787> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45383] PyType_FromSpec API fails to use metaclass of bases

2021-12-16 Thread Sebastian Berg
Sebastian Berg added the comment: Sorry, I need some time to dive back into this, so some things might be garbled :). Yes, I do agree supporting a custom `tp_new` here seems incredibly tricky. I have not thought about the implications of this, though. > guess the safest option is to f

[issue45383] PyType_FromSpec API fails to use metaclass of bases

2021-12-16 Thread Sebastian Berg
Sebastian Berg added the comment: It is probably early, but I am starting to like the idea of a "C MetaClass factory" helper/indicator. It seems to me that yes, at least `tp_new` cannot be called reasonable for a class that is created in C, it is just too confusing/awkward to t

[issue45383] PyType_FromSpec API fails to use metaclass of bases

2021-12-17 Thread Sebastian Berg
Sebastian Berg added the comment: Fully, agree! In the end, `PyType_FromSpec` replaces `type.__new__()` (and init I guess) when working in C. In Python, we would call `type.__new__` (maybe via super) from the `metatype.__new__`, but right now, in C, the metatype cannot reliably use

[issue45383] PyType_FromSpec API fails to use metaclass of bases

2021-12-17 Thread Sebastian Berg
Sebastian Berg added the comment: Well, what we need is a way to say: I am calling `type.__new__` (i.e. PyType_FromSpec) on purpose from (effectively) my own `mytype.__new__`? That is, because right now I assume we want to protect users from calling PyType_FromSpec thinking that it is

[issue45383] PyType_FromSpec API fails to use metaclass of bases

2021-12-17 Thread Sebastian Berg
Sebastian Berg added the comment: Btw. huge thanks for looking into this! Let me know if I can try to help out (I can make due with static metatypes, but my story seems much clearer if I could say: Well with Py 3.11 you can, and probably should, do it dynamically.). I had lost a lot of

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-22 Thread Sebastian Rittau
Change by Sebastian Rittau : -- nosy: +srittau ___ Python tracker <https://bugs.python.org/issue46006> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46414] Add typing.reveal_type

2022-01-17 Thread Sebastian Rittau
Change by Sebastian Rittau : -- nosy: +srittau ___ Python tracker <https://bugs.python.org/issue46414> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46451] Possibly bad interaction with tracing and cython?

2022-01-20 Thread Sebastian Berg
New submission from Sebastian Berg : Starting here, but there could be Cython interaction or something else in theory. But, when running the following: * Python 3.10.1 (not 3.9.9, debug version or not) * Setting a tracing function (not setting a trace-function will fix the issue) * Running

[issue46451] Possibly bad interaction with tracing and cython?

2022-01-20 Thread Sebastian Berg
Sebastian Berg added the comment: Ahh, a further data-point. The name from the module scope that is overwritten IS a parameter name used in the function locals. Strangly, if I modify the tracing to print more: stop = 0 def trace(frame, event, arg): global stop if stop >

[issue46494] Mention typing_extensions in the typing documentation

2022-01-24 Thread Sebastian Rittau
Sebastian Rittau added the comment: Sounds like a good idea. I would put it into the introduction. I hear it will easily be missed in other sections. Wouldn't a link to PyPI make more sense than a GitHub link? -- ___ Python tracker &

[issue46451] Tracing causes module globals to be mutated when calling functions from C

2022-01-31 Thread Sebastian Berg
Change by Sebastian Berg : -- title: Possibly bad interaction with tracing and cython? -> Tracing causes module globals to be mutated when calling functions from C ___ Python tracker <https://bugs.python.org/issu

[issue46451] Tracing causes module globals to be mutated when calling functions from C

2022-02-01 Thread Sebastian Berg
Sebastian Berg added the comment: Thanks for having a look. I have confirmed this is related to Cython (no pandas/NumPy involved) – repro at https://github.com/seberg/bpo46451. What happens under the hood in Cython is probably: https://github.com/cython/cython/blob/master/Cython/Utility

[issue46451] Tracing causes module globals to be mutated when calling functions from C

2022-02-01 Thread Sebastian Berg
Change by Sebastian Berg : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue46451> ___ ___ Python-bugs-list

[issue46451] Tracing causes module globals to be mutated when calling functions from C

2022-02-01 Thread Sebastian Berg
Sebastian Berg added the comment: Not reopening for now, but I will note again that (AFAIK) Cython uses `PyEval_EvalCodeEx`, and the docs say that it is not used internally to CPython anymore. So it seems pretty plausible that the bug is in `PyEval_EvalCodeEx` and not the generated Cython

[issue46451] Tracing causes module globals to be mutated when calling functions from C

2022-02-01 Thread Sebastian Berg
Sebastian Berg added the comment: While I have a repro for Python, I think the pre release of cython already fixes it (and I just did not regenerated the C sources when trying, I guess. A `git clean` to the rescue...). -- ___ Python tracker

[issue46609] Generator-based coroutines in Python 3.10 docs

2022-02-02 Thread Sebastian Rittau
New submission from Sebastian Rittau : Currently, the Python 3.10.2 documentation at https://docs.python.org/3/library/asyncio-task.html?highlight=coroutine#asyncio.coroutine says: "Note: Support for generator-based coroutines is deprecated and is scheduled for removal in Python

[issue12998] Memory leak with CTypes Structure

2011-09-17 Thread Sebastian Wiesner
Sebastian Wiesner added the comment: Why should it? After all, you're sort of abusing ctypes by repeatedly creating Struture types over and over again. C structures that you might want to wrap with these types are fixed and known at the time of programming, so there is never a ne

[issue1699259] replacing char* with const char* in sysmodule.c/.h

2011-06-05 Thread Sebastian Ramacher
Sebastian Ramacher added the comment: Since the patches are not applicable to Py 3.x and Py 2.7 is stable I'm closing this bug. -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.or

[issue12505] python interpreter not handle wildards properly

2011-07-06 Thread Sebastian Ramacher
Sebastian Ramacher added the comment: That is definitely not python's job. That is the duty of your shell and python should never expand that. And it would lead to platform specific behavior as one can see with the following script: import sys import subprocess if __name__ == &quo

[issue4028] Problem compiling the multiprocessing module on sunos5

2011-07-13 Thread Sebastian M
Sebastian M added the comment: One more thing, as I tried to rebuild whole python I've encountered on following problem: building '_multiprocessing' extension gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDW

[issue12873] 2to3 incorrectly handles multi-line imports from __future__

2011-09-01 Thread Sebastian Wiesner
Changes by Sebastian Wiesner : -- nosy: +lunar ___ Python tracker <http://bugs.python.org/issue12873> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12873] 2to3 incorrectly handles multi-line imports from __future__

2011-09-02 Thread Sebastian Wiesner
Sebastian Wiesner added the comment: More precisely, the bug is, that 2to3 refactors the "print()" invocation in "test1.py" though it shouldn't because a "print_function" future import is present at the beginning of "test1.py". The cross-check w

[issue12844] Support more than 255 arguments

2011-09-08 Thread Sebastian Ramacher
Changes by Sebastian Ramacher : -- nosy: +sebastinas ___ Python tracker <http://bugs.python.org/issue12844> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1699259] replacing char* with const char* in sysmodule.c/.h

2010-10-18 Thread Sebastian Ramacher
Sebastian Ramacher added the comment: Any news on that? -- ___ Python tracker <http://bugs.python.org/issue1699259> ___ ___ Python-bugs-list mailing list Unsub

[issue10467] io.BytesIO.readinto() segfaults when used on BytesIO object seeked beyond end.

2010-11-20 Thread Sebastian Hagen
New submission from Sebastian Hagen : io.BytesIO().readinto() does not correctly handle the case of being called on a BytesIO object that has been seeked past the end of its data. It consequently ends up reading into unallocated memory, and (typically?) segfaulting if used in this manner

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth
New submission from Sebastian Spaeth : imaplib's Time2Internaldate returns invalid (as localized) INTERNALDATE strings. Appending a message with such a time string leads to a: 19 BAD Command Argument Error. 11 (for MS Exchange IMAP servers) it returned "26-led-2011 18:23:44 +0100

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth
Sebastian Spaeth added the comment: P.S. To replicate this in ipython: import locale, imaplib locale.setlocale(locale.LC_ALL,'de_CH.utf8') imaplib.Time2Internaldate(220254431) Out[1]: '"24-Dez-1976 06:47:11 +0100"' (Note the

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth
Sebastian Spaeth added the comment: CC'ing lavajoe as he seemed to be busy with some of imaplib's Date stuff the last couple of days. -- nosy: +lavajoe ___ Python tracker <http://bugs.python.o

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth
Sebastian Spaeth added the comment: I think I found the issue he mentioned, however it was about the functions taking the local time (rather than UTC), which is fine. The problem is that Time2Internaldate is used for every .append() operation internally, producing invalid dates which are

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-28 Thread Sebastian Spaeth
Sebastian Spaeth added the comment: > Added file: imaplib_Time2Internaldate_locale_fix.patch The patch looks very good to me and works. I agree that we should be returning a bytearray but this is should not be part of this issue. For all that it's worth: Signed-off-by: Sebastia

[issue3001] RLock's are SLOW

2008-06-21 Thread sebastian serrano
sebastian serrano <[EMAIL PROTECTED]> added the comment: Running with python -O the timing gets a little closer between Lock and RLock. This code won't be easy to improve in performance. The heaviest call is current_thread(), used at lines: 117:me = current_thread() 137:if s

[issue4163] textwrap wordsep_re Unicode

2008-10-21 Thread Sebastian Kirsche
New submission from Sebastian Kirsche <[EMAIL PROTECTED]>: The attached patch makes textwrap work with strings containing dashes and Unicode alphabetic characters. In addition, it fixes the test case for issue 1149508, which no longer failed after temporarily undoing the corresponding

[issue1699259] replacing char* with const char* in sysmodule.c/.h

2008-11-13 Thread Sebastian Ramacher
Sebastian Ramacher <[EMAIL PROTECTED]> added the comment: At least a response, finally. > * Any reason why PySys_SetPath(char *) is left out? I guess it I just missed it. > * Same for PySys_SetArgv(int, char **) That one is non-trivial and requires some rewriting of PySys_Se

[issue4411] __mro__ documentation

2008-11-24 Thread Sebastian Wiesner
New submission from Sebastian Wiesner <[EMAIL PROTECTED]>: The documentation of Python 2.6 and 2.7 only mentions the class attribute "__mro__" in ABC documentation and in Data model documentation when explaining description invocation (see search results: http://docs.python.org/d

[issue4577] distutils: -3 warnings (apply)

2008-12-07 Thread Sebastian Rittau
New submission from Sebastian Rittau <[EMAIL PROTECTED]>: The attached patch removes all instances of the deprecated "apply" function from distutils and thereby fixes warnings when run with -3. -- components: Distutils files: distutils.diff keywords: patch messages: 772

[issue4577] distutils: -3 warnings (apply)

2008-12-07 Thread Sebastian Rittau
Sebastian Rittau <[EMAIL PROTECTED]> added the comment: Oops, missed a closing parenthesis. Added file: http://bugs.python.org/file12264/distutils.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4577] distutils: -3 warnings (apply)

2008-12-07 Thread Sebastian Rittau
Changes by Sebastian Rittau <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file12263/distutils.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4578] compiler: -3 warnings

2008-12-07 Thread Sebastian Rittau
New submission from Sebastian Rittau <[EMAIL PROTECTED]>: The attached patch replaces all instances of "x.has_key(k)" method calls by "k in x". It also replaces one call to parser.ast2tuple by parser.st2tuple. This removes deprecation warnings when running in -3 mo

[issue4578] compiler: -3 warnings

2008-12-07 Thread Sebastian Rittau
Sebastian Rittau <[EMAIL PROTECTED]> added the comment: I'd like to see this fixed, just to decrease the amount of warning spam I get when testing my own packages. It seems that one of my dependecies that I have no control over is pulling this in. Adding a warning when this module i

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Sebastian Rittau
Sebastian Rittau added the comment: A timedelta.toseconds method (or equivalent) makes no sense. The number of seconds in a day is not fixed (due to leap seconds) and relying on such a method would introduce subtle bugs. The only way to find out the number of seconds in a range of dates is if

[issue2155] optparse.OptionGroup with_statement context handling

2008-12-15 Thread Sebastian Rittau
Sebastian Rittau added the comment: This API is too "magical" to my liking and doesn't really reflect what context manager's are supposed to do, i.e. handling resources. Also, I don't see much advantage over: group = OptionGroup(parser, "

[issue1673409] datetime module missing some important methods

2008-12-15 Thread Sebastian Rittau
Sebastian Rittau added the comment: Leap second handling is usually configurable. Default on Debian Linux (but similar on RHEL and SuSE): >>> int(date(1994,1,1).strftime("%s")) - int(date(1993,1,1).strftime("%s")) 31536000 After doing "cp /usr/share/zoneinfo/

[issue4949] Constness in PyErr_NewException

2009-01-16 Thread Sebastian Ramacher
Changes by Sebastian Ramacher : -- nosy: +sebastinas ___ Python tracker <http://bugs.python.org/issue4949> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47082] No protection: `import numpy` in two different threads can lead to race-condition

2022-03-21 Thread Sebastian Berg
Sebastian Berg added the comment: To add to this: it would seem to me that the side-effects of importing should be guaranteed to only be called once? However, IO or other operations could be part of the import side-effects and release the GIL. So even a simple, pure-Python, package could

[issue47082] No protection: `import numpy` in two different threads can lead to race-condition

2022-03-21 Thread Sebastian Berg
Sebastian Berg added the comment: Thanks, so there should already be a lock in place (sorry, I missed that). But somehow we seem to get around it? Do you know what may cause the locking logic to fail in this case? Recursive imports in NumPy itself? Or Cython using low-level C-API? I.e

[issue42012] typing support in wsgiref

2022-04-05 Thread Sebastian Rittau
Change by Sebastian Rittau : -- keywords: +patch pull_requests: +30392 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32335 ___ Python tracker <https://bugs.python.org/issu

[issue37980] regression when passing numpy bools to sorted(..., reverse=r)

2019-08-29 Thread Sebastian Berg
Change by Sebastian Berg : -- nosy: +seberg ___ Python tracker <https://bugs.python.org/issue37980> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37980] regression when passing numpy bools to sorted(..., reverse=r)

2019-08-30 Thread Sebastian Berg
Sebastian Berg added the comment: I applaud the stricter rules in general, as Mark noted nicely, the issue is that `__index__` is maybe a strange way to achieve that for bools (it is not like `123` is a clean bool)? `__nonzero__` coerces to bools, there is no `__bool__` to convert to bool

[issue38258] ctypes ignores when a DLL function is called with too many arguments

2019-09-23 Thread Sebastian Ernst
New submission from Sebastian Ernst : A c-function with the following signature ... ```C int16_t __stdcall __declspec(dllimport) square_int( int16_t a ); ``` ... is being called with ctypes: ```python def test_error_callargs_unconfigured_too_many_args(): dll

[issue38258] ctypes ignores when a DLL function is called with too many arguments

2019-09-24 Thread Sebastian Ernst
Sebastian Ernst added the comment: Thanks a lot for the clarification, Eryk. I did not notice that it was deprecated behavior. For the "too many arguments" case I guess this is not an issue. However, just for the symmetry of things, I also looked at calling a function wi

[issue38450] 3.8 Release Notes: IDLE section dupe

2019-10-11 Thread Sebastian Rittau
New submission from Sebastian Rittau : In the 3.8 release notes (https://docs.python.org/3.8/whatsnew/3.8.html), the section "IDLE and idlelib" is duplicated as "idlelib and IDLE". Also, the section "gc" and "gzip" between them are not sorted a

[issue38460] 3.8 Release Notes: document asyncio exception changes

2019-10-13 Thread Sebastian Rittau
New submission from Sebastian Rittau : In Python 3.8 asyncio exceptions were consolidated into the new module "asyncio.exceptions". Previously they were spread out over several modules. While the documentation always mandated to import the exceptions from top-level "asyn

[issue38461] 3.8 Release Notes: "curses" misspelled as "ncurses"

2019-10-13 Thread Sebastian Rittau
New submission from Sebastian Rittau : The "curses" module is misspelled and sorted as "ncurses" in the release notes. -- messages: 354579 nosy: srittau priority: normal severity: normal status: open title: 3.8 Release Notes: "curse

[issue38463] 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing

2019-10-13 Thread Sebastian Rittau
New submission from Sebastian Rittau : The link to SSLContext.post_handshake_auth in the "ssl" section in the release notes is missing. -- assignee: docs@python components: Documentation messages: 354582 nosy: docs@python, srittau priority: normal severity: normal status:

[issue38464] documentation for NormalDist.quantiles(): missing argument

2019-10-13 Thread Sebastian Rittau
New submission from Sebastian Rittau : The documentation for NormalDist.quantiles() (https://docs.python.org/3.8/library/statistics.html#statistics.NormalDist) is missing the "n" argument from the definition. -- assignee: docs@python components: Documentation messages: 3

[issue38466] threading.excepthook doc talks about "object"

2019-10-13 Thread Sebastian Rittau
New submission from Sebastian Rittau : The documentation of threading.excepthook (https://docs.python.org/3.8/library/threading.html#threading.excepthook) talks about "object", when it only has a "thread" attribute: "Storing object using a custom hook can resurr

[issue38467] Misspelled argument names for typing.get_origin and get_args

2019-10-13 Thread Sebastian Rittau
New submission from Sebastian Rittau : The arguments for typing.get_origin() and typing.get_args() are named "typ" in the documentation (https://docs.python.org/3.8/library/typing.html#typing.get_origin), while they are named "tp" in the implementation. Important if used

[issue38467] Misspelled argument names for typing.get_origin and get_args

2019-10-13 Thread Sebastian Rittau
Change by Sebastian Rittau : -- keywords: +patch pull_requests: +16326 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16753 ___ Python tracker <https://bugs.python.org/issu

[issue38467] Misspelled argument names for typing.get_origin and get_args

2019-10-13 Thread Sebastian Rittau
Sebastian Rittau added the comment: https://github.com/python/cpython/pull/16753 -- ___ Python tracker <https://bugs.python.org/issue38467> ___ ___ Python-bug

[issue38484] HTMLParser.handle_starttag should mention that value can be None

2019-10-15 Thread Sebastian Rittau
New submission from Sebastian Rittau : The documentation for HTMLParser.handle_starttag (https://docs.python.org/3/library/html.parser.html#html.parser.HTMLParser.handle_starttag) should mention that the value of an attribute can be `None` for argument-less attributes. I can submit a PR if

[issue38460] 3.8 Release Notes: document asyncio exception changes

2019-10-22 Thread Sebastian Rittau
Sebastian Rittau added the comment: Also it seems there are various new arguments and methods in asyncio that are not in the release notes. (Via https://github.com/python/typeshed/issues/2313). -- ___ Python tracker <https://bugs.python.

[issue38627] Add copy() method to pathlib

2019-10-28 Thread Sebastian Linke
New submission from Sebastian Linke : pathlib.Path() could wrap shutil.copy() with something like this: def copy(self, target): if not self.is_file(): # No support for directories here raise ValueError("Path must point to a regular file") # copy() appends fil

[issue38627] Add copy() method to pathlib

2019-10-28 Thread Sebastian Linke
Sebastian Linke added the comment: Docstring could be: Copy file content and permission bits of this path to the target path and return a new Path instance pointing to the target path. If target is a directory, the base filename of this path is added to the target and a new file corresponding

[issue43608] `bytes_concat` and Buffer cleanup

2021-03-23 Thread Sebastian Berg
New submission from Sebastian Berg : `pybytes_concate` currently uses the following code to get the data: va.len = -1; vb.len = -1; if (PyObject_GetBuffer(a, &va, PyBUF_SIMPLE) != 0 || PyObject_GetBuffer(b, &vb, PyBUF_SIMPLE) != 0) { PyErr_Format(PyExc_T

[issue43965] dataclasses.replace breaks when __init__ is overrriden in subclass

2021-04-28 Thread Sebastian Speitel
New submission from Sebastian Speitel : from dataclasses import dataclass, replace @dataclass() class A: a: int class B(A): def __init__(self): super().__init__(a=1) obj1 = B() obj2 = replace(obj1, a=2) File "/usr/lib/python3.9/dataclasses.py", line 1284,

[issue43965] dataclasses.replace breaks when __init__ is overrriden in subclass

2021-04-28 Thread Sebastian Speitel
Sebastian Speitel added the comment: One solution I thought of was to return not an object of the same instance, but one of the same dataclass, which would allow the implementation to traverse the class hierachy of the object and create an instance of the first dataclass-class (or class

[issue43965] dataclasses.replace breaks when __init__ is overrriden in subclass

2021-04-28 Thread Sebastian Speitel
Sebastian Speitel added the comment: Or maybe a cls argument which defaults to obj.__class__? -- ___ Python tracker <https://bugs.python.org/issue43965> ___ ___

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-05-03 Thread Sebastian Rittau
Change by Sebastian Rittau : -- nosy: +srittau ___ Python tracker <https://bugs.python.org/issue38291> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-05-13 Thread Sebastian Rittau
Change by Sebastian Rittau : -- keywords: +patch pull_requests: +24757 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26113 ___ Python tracker <https://bugs.python.org/issu

[issue35089] Remove typing.io and typing.re from documentation

2021-05-13 Thread Sebastian Rittau
Change by Sebastian Rittau : -- pull_requests: +24758 pull_request: https://github.com/python/cpython/pull/26113 ___ Python tracker <https://bugs.python.org/issue35

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-05-13 Thread Sebastian Rittau
Sebastian Rittau added the comment: I opened a PR to remove their mention from the docs for now. I can look into how to add a deprecation warning to a module if no one else beats me to it. -- ___ Python tracker <https://bugs.python.org/issue38

[issue44261] SocketType documentation misleading

2021-05-28 Thread Sebastian Rittau
New submission from Sebastian Rittau : The documentation of socket.SocketType (https://docs.python.org/3/library/socket.html?highlight=sockettype#socket.SocketType) is misleading. It states: This is a Python type object that represents the socket object type. It is the same as type

[issue38460] 3.8 Release Notes: document asyncio exception changes

2021-06-14 Thread Sebastian Rittau
Change by Sebastian Rittau : -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue38460> ___ ___ Python-bugs-list mailing list Un

[issue38460] 3.8 Release Notes: document asyncio exception changes

2021-06-14 Thread Sebastian Rittau
Sebastian Rittau added the comment: Closing per the comments by Andrew and Raymond and the fact that 3.8 has been released for quite some while now. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.p

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-06-14 Thread Sebastian Rittau
Change by Sebastian Rittau : -- pull_requests: +25307 pull_request: https://github.com/python/cpython/pull/26719 ___ Python tracker <https://bugs.python.org/issue38

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-06-14 Thread Sebastian Rittau
Sebastian Rittau added the comment: And I opened a second PR (for Python 3.11 only) to issue a deprecation warning when typing.io or typing.re gets imported. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-06-21 Thread Sebastian Rittau
Sebastian Rittau added the comment: Thank you for fixing this, Ken, the PR looks good to me. Overall it looks as if the the Azure pipeline should be fixed, though. It's not ideal that the tests pass while running the PR, but not in other situations. Also, the warnings suppression i

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-06-22 Thread Sebastian Rittau
Sebastian Rittau added the comment: Ken: We still need to remove these modules in Python 3.12+. Should we open a separate issue, reopen this one, or just handle it after the Python 3.11 branch has been created? -- ___ Python tracker <ht

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-07-05 Thread Sebastian Rittau
Sebastian Rittau added the comment: We could easily do what Ken did in PR-26811, and add "warnings.filterwarnings("default", category=DeprecationWarning)" to the test, but I would like to understand what is going on first. It seems the warnin

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-07-05 Thread Sebastian Rittau
Change by Sebastian Rittau : -- pull_requests: +25599 pull_request: https://github.com/python/cpython/pull/27039 ___ Python tracker <https://bugs.python.org/issue38

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-07-05 Thread Sebastian Rittau
Sebastian Rittau added the comment: pr-27039 suppresses warnings when accessing `typing.{re,io}.__module__`, which should fix this warning. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-07-05 Thread Sebastian Rittau
Sebastian Rittau added the comment: typing.io is not referenced in either the tests or the implementation for pydoc. What happens is basically: typing.io is a class, so its derived from object. When formatting the docstring for object, the formatter queries the __module__ attribute of all

[issue12178] csv writer doesn't escape escapechar

2021-07-13 Thread Sebastian Bank
Sebastian Bank added the comment: Thanks Tal. AFAICT there was an undocumented change in behaviour related to this fix. Python 3.9 quotes values with escapechar: ``` import csv import io kwargs = {'escapechar': '\\'} value = 'spam\\eggs' print(val

[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-07-23 Thread Sebastian Rittau
Change by Sebastian Rittau : -- pull_requests: +25857 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/27312 ___ Python tracker <https://bugs.python.org/issu

[issue44809] Changelog missing removal of StrEnum etc.

2021-08-02 Thread Sebastian Rittau
New submission from Sebastian Rittau : It seems that at some point StrEnum and a few other members were added to Python 3.10. I think they were present in 3.10 beta 2, but it seems they were removed by beta 4. While the Changelog at https://docs.python.org/3.10/whatsnew/changelog.html

[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Sebastian Berg
Sebastian Berg added the comment: The fix broke NumPy (see also https://github.com/numpy/numpy/pull/19612) It seems incorrect. After all, it doesn't matter much whether the float can be converted to an integer correctly (or even if it returns an undefined value), so long `int_

[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Sebastian Berg
Sebastian Berg added the comment: Hmm, sorry, I overshot/misread :(. The thing that the NumPy test-suite trips over is that: c_powi(inf+0j, 3) seems to not raise, but: _Py_c_pow(inf+0j, 3.+0j) (or nan+0.j rather then inf+0j) does seem to raise (returning `nan+nanj` in both cases

[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Sebastian Berg
Sebastian Berg added the comment: (Sorry for the spam. I think we can/should just hard-code the expected values in the NumPy test-suite. So this is not actually an issue for NumPy and probably just warrants a double-check that the behaviour change is desirable

[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Sebastian Berg
Sebastian Berg added the comment: Thanks for looking into it! `cpow` is indeed complicated. We had some discussion in NumPy about `0**y` branch cuts (I did yet not finish it, because thinking about the branch cuts is tricky). It is almost reassuring that the C standard also hedges out

[issue44861] csv.writer stopped to quote values with escapechar with csv.QUOTE_MINIMAL in Python 3.10

2021-08-07 Thread Sebastian Bank
New submission from Sebastian Bank : AFAICT there was an undocumented change in behaviour related to the fix of https://bugs.python.org/issue12178 (also reported in https://bugs.python.org/issue12178#msg397440): Python 3.9 quotes values with escapechar: ``` import csv import io kwargs

[issue44861] csv.writer stopped to quote values with escapechar with csv.QUOTE_MINIMAL in Python 3.10

2021-08-07 Thread Sebastian Bank
Sebastian Bank added the comment: IIUC there is no way to work around this from client/downstream code (to get the olf 3.6 to 3.9 behaviour), so this might break assertions on the output of `csv.writer` for users of `escapechar` whenever the data to be written contains the escapcechar (e.g

[issue44861] csv.writer stopped to quote values with escapechar with csv.QUOTE_MINIMAL in Python 3.10

2021-08-07 Thread Sebastian Bank
Sebastian Bank added the comment: The 3.9 behaviour is write: "spam\eggs" The 3.10 behaviour is write: spam\\eggs I think at least the change in csv.QUOTE_MINIMAL behviour should be documented (maybe adding hint to avoid the `escapechar` option for consist

  1   2   3   4   >