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
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
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.)
--
_
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
Changes by Julian :
--
versions: -Python 2.6, Python 3.1
___
Python tracker
<http://bugs.python.org/issue12330>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Changes by Julian :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12330>
___
___
Python-bugs-list mailing list
Unsubscri
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
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
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
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
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
Julian added the comment:
Sorry for the double post, meant to say, in line 506.
--
___
Python tracker
<http://bugs.python.org/issue12579>
___
___
Python-bug
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
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).
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
Changes by Julian Berman :
--
nosy: +Julian
___
Python tracker
<http://bugs.python.org/issue13241>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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 :)
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
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
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
Changes by Julian Berman :
--
nosy: +Julian
___
Python tracker
<http://bugs.python.org/issue7897>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Changes by Julian Mehnle :
--
nosy: +jmehnle
___
Python tracker
<http://bugs.python.org/issue7946>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Julian Mehnle :
--
nosy: +jmehnle
___
Python tracker
<http://bugs.python.org/issue7753>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Changes by Julian Berman :
--
nosy: +Julian
___
Python tracker
<http://bugs.python.org/issue2651>
___
___
Python-bugs-list mailing list
Unsubscribe:
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):
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
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
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
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
Julian Scheid added the comment:
Ah, right... so there is no easy workaround at present?
--
___
Python tracker
<http://bugs.python.org/issue7490>
___
___
Pytho
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
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
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
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
>
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
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
Change by Julian Berman :
--
nosy: +Julian
___
Python tracker
<https://bugs.python.org/issue22282>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Julian Berman :
--
nosy: +Julian
___
Python tracker
<https://bugs.python.org/issue36384>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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: -&
Change by Julian Gilbey :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue44383>
___
___
Python-bugs-list
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
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
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: +
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
Change by Julian Fortune :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue45081>
___
___
Pyth
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
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
Change by Julian Berman :
--
nosy: +Julian
___
Python tracker
<https://bugs.python.org/issue43154>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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,
Change by Julian Berman :
--
nosy: +Julian
___
Python tracker
<https://bugs.python.org/issue40379>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Julian Berman :
--
nosy: +yselivanov
versions: -Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue41745>
___
___
Python-bug
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
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
>
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
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
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
Julian Berman added the comment:
Hey there. Check out #2651
--
nosy: +Julian
___
Python tracker
<http://bugs.python.org/issue14086>
___
___
Python-bugs-list m
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
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
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
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
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
Julian Taylor added the comment:
The api looks good to me. Works fine in numpy.
--
nosy: +jtaylor
___
Python tracker
<http://bugs.python.org/issue26530>
___
___
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
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.
Julian Taylor added the comment:
With this changeset it would:
https://github.com/numpy/numpy/pull/8885
--
___
Python tracker
<http://bugs.python.org/issue30
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
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
Julian Taylor added the comment:
see also http://bugs.python.org/issue17083
--
___
Python tracker
<http://bugs.python.org/issue30073>
___
___
Python-bugs-list m
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 - 100 of 249 matches
Mail list logo