[issue46905] winsound.PlaySound should accept pathlib.Path instances

2022-03-02 Thread Julian
New submission from Julian : The library function winsound.PlaySound takes a sound parameter. One of the valid arguments is a path to a WAV filename. Since Python 3.4, paths can be cleanly represented with PathLib.Path instances. However, if you pass a Path instance to PlaySound, it responds

[issue7317] Display full tracebacks when an error occurs asynchronously

2011-10-15 Thread Julian
Julian added the comment: The formatting isn't very conventional for Python. Why not use the normal format? i.e. Traceback (most recent call last): File "/tmp/bla.py", line 4, in __del__ None.someattr AttributeError: 'NoneType' object has no attribute &#x

[issue7317] Display full tracebacks when an error occurs asynchronously

2011-10-15 Thread Julian
Julian added the comment: I wish there was a less instrusive of saying "+1. I'm happy. Thanks." than posting a whole comment, but until then: +1. I'm happy. Thanks. (I haven't inspected the code - just based on the description.) -- _

[issue12330] Named set methods on collections.Set and dict view objects

2011-06-13 Thread Julian
New submission from Julian : collections.Set / collections.MutableSet do not provide any of the named set methods, nor do dict view objects (neither as viewkeys and friends create them nor in py3). They obviously implement the operator methods correctly, but besides the fact that they'r

[issue12330] Named set methods on collections.Set and dict view objects

2011-06-13 Thread Julian
Changes by Julian : -- versions: -Python 2.6, Python 3.1 ___ Python tracker <http://bugs.python.org/issue12330> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12330] Named set methods on collections.Set and dict view objects

2011-06-13 Thread Julian
Julian added the comment: Oh boy. Reading the comment in Issue9212 more carefully now that you said that I see that Mr. Hettinger said exactly that. I apologize for missing it the first time. "Concrete classes are allowed to have more features than the corresponding ABC. The ABCs ar

[issue12330] Named set methods on collections.Set and dict view objects

2011-06-13 Thread Julian
Changes by Julian : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue12330> ___ ___ Python-bugs-list mailing list Unsubscri

[issue12445] dict view values objects are missing tp_richcmp and tp_as_number

2011-06-29 Thread Julian
New submission from Julian : dict view values() objects are missing tp_richcmp and tp_as_sequence, and the tests for those were incomplete, which means that on 2.7 and 3.2 (and on current head) viewvalues / values objects don't compare correctly. Without indication, I assume this is no

[issue12445] dict view values objects are missing tp_richcmp and tp_as_number

2011-06-30 Thread Julian
Julian added the comment: Looking over this again with a clear head, adding the number operators is the incorrect thing to do here I think, since that function was also written assuming we had a set-like view object as input. I am inclined to think that the correct behavior here for those

[issue12487] urllib2.urlopen() returns object missing context manager

2011-07-04 Thread Julian
Julian added the comment: You probably should bring this up again on #4972 which is being worked on. (and for the immediate future you have contextlib.closing too in case you hadn't seen it already) -- nosy: +Julian ___ Python tracker

[issue12579] str.format_map raises a SystemError for non-mapping

2011-07-17 Thread Julian
New submission from Julian : Attached is just a failing test case (just `print("{}".format_map(12))`), haven't been able to decipher the chain of calls in the unicodeobject.c code yet to see where the best place to put the fix would be (inside do_format_map before the pass bac

[issue12579] str.format_map raises a SystemError for non-mapping

2011-07-17 Thread Julian
Julian added the comment: Yeah, I saw the line you suggested and didn't think that was it. To expand on this, perhaps "{foo}".format(12) should raise a TypeError as well? I'd expect that more than the current behavior which is a KeyError. That KeyError is getting raised

[issue12579] str.format_map raises a SystemError for non-mapping

2011-07-17 Thread Julian
Julian added the comment: Sorry for the double post, meant to say, in line 506. -- ___ Python tracker <http://bugs.python.org/issue12579> ___ ___ Python-bug

[issue12579] str.format_map raises a SystemError for non-mapping

2011-07-17 Thread Julian
Julian added the comment: Fair enough. I suppose I take .format_map to mean, here is a mapping, call __getitem__ on it for each of the keys inside the format string, to which calling 12["foo"] would get me a TypeError. I suppose I see both as appropriate, but the fact that it

[issue12579] str.format_map raises a SystemError for format strings with positional arguments

2011-07-17 Thread Julian
Julian added the comment: Well you're right :). I appreciate you taking more time to help me with this than you could have yourself. I made the change (and changed the TypeError to a ValueError as per your discovery that this was just a positional value issue, hope you agree with that).

[issue12579] str.format_map raises a SystemError for format strings with positional arguments

2011-07-17 Thread Julian
Changes by Julian : Removed file: http://bugs.python.org/file22682/format_map_err.patch ___ Python tracker <http://bugs.python.org/issue12579> ___ ___ Python-bugs-list m

[issue12579] str.format_map raises a SystemError for format strings with positional arguments

2011-07-17 Thread Julian
Julian added the comment: Added, updated the patch :). Thank you! -- Added file: http://bugs.python.org/file22683/format_map_err.patch ___ Python tracker <http://bugs.python.org/issue12

[issue12579] str.format_map raises a SystemError for format strings with positional arguments

2011-07-17 Thread Julian
Changes by Julian : Removed file: http://bugs.python.org/file22681/format_map_err.patch ___ Python tracker <http://bugs.python.org/issue12579> ___ ___ Python-bugs-list m

[issue7317] Display full tracebacks when an error occurs asynchronously

2010-11-03 Thread Julian
Julian added the comment: Amaury asks: "Is there an already existing flag that could control this behaviour?" I wonder if the warnings module could be used. -- nosy: +oddthinking ___ Python tracker <http://bugs.python.

[issue10306] Weakref callback exceptions should be turned into warnings.

2010-11-03 Thread Julian
New submission from Julian : If a weakref callback raises an exception, weakref writes out some text (to stderr, I think) and ignores it. I think it would be more appropriate if weakref emitted that text using the Python warning module, to allow it to be better controlled. Consider this code

[issue10306] Weakref callback exceptions should be turned into warnings.

2010-11-04 Thread Julian
Julian added the comment: Thank you, Antoine, you make a good point. In my example, I am suppressing the warning, which, I agree isn't a good idea. In my real life usage, I was getting an unexpected exception in a callback in code written by another person. I wanted not to suppres

[issue12130] regex 0.1.20110514 findall overlapped not working with 'start of string' expression

2011-05-20 Thread Julian
New submission from Julian : Trying to use regex 0.1.2011051 with the overlapped=True feature It works great, unless I have the 'start of string' (caret) character in my regular expression: >>> regex.findall(r"a.*b","abadalaba",overlapped=T

[issue12130] regex 0.1.20110514 findall overlapped not working with 'start of string' expression

2011-05-20 Thread Julian
Julian added the comment: Sorry for posting in the wrong tracker. I'm a bit dumb: can you please point me to the right tracker? I know ^ should match the beginning of the string, but there are multiple overlapping matches with the beginning of the string (as the first set of results

[issue12130] regex 0.1.20110514 findall overlapped not working with 'start of string' expression

2011-05-20 Thread Julian
Julian added the comment: Just in case somebody else stumbles upon this, I ended up posting here: https://code.google.com/p/mrab-regex-hg/issues/detail?id=10 -- ___ Python tracker <http://bugs.python.org/issue12

[issue10476] __iter__ on a byte file object using a method to return an iterator

2010-11-20 Thread Julian
New submission from Julian : Iterating over a byte file object using __iter__ is rather useless, and a bit confusing perhaps. It'd be nice to propose two things: 1. Having __iter__ raise an exception if the file was opened with the "b" flag. 2. Adding a new by_bytes() method

[issue8595] Unexpected default timeout in http-client-related libraries

2010-05-01 Thread Julian
New submission from Julian : Since Python 2.6, httplib has offered a timeout parameter for fetches. As the documentation explains, if this parameter is not provided, it uses the global default. What the document doesn't explain is httplib builds on top of the socket library. The s

[issue8595] Explain the default timeout in http-client-related libraries

2010-05-01 Thread Julian
Julian added the comment: @orsenthil: Consider the definition of httplib.HTTPConnection.__init__(), in Python 2.6. def __init__(self, host, port=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): This could be replaced with: def __init__(self, host, port=None

[issue38895] performance degradation creating a mock object

2019-11-22 Thread Julian
New submission from Julian : There seems to be a performance issue when creating a Mock() object from unittest module. The performance difference between 3.7.x and 3.8.0 is about 7-8 times slower in 3.8 Heres the smalles sample i could generate: Using python 3.7.5 ``` python3 -m timeit -v

[issue38895] performance degradation creating a mock object (by factor 7-8)

2019-11-22 Thread Julian
Change by Julian : -- title: performance degradation creating a mock object -> performance degradation creating a mock object (by factor 7-8) ___ Python tracker <https://bugs.python.org/issu

[issue17195] Reading source code from file on exception

2013-02-12 Thread Julian
New submission from Julian: When an exception occurs and a traceback is printed, the source code is read from the file which leads to confusion when the file has been modified, but the code that produced the exception still had the old code in memory. -- components: Interpreter Core

[issue46253] C API documentation of Py_UNICODE_* character properties macros use Py_UNICODE instead of Py_UCS4

2022-01-03 Thread Julian Gilbey
New submission from Julian Gilbey : The documentation at https://docs.python.org/3/c-api/unicode.html?highlight=isalpha#unicode-character-properties lists a series of macros such as Py_UNICODE_ISSPACE(Py_UNICODE ch). However, the input type for these macros was changed from Py_UNICODE to

[issue46253] C API documentation of Py_UNICODE_* character properties macros use Py_UNICODE instead of Py_UCS4

2022-01-03 Thread Julian Gilbey
Change by Julian Gilbey : -- keywords: +patch pull_requests: +28595 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30387 ___ Python tracker <https://bugs.python.org/issu

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-10-27 Thread Julian Berman
Changes by Julian Berman : -- nosy: +Julian ___ Python tracker <http://bugs.python.org/issue13241> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-10-27 Thread Julian Berman
Julian Berman added the comment: I was unsuccessful building tip with any of the 3 compilers. Full paste of output from ./configure and make, along with haypo's test file are attached. http://paste.pound-python.org/show/14320/ I'm on 10.7.2, XCode is 4.1 (compiler versions in

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-10-27 Thread Julian Berman
Julian Berman added the comment: Never mind, yes, you're correct, somehow my build dir must have been dirty. Sorry bout that. -- ___ Python tracker <http://bugs.python.org/is

[issue13437] Provide links to the source code for every module in the documentation

2011-11-19 Thread Julian Berman
New submission from Julian Berman : The documentation occasionally contains a link to the source code for a module in the stdlib. See for instance http://docs.python.org/library/urlparse.html and http://docs.python.org/library/collections.html , or many others. With a quick perusal, I

[issue13437] Provide links to the source code for every module in the documentation

2011-11-20 Thread Julian Berman
Julian Berman added the comment: Here's first a quick list from one pass over the docs. I've attempted to limit myself to a few like you've suggested, though I'll wait for confirmation that Raymond is not willing to simply add them to everything once we're at it :)

[issue13437] Provide links to the source code for every module in the documentation

2011-11-26 Thread Julian Berman
Julian Berman added the comment: Well, if there's opposition I don't know how strongly I feel about this then, but I generally agree with you Ezio, if there's an occasion where 1) applies fixing the docs is certainly reasonable. If I'm checking the source though, it

[issue13523] Python does not warn in module .py files does not exist if there is still a .pyc file

2011-12-03 Thread Julian Berman
Julian Berman added the comment: I know this is a feature, and on occasion as pointed out a useful one. But in some cases it can be a tad annoying as the OP probably considered it. I had a recent example where a lingering .pyc made my test suite pass (and me nearly push broken code) despite

[issue13585] Add contextlib.CleanupManager

2011-12-12 Thread Julian Berman
Julian Berman added the comment: For reference, the implementation that I posted in the other thread is: @contextlib.contextmanager def maybe(got, contextfactory, *args, checkif=bool, **kwargs): if checkif(got): yield got else: with

[issue7897] Support parametrized tests in unittest

2011-12-15 Thread Julian Berman
Changes by Julian Berman : -- nosy: +Julian ___ Python tracker <http://bugs.python.org/issue7897> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13774] json.loads raises a SystemError for invalid encoding on 2.7.2

2012-01-11 Thread Julian Berman
New submission from Julian Berman : >>> import json >>> json.loads("{}", [1, 2, 3]) Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python/2.7.2/lib/python2.7/json/__init__.py", line 339, in loads return cls

[issue12236] Tkinter __version__ uses subversion substitution

2011-06-01 Thread Julian Taylor
New submission from Julian Taylor : ./Lib/lib-tk/Tkinter.py:33 has this svn keyword substitution: __version__ = "$Revision$" Due to the change to hg this field is not substituted and makes __version__ quite pointless. This affects the python 2.7.2rc1. -- components: Tkinte

[issue12236] Tkinter __version__ uses subversion substitution

2011-06-02 Thread Julian Taylor
Julian Taylor added the comment: matplotlib fails to build due to this with 2.7.2rc1 in ubuntu oneiric (but its seems simple to fix): https://launchpad.net/ubuntu/+source/matplotlib/1.0.1-2ubuntu1/+build/2535369 -- ___ Python tracker <h

[issue7946] Convoy effect with I/O bound threads and New GIL

2011-06-08 Thread Julian Mehnle
Changes by Julian Mehnle : -- nosy: +jmehnle ___ Python tracker <http://bugs.python.org/issue7946> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7753] newgil backport

2011-06-08 Thread Julian Mehnle
Changes by Julian Mehnle : -- nosy: +jmehnle ___ Python tracker <http://bugs.python.org/issue7753> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12752] locale.normalize does not take unicode strings

2011-08-15 Thread Julian Taylor
New submission from Julian Taylor : using unicode strings for locale.normalize gives following traceback with python2.7: ~$ python2.7 -c 'import locale; locale.normalize(u"en_US")' Traceback (most recent call last): File "", line 1, in File "/usr/lib

[issue12752] locale.normalize does not take unicode strings

2011-08-15 Thread Julian Taylor
Julian Taylor added the comment: this is a regression introduced by fixing http://bugs.python.org/issue1813 This breaks some user code,. e.g. wx.Locale.GetCanonicalName returns unicode. Example bugs: https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/824734 https

[issue12760] Add create mode to open()

2011-08-18 Thread Julian Berman
Julian Berman added the comment: A minor documentation error in io.rst line 475 which was changed to: + The *mode* can be ``'c'``, ``'r'``, ``'w'`` or ``'a'`` for reading + (default), writing, or appending. and should have "creating&q

[issue2651] Strings passed to KeyError do not round trip

2011-08-18 Thread Julian Berman
Changes by Julian Berman : -- nosy: +Julian ___ Python tracker <http://bugs.python.org/issue2651> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2011-08-18 Thread Julian Berman
New submission from Julian Berman : Using multiple `with` statements across multiple lines does not support using parens to break them up: with (open("a_really_long_foo") as foo, open("a_really_long_bar") as bar): pass Traceback (most recent call last):

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2011-08-22 Thread Julian Berman
Julian Berman added the comment: > we explicitly advise against importing too many modules in a single import > statement, but importing multiple names from a single location is often a > useful thing to do. Cool. I imagined this had to do with it. > there may be a gramm

[issue12941] add random.pop()

2011-09-08 Thread Julian Berman
Julian Berman added the comment: Considering this is pretty easily written more or less as r = range(20) r.pop(random.randrange(0, len(r))) is it really worth adding? -- nosy: +Julian ___ Python tracker <http://bugs.python.org/issue12

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread Julian Scheid
Julian Scheid added the comment: Having this in 2.6/2.7 would be great. I don't think the ELLIPSIS workaround suggested by Barry works, have you actually tried it? Below is an example where ELLIPSIS doesn't seem to help (run in 2.6.5). I have also tried "...Error:" a

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread Julian Scheid
Julian Scheid added the comment: Here's a better example that you can cut and paste. import optparse def foo(): """ >>> foo() #doctest: +ELLIPSIS Traceback (most recent call last): . . . ...OptionError: option bar: foo "&quo

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread Julian Scheid
Julian Scheid added the comment: Ah, right... so there is no easy workaround at present? -- ___ Python tracker <http://bugs.python.org/issue7490> ___ ___ Pytho

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread Julian Scheid
Julian Scheid added the comment: Thank you for the suggestion but in my mind that's not a viable workaround, and not just because of uglyness: I'm using doctest to validate code examples, which are included in the documentation and are meant to be educational. If I'd change

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread Julian Scheid
Julian Scheid added the comment: Hmm, wait. Here's a variation of your suggestion that works OK-ish even as an example: >>> try: ...# ... code that fails ... ... except mypkg.MyException, e: ...print(str(e)) Expected error message. This works because it omits the exc

[issue37941] python -m and runpy.run_module set different __name__ by default

2019-08-24 Thread Julian Berman
New submission from Julian Berman : This seems brutally simple, to the point where I'm concerned I'm missing something (or have seen this issue filed elsewhere but can't find it), but `python -m` and `runpy.run_module` don't set the same __name__ -- specifically `run

[issue37941] python -m and runpy.run_module set different __name__ by default

2019-09-03 Thread Julian Berman
Julian Berman added the comment: Is there no desire to have an API that works like -m (entirely. In this and any other way)? On Tue, Sep 3, 2019, 09:41 Nick Coghlan wrote: > > Change by Nick Coghlan : > > > -- > stage: -> resolved >

[issue37941] python -m and runpy.run_module set different __name__ by default

2019-09-12 Thread Julian Berman
Julian Berman added the comment: That all makes sense, I understand that in the general case you can't really promise someone that if you mutate global state in-process that the runpy module has any way of preventing that. Except IMO, the module gives exactly the impression you're

[issue43742] tcp_echo_client in asyncio streams example does not work. Hangs for ever at reaser.read()

2021-04-06 Thread julian colomina
New submission from julian colomina : taking the example verbatim into an ubuntu 20.04 with Python 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0] on linux will hand indefinitely at data = await reader.read(100) changing for data = await asyncio.wait_for(reader.read(100),5) will always

[issue22282] ipaddress module accepts octal formatted IPv4 addresses in IPv6 addresses

2021-04-11 Thread Julian Berman
Change by Julian Berman : -- nosy: +Julian ___ Python tracker <https://bugs.python.org/issue22282> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2021-04-11 Thread Julian Berman
Change by Julian Berman : -- nosy: +Julian ___ Python tracker <https://bugs.python.org/issue36384> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43742] tcp_echo_client in asyncio streams example does not work. Hangs for ever at reaser.read()

2021-05-03 Thread julian colomina
julian colomina added the comment: @jaswdr Thanks for your response. No I did not run the server that you mention. The language made me imply that the same process, in two separate coroutines, would be writing/reading from each end of the tcp connection. One writing to the tcp buffer

[issue44383] argparse.BooleanOptionalAction interacts poorly with ArgumentDefaultsHelpFormatter

2021-06-10 Thread Julian Gilbey
New submission from Julian Gilbey : With code like the following: import argparse parser = argparse.ArgumentParser( description="Test program", formatter_class=argparse.ArgumentDefaultsHelpFormatter, ) parser.add_argument( "--foo", help=&q

[issue44383] argparse.BooleanOptionalAction interacts poorly with ArgumentDefaultsHelpFormatter

2021-07-08 Thread Julian Gilbey
Julian Gilbey added the comment: Yes, this is a duplicate. Marking this report as a duplicate. It's a shame that the other one has a conflict and has been sitting waiting for an update for over a year :-( I'd be happy to help if it is of use. -- resolution: -&

[issue44383] argparse.BooleanOptionalAction interacts poorly with ArgumentDefaultsHelpFormatter

2021-07-08 Thread Julian Gilbey
Change by Julian Gilbey : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue44383> ___ ___ Python-bugs-list

[issue44994] datetime's C implementation verifies fromisoformat is ASCII, but the pure python implementation does not

2021-08-24 Thread Julian Berman
New submission from Julian Berman : This line (which contains a non-ASCII digit): python3.9 -c "import datetime; datetime.date.fromisoformat('1963-06-1৪')" raises: Traceback (most recent call last): File "", line 1, in ValueError: Invalid

[issue44995] "Hide the prompts and output" works abnormal

2021-08-25 Thread Julian Berman
Change by Julian Berman : -- keywords: +patch nosy: +Julian nosy_count: 2.0 -> 3.0 pull_requests: +26384 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27939 ___ Python tracker <https://bugs.python.org/i

[issue44986] Date formats in help messages of argparse

2021-08-25 Thread Julian Berman
Julian Berman added the comment: This is documented already I believe: https://docs.python.org/3/library/argparse.html#help > As the help string supports %-formatting, if you want a literal % to appear > in the help string, you must escape it as %%. -- nosy: +

[issue45081] dataclasses that inherit from Protocol subclasses have wrong __init__

2021-09-01 Thread Julian Fortune
New submission from Julian Fortune : I believe [`bpo-44806: Fix __init__ in subclasses of protocols`](https://github.com/python/cpython/pull/27545) has caused a regression when using a Dataclass. In Python `3.9.7`, a `dataclass` that inherits from a subclass of `typing.Protocol` (i.e., a

[issue45081] dataclasses that inherit from Protocol subclasses have wrong __init__

2021-09-02 Thread Julian Fortune
Change by Julian Fortune : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue45081> ___ ___ Pyth

[issue45081] dataclasses that inherit from Protocol subclasses have wrong __init__

2021-09-12 Thread Julian Fortune
Julian Fortune added the comment: Ian, `MyProtocol` does not provide an `__init__()`, and thus ``` super().__init__() ``` is calling the `__init__()` from `Protocol`. This results in the `TypeError`. Simply remove `super().__init__()` to resolve your issue. This behavior was changed in

[issue43148] Call sys.unraisablehook in the REPL when sys.excepthook is broken

2021-02-06 Thread Julian Berman
New submission from Julian Berman : At the REPL, when sys.excepthook is broken (below by setting it to a non-callable), one sees: ``` ⊙ python3.9

[issue43154] code.InteractiveConsole can crash if sys.excepthook is broken

2021-02-07 Thread Julian Berman
Change by Julian Berman : -- nosy: +Julian ___ Python tracker <https://bugs.python.org/issue43154> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43148] Call sys.unraisablehook in the REPL when sys.excepthook is broken

2021-02-15 Thread Julian Berman
Julian Berman added the comment: Thanks Victor. Yes likely happy to send a PR (have to clear a few things off the yak stack first) On Tue, Feb 9, 2021 at 5:38 AM STINNER Victor wrote: > > STINNER Victor added the comment: > > It makes sense to call _PyErr_WriteUnraisab

[issue21724] resetwarnings doesn't reset warnings registry

2020-05-24 Thread Julian Berman
Julian Berman added the comment: Just ran into this myself -- not sure what the intended fix is (hopefully it's "add a function that restores the warnings configuration to its defaults?" Changing resetwarnings seems likely to be not doable I assume.) But in the meanwhile,

[issue40379] multiprocessing's default start method of fork()-without-exec() is broken

2020-06-24 Thread Julian Berman
Change by Julian Berman : -- nosy: +Julian ___ Python tracker <https://bugs.python.org/issue40379> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman
New submission from Julian Berman : The following code succeeds "silently", which seems undesirable: from inspect import signature def two(): return 2 bound = signature(two).bind() bound.arguments["does_not_exist"] = 12 two(*bound.args, **boun

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman
Change by Julian Berman : -- nosy: +yselivanov versions: -Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue41745> ___ ___ Python-bug

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman
Julian Berman added the comment: As a secondary behavior here, which is actually the one that matters more for my use case, the following seems surprising as well: import inspect s = inspect.signature(lambda **kwargs: kwargs).bind() s.arguments["foo"] = 12 will similarly silently

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-11 Thread Julian Berman
Julian Berman added the comment: Not sure I agree with it being just a doc issue -- happy to clarify if something was unclear, not sure from your message if it was or if you disagree, but e.g.: > However, your 'two' function takes no arguments, so valid values of args and >

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-12 Thread Julian Berman
Julian Berman added the comment: Totally fair! Sorry, was just making sure the label change wasn't intended to say it *wasn't* enough to warrant a design change :) (which I agree should be discussed with folks who do use that functionality, of which I only recent

[issue13826] Having a shlex example in the subprocess.Popen docs is confusing

2012-01-19 Thread Julian Berman
New submission from Julian Berman : The example at http://docs.python.org/dev/library/subprocess.html#popen-constructor seems a bit misplaced, as it seems to suggest that one should use the shlex module. Most of the other examples in the module seem to use a list to provide the args, so if

[issue13826] Having a shlex example in the subprocess.Popen docs is confusing

2012-01-19 Thread Julian Berman
Julian Berman added the comment: Sounds reasonable to me. I'll take a look at adding one unless someone manages to beat me to it. -- ___ Python tracker <http://bugs.python.org/is

[issue14086] str(KeyError("Foo")) Unexpected Result

2012-02-22 Thread Julian Berman
Julian Berman added the comment: Hey there. Check out #2651 -- nosy: +Julian ___ Python tracker <http://bugs.python.org/issue14086> ___ ___ Python-bugs-list m

[issue30754] textwrap.dedent mishandles empty lines

2019-06-12 Thread Julian Berman
Julian Berman added the comment: I still disagree :) but docs are better than nothing. On Wed, Jun 12, 2019, 18:05 Guido van Rossum wrote: > > Change by Guido van Rossum : > > > -- > nosy: +gvanrossum > > ___ &g

[issue37805] json.dump(..., skipkeys=True) has no unit tests

2019-08-09 Thread Julian Berman
New submission from Julian Berman : Looks like there possibly are upstream tests that could be pulled in with modification: https://github.com/simplejson/simplejson/blob/00ed20da4c0e5f0396661f73482418651ff4d8c7/simplejson/tests/test_dump.py#L53-L66 (Found via https://bitbucket.org/pypy/pypy

[issue30754] textwrap.dedent mishandles empty lines

2017-06-25 Thread Julian Berman
New submission from Julian Berman: ⊙ python2 -c 'from textwrap import dedent; print repr(dedent(" " * 2 + "\n" + " " * 4 + "\n"))' '\n\n' instead of the presumed '\n \n' The same appears to be the case for py3.6. (At f

[issue30754] textwrap.dedent mishandles empty lines

2017-06-26 Thread Julian Berman
Julian Berman added the comment: @Terry IMHO it conflicts with the fundamental description of the function. > Remove any common leading whitespace from every line in text. If this behavior is intentional, textwrap.dedent does not do that, it does that, but also some other stuff. As

[issue34160] ElementTree not preserving attribute order

2018-12-19 Thread Julian Sivertsen
Julian Sivertsen added the comment: I don't understand why this library should go out of its way to support the old behavior when it seems like the only thing it breaks is tests that assume something that was never guaranteed and where you can get the old behavior in just two lin

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: The api looks good to me. Works fine in numpy. -- nosy: +jtaylor ___ Python tracker <http://bugs.python.org/issue26530> ___ ___

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: I don't see any reason why not to. -- ___ Python tracker <http://bugs.python.org/issue26530> ___ ___ Python-bugs-list m

[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: I am not sure if _PyTraceMalloc_GetTraceback really needs to be a public function. Exposing the tracing information should probably just go over python interfaces. -- ___ Python tracker <http://bugs.python.

[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: With this changeset it would: https://github.com/numpy/numpy/pull/8885 -- ___ Python tracker <http://bugs.python.org/issue30

[issue30073] binary compressed file reading corrupts newlines (lzma, gzip, bz2)

2017-04-14 Thread Julian Taylor
New submission from Julian Taylor: Probably a case of 'don't do that' but reading lines in a compressed files in binary mode produces bytes with invalid newlines in encodings that where '\n' is encoded as something else: with lzma.open("test.xz", "wt&q

[issue30073] binary compressed file reading corrupts newlines (lzma, gzip, bz2)

2017-04-14 Thread Julian Taylor
Julian Taylor added the comment: on second though not really worth an issue as it is a general problem of readline on binary streams. Sorry for the noise. -- stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.p

[issue30073] binary compressed file reading corrupts newlines (lzma, gzip, bz2)

2017-04-14 Thread Julian Taylor
Julian Taylor added the comment: see also http://bugs.python.org/issue17083 -- ___ Python tracker <http://bugs.python.org/issue30073> ___ ___ Python-bugs-list m

[issue30150] raw debug allocators to not return malloc alignment

2017-04-23 Thread Julian Taylor
New submission from Julian Taylor: The debug raw allocator do not return the same alignment as malloc. See _PyMem_DebugRawAlloc: https://github.com/python/cpython/blob/master/Objects/obmalloc.c#L1873 The line return p + 2*SST adds 2 * sizeof(size_t) to the pointer returned by malloc. On for

  1   2   3   >