[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

[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

[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

[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

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

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

[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

[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

[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

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

[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

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

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

[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

[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

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

[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

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

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

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

[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

[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

[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

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

[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

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

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

2019-03-28 Thread Julian Berman
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

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

2019-03-28 Thread Julian Berman
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

[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

[issue26467] Add async magic method support to unittest.mock.Mock

2018-08-23 Thread Julian Mehnle
Change by Julian Mehnle : -- nosy: +jmehnle ___ Python tracker <https://bugs.python.org/issue26467> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17894] Edits to descriptor howto

2018-06-30 Thread Julian Berman
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

[issue31861] aiter() and anext() built-in functions

2018-06-12 Thread Julian Mehnle
Change by Julian Mehnle : -- nosy: +jmehnle ___ Python tracker <https://bugs.python.org/issue31861> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13041] argparse: terminal width is not detected properly

2018-04-13 Thread Julian Mehnle
Julian Mehnle added the comment: What's holding up the merging of this patch? -- nosy: +jmehnle ___ Python tracker <https://bugs.python.org/issue13041> ___ ___

[issue33273] Allow multiple imports from one module while preserving its namespace

2018-04-13 Thread Julian DeMille
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

[issue32804] urllib.retrieve documentation doesn't mention context parameter

2018-02-08 Thread Julian O
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

[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

[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

[issue30150] raw debug allocators to not return malloc alignment

2017-05-24 Thread Julian Taylor
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

[issue30150] raw debug allocators to not return malloc alignment

2017-05-23 Thread Julian Taylor
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

[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

[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

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

[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

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

[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

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

[issue29182] Remove the warning in urllib docs that it doesn't do certificate validate by default.

2017-01-27 Thread Julian Berman
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

[issue29182] Remove the warning in urllib docs that it doesn't do certificate validate by default.

2017-01-25 Thread Julian Berman
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,

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-22 Thread Julian Taylor
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

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-22 Thread Julian Taylor
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

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-22 Thread Julian Taylor
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

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-21 Thread Julian Taylor
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

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-21 Thread Julian Taylor
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

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-21 Thread Julian Taylor
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

[issue19959] argparse.FileType does not expand tilde "~"

2016-03-28 Thread Julian Berman
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.

[issue24961] shell stdout broken after exiting interactive python prompt

2016-02-12 Thread Julian Mehnle
Changes by Julian Mehnle : -- nosy: +jmehnle ___ Python tracker <http://bugs.python.org/issue24961> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23601] use small object allocator for dict key storage

2016-01-29 Thread Julian Taylor
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

[issue21592] Make statistics.median run in linear time

2016-01-03 Thread Julian Taylor
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

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2015-07-12 Thread Julian Sivertsen
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

[issue23601] use small object allocator for dict key storage

2015-07-11 Thread Julian Taylor
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:

[issue23601] use small object allocator for dict key storage

2015-07-10 Thread Julian Taylor
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

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2015-07-09 Thread Julian Taylor
Julian Taylor added the comment: any comments on the doc changes? -- ___ Python tracker <http://bugs.python.org/issue23530> ___ ___ Python-bugs-list mailin

[issue21148] avoid needless pointers initialization in small tuple creation

2015-07-09 Thread Julian Taylor
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

[issue23601] use small object allocator for dict key storage

2015-07-09 Thread Julian Taylor
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

[issue23601] use small object allocator for dict key storage

2015-03-07 Thread Julian Taylor
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

[issue23601] use small object allocator for dict key storage

2015-03-07 Thread Julian Taylor
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

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2015-03-07 Thread Julian Taylor
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.

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2015-02-27 Thread Julian Taylor
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

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2015-02-27 Thread Julian Taylor
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

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2015-02-26 Thread Julian Taylor
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

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2015-02-26 Thread Julian Taylor
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

[issue20598] argparse docs: '7'.split() is confusing magic

2015-02-16 Thread Julian Berman
Julian Berman added the comment: +1 to lists all over, this is just confusing. -- nosy: +Julian ___ Python tracker <http://bugs.python.org/issue20598> ___ ___

[issue5309] distutils doesn't parallelize extension module compilation

2015-01-16 Thread Julian Taylor
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

[issue23150] urllib parse incorrect handing of params

2015-01-03 Thread Julian Reschke
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,

[issue23150] urllib parse incorrect handing of params

2015-01-02 Thread Julian Reschke
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

[issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph

2014-11-19 Thread Joe Julian
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

[issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph

2014-11-19 Thread Joe Julian
Changes by Joe Julian : -- nosy: +Joe.Julian ___ Python tracker <http://bugs.python.org/issue21963> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11664] Add patch method to unittest.TestCase

2014-10-12 Thread Julian Berman
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

[issue18983] Specify time unit for timeit CLI

2014-08-29 Thread Julian Gindi
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

[issue22189] collections.UserString missing some str methods

2014-08-28 Thread Julian Gindi
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

[issue21720] "TypeError: Item in ``from list'' not a string" message

2014-08-28 Thread Julian Gindi
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> ___ ___

[issue21720] "TypeError: Item in ``from list'' not a string" message

2014-08-28 Thread Julian Gindi
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

[issue1466065] base64 module ignores non-alphabet characters

2014-07-26 Thread Julian Berman
Julian Berman added the comment: Created issue22088 to address not having fixed Py2 here. -- nosy: +Julian ___ Python tracker <http://bugs.python.org/issue1466

[issue22088] base64 module still ignores non-alphabet characters

2014-07-26 Thread Julian Berman
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

[issue21690] re documentation: re.compile links to re.search / re.match instead of regex.search / regex.match

2014-06-07 Thread Julian Gilbey
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

[issue21592] Make statistics.median run in linear time

2014-06-07 Thread Julian Taylor
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

[issue21592] Make statistics.median run in linear time

2014-06-01 Thread Julian Taylor
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

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-04-17 Thread Julian Taylor
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

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-04-17 Thread Julian Taylor
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

[issue21148] avoid memset in small tuple creation

2014-04-03 Thread Julian Taylor
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

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2014-03-31 Thread Julian Mehnle
Changes by Julian Mehnle : -- nosy: +jmehnle ___ Python tracker <http://bugs.python.org/issue8271> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9133] Invalid UTF8 Byte sequence not raising exception/being substituted

2014-03-12 Thread Julian Mehnle
Changes by Julian Mehnle : -- nosy: +jmehnle ___ Python tracker <http://bugs.python.org/issue9133> ___ ___ Python-bugs-list mailing list Unsubscribe:

  1   2   3   >