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
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
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
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
Change by Julian Fortune :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue45081>
___
___
Pyth
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
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: +
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
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 Gilbey :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue44383>
___
___
Python-bugs-list
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: -&
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 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
Change by Julian Berman :
--
nosy: +Julian
___
Python tracker
<https://bugs.python.org/issue36384>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Julian Berman :
--
nosy: +Julian
___
Python tracker
<https://bugs.python.org/issue22282>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Change by Julian Berman :
--
nosy: +Julian
___
Python tracker
<https://bugs.python.org/issue43154>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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:
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
Change by Julian Berman :
--
nosy: +yselivanov
versions: -Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue41745>
___
___
Python-bug
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: +Julian
___
Python tracker
<https://bugs.python.org/issue40379>
___
___
Python-bugs-list mailing list
Unsubscribe:
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 :
--
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 :
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
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
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
>
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
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
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
Julian Berman added the comment:
Yes I know *why* it worked in Py2 -- still seems like an oversight :)
To me, comparing (multi)set-like is the only reasonable behavior there
which is what IIRC the patch did, but even without that, for a given dict,
d.values() != d.values().
So, it's not
Julian Berman added the comment:
Well, surely there are reasonable semantics :), because dict.values ==
dict.values was comparable before we had view objects.
It's been awhile since I filed this, and still seems rather silly that:
>>>> {"a": "foo"}.value
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
Change by Julian Mehnle :
--
nosy: +jmehnle
___
Python tracker
<https://bugs.python.org/issue26467>
___
___
Python-bugs-list mailing list
Unsubscribe:
Julian Berman added the comment:
This seems very very slightly overly conversational (specifically the "That's
all there is to it" sentence), but overall like a pretty decent improvement
here.
Personally I'd axe that sentence but then seems like this should be merged
a
Change by Julian Mehnle :
--
nosy: +jmehnle
___
Python tracker
<https://bugs.python.org/issue31861>
___
___
Python-bugs-list mailing list
Unsubscribe:
Julian Mehnle added the comment:
What's holding up the merging of this patch?
--
nosy: +jmehnle
___
Python tracker
<https://bugs.python.org/issue13041>
___
___
New submission from Julian DeMille :
An example of this would be to have something like `import .{
, , ... }`
--
components: Interpreter Core
messages: 315247
nosy: jdemilledt
priority: normal
severity: normal
status: open
title: Allow multiple imports from one module while preserving
New submission from Julian O :
In 2014, urlretrieve was changed to accept a context parameter to configure,
for example, SSL settings.
Ref:
https://github.com/python/cpython/commit/b206473ef8a7abe9abf5ab8776ea3bcb90adc747
However, 2.7.14 documentation does not mention this parameter
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
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 Taylor added the comment:
The largest type is usually the long double. Its alignment ranges from 4 bytes
(i386) to 16 bytes (sparc).
So Py_MAX (sizeof (size_t), 8) should indeed do it.
--
___
Python tracker
<http://bugs.python.org/issue30
Julian Taylor added the comment:
no in numpy it is just a case of using the wrong allocator in a certain spot,
an issue that can be fixed in numpy.
But it is also minor bug/documentation issue in Python itself.
Alignment isn't very important for SIMD any more but there are architectures
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
Julian Taylor added the comment:
see also http://bugs.python.org/issue17083
--
___
Python tracker
<http://bugs.python.org/issue30073>
___
___
Python-bugs-list m
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
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:
With this changeset it would:
https://github.com/numpy/numpy/pull/8885
--
___
Python tracker
<http://bugs.python.org/issue30
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:
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:
The api looks good to me. Works fine in numpy.
--
nosy: +jtaylor
___
Python tracker
<http://bugs.python.org/issue26530>
___
___
Julian Berman added the comment:
Cool! If I can nitpick one last time, in the versionchanged block, you have
`HTTPS URIs` but in the warning you use `HTTPS Urls` -- probably best to use
consistent casing and URL vs URI.
Other than that, lgtm to merge
Julian Berman added the comment:
The change note belongs outside the seealso.
I think also that wasn't exactly what Martin had in mind, I think he meant a
`.. versionchanged` directive -- and given that this was originally a warning,
personally I'd leave the warning but reword it,
Julian Taylor added the comment:
which is exactly what malloc is already doing for, thus my point is by using
malloc we would fullfill your request.
But do you have an actual real work application where this would help?
it is pretty easy to figure out, just run the application under perf and
Julian Taylor added the comment:
I know one can change the allocator, but the default is mmap which I don't
think is a very good choice for the current arena size.
All the arguments about fragmentation and memory space also apply to pythons
arena allocator itself and I am not convinced
Julian Taylor added the comment:
glibcs malloc is not obstack, its not a simple linear heap where one object on
top means everything below is not freeable. It also uses MADV_DONTNEED give
sbrk'd memory back to the system. This is the place where MADV_FREE can now be
used now as the l
Julian Taylor added the comment:
it defaulted to 128kb ten years ago, its a dynamic threshold since ages.
--
___
Python tracker
<http://bugs.python.org/issue26
Julian Taylor added the comment:
ARENA_SIZE is 256kb, the threshold in glibc is up to 32 MB
--
___
Python tracker
<http://bugs.python.org/issue26601>
___
___
Pytho
Julian Taylor added the comment:
simplest way to fix this would be to not use malloc instead of mmap in the
allocator, then you also get MADV_FREE for free when malloc uses it.
The rational for using mmap is kind of weak, the source just says "heap
fragmentation". The usual argument
Julian Berman added the comment:
My support (or really, asking for a more generic callable) was to enable other
use cases, not this one specifically -- e.g., allowing for constructing a
pathlib Path or a twisted.python.filepath.FilePath without needing to write
one's own argparse action.
Changes by Julian Mehnle :
--
nosy: +jmehnle
___
Python tracker
<http://bugs.python.org/issue24961>
___
___
Python-bugs-list mailing list
Unsubscribe:
Julian Taylor added the comment:
ping, this has been sitting for 4 years and two python releases. Its about time
this stupidly simple thing gets merged.
--
___
Python tracker
<http://bugs.python.org/issue23
Julian Taylor added the comment:
the median of median of 5 is quite significantly slower than a quickselect.
numpy implements an introselect which uses quickselect but falls back to median
of median of 5 if not enough progress is done.
In the numpy implementation for 10 element median
Julian Sivertsen added the comment:
I bumped into a similar issue with mimetypes.guess_extension on Arch Linux
64-bit in February. The behavior is still present in python 3.4.3.
$ python test.py
.htm
$ python test.py
.html
$ cat test.py
from mimetypes import guess_extension
print
Julian Taylor added the comment:
ok I ran it again, but note the machine was under use the full time so the
results are likely have no meaning.
python perf.py -r -b default /tmp/normal/bin/python3 /tmp/opt/bin/python3
Min: 0.399279 -> 0.376527: 1.06x faster
Avg: 0.410819 -> 0.383315:
Julian Taylor added the comment:
Your benchmarks are not affected by this change see the other issue. They are
also not representative of every workload out there.
I can at least see the argument why you didn't want to put the other variant of
this change in as it made the code a tin
Julian Taylor added the comment:
any comments on the doc changes?
--
___
Python tracker
<http://bugs.python.org/issue23530>
___
___
Python-bugs-list mailin
Julian Taylor added the comment:
right at best its probably too insignificant to really be worthwhile, closing.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issu
Julian Taylor added the comment:
Large objects are just if size > 512: return malloc(size) there is no reason it
should be slower.
Also for large objects allocation speed does not matter as much.
--
___
Python tracker
<http://bugs.pyth
Julian Taylor added the comment:
PyObject_Malloc just calls malloc above the threshold so there is no problem
for larger dicts.
For larger dicts the performance of malloc is also irrelevant as the time will
be spent elsewhere.
--
___
Python tracker
New submission from Julian Taylor:
dictionary creation spends a not insignificant amount of time in malloc
allocating keys objects. Python has a nice small object allocator that avoids a
lot of this overhead and falls back to malloc for larger allocations.
Is there a reason the dictionary does
Julian Taylor added the comment:
attached documentation update patch.
--
keywords: +patch
Added file:
http://bugs.python.org/file38369/0001-Issue-23530-Update-documentation-clarify-relation-of.patch
___
Python tracker
<http://bugs.python.
Julian Taylor added the comment:
oh thats great so python already has what I want. Then just an small
documentation update would be good, I'll have a go at a patch later.
--
___
Python tracker
<http://bugs.python.org/is
Julian Taylor added the comment:
certainly for anything that needs good control over affinity psutils is the
best choice, but I'm not arguing to implement full process control in python. I
only want python to provide the number of cores one can work on to make best
use of the avai
Julian Taylor added the comment:
I do agree that its probably safer to not change the default return value.
But adding a option (or new function) would still be good, the number of
available cpus is more often the number you actually want in practice.
To the very least the documentation should
New submission from Julian Taylor:
multiprocessing.cpu_count and os.cpu_count which are often used to determine
how many processes one can run in parallel do not respect the cpuset which may
limit the process to only a subset of online cpus leading to heavy
oversubscription in e.g
Julian Berman added the comment:
+1 to lists all over, this is just confusing.
--
nosy: +Julian
___
Python tracker
<http://bugs.python.org/issue20598>
___
___
Julian Taylor added the comment:
very nice, thanks for adding this.
coincidentally numpy added the same to numpy.distutils independently just a
week later, though numpy also accepts an environment variable to set the number
of jobs.
This is useful for e.g. pip installations where one does not
Julian Reschke added the comment:
An example URI for this issue is:
http://example.com/;
The RFC 3986 path component for this URI is "/;".
After using urllib's parse function, how would you know?
(I realize that changing behavior of the existing API may cause problems,
New submission from Julian Reschke:
urllib.parse tries to special-case params, which have been dropped from the
general URI syntax back in RFC 2396 (16 years ago).
In most cases this can be worked around by reconstructing the path from both
path and params; however this fails for paths that
Joe Julian added the comment:
I suspect the underlying problem is that the fix expects the daemon threads to
hit a point where they try to acquire the GIL and that's not going to happen
with these librados threads; they stay in lib
Changes by Joe Julian :
--
nosy: +Joe.Julian
___
Python tracker
<http://bugs.python.org/issue21963>
___
___
Python-bugs-list mailing list
Unsubscribe:
Julian Berman added the comment:
My opinion is already here re: patch vs patch.object, so I won't repeat it, but
@Michael, if you really want .patch, are you open to adding .patch_object as
well?
(Regardless, thanks for working on this J
Julian Gindi added the comment:
Anything else need to be done on this patch?
--
___
Python tracker
<http://bugs.python.org/issue18983>
___
___
Python-bugs-list m
Julian Gindi added the comment:
Good catch. I'm gonna look into this. Seems like you should be able to access
these from UserString as well.
--
nosy: +Julian.Gindi
___
Python tracker
<http://bugs.python.org/is
Julian Gindi added the comment:
Interesting...I'll try to dig in and see what's going on.
--
___
Python tracker
<http://bugs.python.org/issue21720>
___
___
Julian Gindi added the comment:
I'm trying to replicate this issue. I do not get an error when I run
```
>>> __import__('datetime', fromlist=[u'datetime'])
```
any more information you could provide to help move this issue forwar
Julian Berman added the comment:
Created issue22088 to address not having fixed Py2 here.
--
nosy: +Julian
___
Python tracker
<http://bugs.python.org/issue1466
New submission from Julian Berman:
The base64 module documentation claims that decode methods raise exceptions for
non-base64 input, but they do not.
There was a patch for Py3 done in issue1466065, but the documentation was not
updated for Py2. I have not read that ticket carefully enough to
New submission from Julian Gilbey:
In re.rst, the re.compile documentation says:
Compile a regular expression pattern into a regular expression object, which
can be used for matching using its :func:`match` and :func:`search` methods,
described below.
This results in linking to the
Julian Taylor added the comment:
for median alone a multiselect is probably overkill (thats why I mentioned the
minimum trick)
but a selection algorithm is useful on its own for all of python and then a
multiselect should be considered.
Of course that means it would need to be implemented in
Julian Taylor added the comment:
in the case of the median you can archive similar performance to a multiselect
by simply calling min([len(data) // 2 + 1]) for the second order statistic
which you need for the averaging of even number of elements.
maybe an interesting datapoint would be to
Julian Taylor added the comment:
I just tested it, PyObject_NewVar seems to use RawMalloc not the GC malloc so
its probably fine.
--
___
Python tracker
<http://bugs.python.org/issue21
Julian Taylor added the comment:
won't replacing _PyObject_GC_Malloc with a calloc cause Var objects
(PyObject_NewVar) to be completely zeroed which I think they didn't before?
Some numeric programs stuff a lot of data into var objects and could care about
python suddenly setting th
New submission from Julian Taylor:
attached a prototype patch that avoids the memset of ob_item in PyTuple_New
which is not necessary for the BUILD_TUPLE bytecode and PyTuple_Pack as these
overwrite every entry in ob_item anyway.
This improves small tuple creation by about 5%.
It does this by
Changes by Julian Mehnle :
--
nosy: +jmehnle
___
Python tracker
<http://bugs.python.org/issue8271>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Julian Mehnle :
--
nosy: +jmehnle
___
Python tracker
<http://bugs.python.org/issue9133>
___
___
Python-bugs-list mailing list
Unsubscribe:
1 - 100 of 249 matches
Mail list logo