[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

[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

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

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

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

[issue41260] datetime, date and time: strftime method takes different keyword argument: fmt (pure) or format (C)

2021-11-16 Thread Sebastian Rittau
Sebastian Rittau added the comment: Ref https://github.com/python/typeshed/pull/6317 for a discussion about this in typeshed. -- nosy: +srittau ___ Python tracker <https://bugs.python.org/issue41

[issue21436] Consider leaving importlib.abc.Loader.load_module()

2021-11-04 Thread Sebastian Rittau
Sebastian Rittau added the comment: I would ask you to reconsider this. https://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path/67692#67692 is a highly active question on StackOverflow, and my answer basically provided me all the karma I got there. For users

[issue28375] cgi.py spam in Apache server logs

2021-10-22 Thread Sebastian Rittau
Sebastian Rittau added the comment: All my projects now use werkzeug instead of the cgi module, so I can't confirm whether this problem still exists. I'm fine with closing this as unreproducible if no one else can reproduce it. -- status: pendi

[issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are

2021-09-21 Thread Sebastian Rittau
Sebastian Rittau added the comment: One thing I would strongly suggest for consistent terminology: Make "iterator" mean an object that has both "__next()__" and "__iter()__". This is consistent with how an iterator has been described in the glossary for a long t

[issue44957] typing docs: Mention PEP 604 syntax more prominently

2021-08-19 Thread Sebastian Rittau
Change by Sebastian Rittau : -- keywords: +patch pull_requests: +26297 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27833 ___ Python tracker <https://bugs.python.org/issu

[issue44957] typing docs: Mention PEP 604 syntax more prominently

2021-08-19 Thread Sebastian Rittau
New submission from Sebastian Rittau : The new PEP 604 syntax for type unions should be mentioned more prominently in the typing docs, starting with Python 3.10. I'm preparing a PR for discussion. -- assignee: docs@python components: Documentation messages: 399919 nosy: docs@p

[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

[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

[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

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

[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

[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

[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

[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

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

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

[issue42012] typing support in wsgiref

2020-10-12 Thread Sebastian Rittau
New submission from Sebastian Rittau : In typeshed (the repository for stdlib type annotations), we have defined a bunch of types to support annotating WSGI interfaces. See https://github.com/python/typeshed/blob/master/stdlib/2and3/_typeshed/wsgi.pyi for the current version. Unfortunately

[issue42001] Deprecate `typing.io` Wrapper Namespace

2020-10-10 Thread Sebastian Rittau
Sebastian Rittau added the comment: For reference, this came up in https://github.com/python/typeshed/issues/4639#issuecomment-706596656. `typing.io` has never been in typeshed and we decided not to include it. It looks as if it never gained any traction, especially since the types are

[issue39559] uuid.getnode() has unused argument

2020-02-05 Thread Sebastian Rittau
Sebastian Rittau added the comment: Code using this argument is in all likelihood already subtly broken, because it depends on non-existing functionality. I believe that a "hard" break would be better (for Python 3.9). -- ___ Pyth

[issue39559] uuid.getnode() has unused argument

2020-02-05 Thread Sebastian Rittau
Sebastian Rittau added the comment: Shantanu points out in https://github.com/python/typeshed/pull/3715 that the argument was made useless due to bpo-28009. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39559] uuid.getnode() has unused argument

2020-02-05 Thread Sebastian Rittau
New submission from Sebastian Rittau : uuid.getnode() has an undocumented, keyword-only "getters" argument that gets discarded immediately. This is confusing when using code inspection tools and can give the wrong impression that you can somehow override the node getters when yo

[issue38846] async: Return context manager from open(_unix)_connection

2019-11-19 Thread Sebastian Rittau
New submission from Sebastian Rittau : As a convenience it would be useful if async.open_connection() and open_unix_connection() would return a context manager that closes the writer on exit: with await open_unix_connection(...) as (reader, writer): ... This could be achieved by

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

[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

[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

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

[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

[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

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

[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

[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

[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

[issue35581] Document @typing.type_check_only

2018-12-25 Thread Sebastian Rittau
Change by Sebastian Rittau : -- keywords: +patch, patch pull_requests: +10559, 10560 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35581] Document @typing.type_check_only

2018-12-25 Thread Sebastian Rittau
Change by Sebastian Rittau : -- keywords: +patch, patch, patch pull_requests: +10559, 10560, 10561 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35581] Document @typing.type_check_only

2018-12-25 Thread Sebastian Rittau
Change by Sebastian Rittau : -- keywords: +patch pull_requests: +10559 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35581> ___ _

[issue35581] Document @typing.type_check_only

2018-12-25 Thread Sebastian Rittau
New submission from Sebastian Rittau : Document @typing.type_check_only per https://github.com/python/typing/issues/597. -- assignee: docs@python components: Documentation messages: 332508 nosy: docs@python, srittau priority: normal severity: normal status: open title: Document

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

2018-10-28 Thread Sebastian Rittau
Change by Sebastian Rittau : -- keywords: +patch pull_requests: +9496 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35089> ___ _

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

2018-10-28 Thread Sebastian Rittau
New submission from Sebastian Rittau : Per the discussion in https://github.com/python/typing/issues/589 and https://github.com/python/typeshed/issues/1652, IO, BinaryIO, TextIO, Pattern, and Match should be imported directly from typing, not from typing.io and typing.re. The documentation

[issue35001] ImportFrom level cannot be optional

2018-10-16 Thread Sebastian Rittau
Change by Sebastian Rittau : -- nosy: +srittau ___ Python tracker <https://bugs.python.org/issue35001> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34648] Confirm the types of parameters of traceback.format_list and traceback.StackSummary.from_list post-3.5

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

[issue34525] smtplib's authobject return value wrongly documented

2018-08-27 Thread Sebastian Rittau
Change by Sebastian Rittau : -- keywords: +patch pull_requests: +8438 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34525> ___ _

[issue34525] smtplib's authobject return value wrongly documented

2018-08-27 Thread Sebastian Rittau
New submission from Sebastian Rittau : smtplib's authobject() callback is supposed to return bytes, according to both the documentation at https://docs.python.org/3/library/smtplib.html as well as the docstring of SMTP.auth(). This does neither match the implementation of auth(),

[issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response()

2018-08-17 Thread Sebastian Rittau
Change by Sebastian Rittau : -- keywords: +patch pull_requests: +8267 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34418> ___ _

[issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response()

2018-08-17 Thread Sebastian Rittau
New submission from Sebastian Rittau : The documentation at https://docs.python.org/3/library/urllib.request.html#urllib.request.HTTPErrorProcessor does not list the two arguments "request" and "response" that HTTPErrorProcessor.http_response() and https_response()

[issue31844] HTMLParser: undocumented not implemented method

2018-07-30 Thread Sebastian Rittau
Sebastian Rittau added the comment: Good call. Maybe it's actually time to retire _markupbase and merge ParserBase into HTMLParser. -- ___ Python tracker <https://bugs.python.org/is

[issue33616] typing.NoReturn is undocumented

2018-05-23 Thread Sebastian Rittau
New submission from Sebastian Rittau : This exists at least in Python 3.6.5's typing module. https://github.com/python/typing/issues/165 has background on why it was added. -- assignee: docs@python components: Documentation messages: 317395 nosy: docs@python, srittau priority: n

[issue32284] typing.TextIO and BinaryIO are not aliases of IO[...]

2017-12-13 Thread Sebastian Rittau
Change by Sebastian Rittau : -- keywords: +patch pull_requests: +4723 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32284> ___ ___ Py

[issue32284] typing.TextIO and BinaryIO are not aliases of IO[...]

2017-12-11 Thread Sebastian Rittau
New submission from Sebastian Rittau : See https://github.com/python/typing/issues/518 for context. The typing documentation for 3.6.4rc1 states: > typing.io ... defines the generic type IO[AnyStr] and aliases TextIO and > BinaryIO for respectively IO[str] and IO[bytes]. In the c

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2017-11-14 Thread Sebastian Rittau
Change by Sebastian Rittau : -- nosy: +srittau ___ Python tracker <https://bugs.python.org/issue2> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32029] cgi: TypeError when no argument string is found

2017-11-14 Thread Sebastian Rittau
Change by Sebastian Rittau : -- components: +Library (Lib) title: cgi: TypeError -> cgi: TypeError when no argument string is found ___ Python tracker <https://bugs.python.org/issu

[issue32029] cgi: TypeError

2017-11-14 Thread Sebastian Rittau
New submission from Sebastian Rittau : Consider the following code: import cgi from io import BytesIO cgi.FieldStorage(BytesIO(b"{}"), environ={ "REQUEST_METHOD": "POST", "CONTENT_TYPE": "application/json", &

[issue31700] one-argument version for Generator.typing

2017-11-02 Thread Sebastian Rittau
Sebastian Rittau added the comment: Sorry for not responding, but I didn't know what I could have added that I didn't already say in the opening post. Of course, you can use workaround like using the three-argument version or creating aliases. Using Iterator is of course not a rea

[issue31844] HTMLParser: undocumented not implemented method

2017-10-23 Thread Sebastian Rittau
Sebastian Rittau added the comment: The quoted code above should have used ParserBase: class ParserBase: ... def error(self, message): raise NotImplementedError( "subclasses of ParserBase must override

[issue31844] HTMLParser: undocumented not implemented method

2017-10-23 Thread Sebastian Rittau
New submission from Sebastian Rittau : HTMLParser derives from _markupbase.ParserBase, which has the following method: class HTMLParser: ... def error(self, message): raise NotImplementedError( "subclasses of ParserBase must override error()") HTMLParse

[issue26123] http.client status code constants incompatible with Python 3.4

2017-10-23 Thread Sebastian Rittau
Sebastian Rittau added the comment: I take the liberty of closing this "wont fix". Changing the behaviour would most likely do more harm than good. If one of the maintainers disagrees, please reopen. :) -- resolution: -> wont fix stage: -> resolved status

[issue31700] one-argument version for Generator.typing

2017-10-05 Thread Sebastian Rittau
New submission from Sebastian Rittau : Currently typing.Generator requires three arguments: Generator[YieldType, SendType, ReturnType]. At least for me, passing values to a generator is a very rare case. I suggest to allow only one argument to be passed to Generator: Generator[YieldType

[issue28375] cgi.py spam in Apache server logs

2016-10-06 Thread Sebastian Rittau
New submission from Sebastian Rittau: I am using cgi.py in WSGI applications, using Apache and mod_wsgi. Unfortunately cgi.py keeps spamming the error log with messages like the following: Exception ignored in: Traceback (most recent call last): File "/usr/lib/python3.5/cgi.py"

[issue26123] http.client status code constants incompatible with Python 3.4

2016-01-15 Thread Sebastian Rittau
Sebastian Rittau added the comment: It is no doubt that is easy to work around. Once I found the problem it took about five minutes to fix it and roll a new release. And of course for Python 3.5+ code it is better to use the enum http.HTTPStatus directly (I actually like that enum a lot). But

[issue26123] http.client status code constants incompatible with Python 3.4

2016-01-15 Thread Sebastian Rittau
New submission from Sebastian Rittau: The HTTP status code constants in Python 3.5 http.client are not compatible with the constants in Python 3.4, since the str() behaviour is different. This breaks code: srittau@moby:~$ python3.5 Python 3.5.1+ (default, Jan 13 2016, 15:09:18) [GCC 5.3.1

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2015-10-08 Thread Sebastian Rittau
Sebastian Rittau added the comment: Is there any progress on this? The fix seems trivial. -- ___ Python tracker <http://bugs.python.org/issue20504> ___ ___ Pytho

[issue21436] bring back importlib.load_source() et al.

2014-05-05 Thread Sebastian Rittau
New submission from Sebastian Rittau: It was very easy to load plugin files in Python 2: import imp my_module = imp.load_source("what.ever", "foo.py") Unfortunately, this became much more obscure in Python 3.3: import importlib.machinery loader = importlib.machin

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2014-02-26 Thread Sebastian Rittau
Changes by Sebastian Rittau : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue20504> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2014-02-03 Thread Sebastian Rittau
New submission from Sebastian Rittau: Consider the attached test case. This test will run fine with Python 2.7, but will fail with Python 3.3. If cgi.FieldStorage() tries to parse a multipart request without a Content-Length header in the main section, segments will have a length of 0

[issue2736] datetime needs an "epoch" method

2010-05-22 Thread Sebastian Rittau
Changes by Sebastian Rittau : -- nosy: -srittau ___ Python tracker <http://bugs.python.org/issue2736> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

[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

[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

[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

[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

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