[issue10697] host and port attributes not documented well in function urllib.parse.urlparse and urlsplit

2016-07-13 Thread Senthil Kumaran
Senthil Kumaran added the comment: I am unsure of the change too. I am willing to close this report as .port attribute is already documented. -- resolution: -> not a bug stage: needs patch -> resolved status: pending -> closed ___ Python tracker

[issue13312] test_time fails: strftime('%Y', y) for negative year

2016-07-13 Thread Martin Panter
Martin Panter added the comment: If you enable GCC’s -ftrapv option, the subtraction overflow triggers an abort. Alexander’s patch works around the problem for asctime(), but the problem still exists in other cases, such as: >>> time.mktime((-2**31 + 1899, *(0,) * 8)) Aborted (core dumped)

[issue27369] Tests break with --with-system-expat and Expat 2.2.0

2016-07-13 Thread Berker Peksag
Changes by Berker Peksag : -- stage: patch review -> resolved title: [PATCH] Tests break with --with-system-expat and Expat 2.2.0 -> Tests break with --with-system-expat and Expat 2.2.0 ___ Python tracker

[issue26446] Mention in the devguide that core dev stuff falls under the PSF CoC

2016-07-13 Thread Berker Peksag
Berker Peksag added the comment: Sorry, I finally found some time to clear my CPython TODO list. Thanks for the patch, Evelyn! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26446] Mention in the devguide that core dev stuff falls under the PSF CoC

2016-07-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6b4b73ebb054 by Berker Peksag in branch 'default': Issue #26446: Mention PSF CoC in core developer responsibilities https://hg.python.org/devguide/rev/6b4b73ebb054 -- nosy: +python-dev ___ Python tracker

[issue27180] Doc/pathlib: Please describe the behaviour of Path().rename() is depends on the platform (same as os.rename())

2016-07-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 270fd4493195 by Berker Peksag in branch '3.5': Issue #27180: Clarify Path.rename() behavior on Unix systems https://hg.python.org/cpython/rev/270fd4493195 New changeset 89821243621b by Berker Peksag in branch 'default': Issue #27180: Merge from 3.5

[issue27180] Doc/pathlib: Please describe the behaviour of Path().rename() is depends on the platform (same as os.rename())

2016-07-13 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue27507] bytearray.extend lacks overflow check when increasing buffer

2016-07-13 Thread Xiang Zhang
Xiang Zhang added the comment: Nice to see the real example. I don't think of that. -- ___ Python tracker ___

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-13 Thread Berker Peksag
Berker Peksag added the comment: Since Terry is already busy with IDLE maintenance, I went ahead and commit the patch with minor modifications. Thanks for the patch, John! :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 453a88a41a58 by Berker Peksag in branch '3.5': Issue #27455: Improve examples in tkinter documentation https://hg.python.org/cpython/rev/453a88a41a58 New changeset 800c069e16a0 by Berker Peksag in branch 'default': Issue #27455: Merge from 3.5

[issue27497] csv module: Add return value to DictWriter.writeheader

2016-07-13 Thread Berker Peksag
Berker Peksag added the comment: By the way, there is an open ticket about changing the recipe in Django documentation: https://code.djangoproject.com/ticket/26040 -- nosy: +berker.peksag ___ Python tracker

[issue27507] bytearray.extend lacks overflow check when increasing buffer

2016-07-13 Thread Martin Panter
Martin Panter added the comment: It is possible to make an infinite iterable, e.g. iter(int, 1), so it is definitely worth checking for overflow. The patch looks okay to me. An alternative would be to raise the error without trying to allocate Py_SSIZE_T_MAX first, but I am okay with either

[issue27498] Regression in repr() of class object

2016-07-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f11e6b72e8f by Benjamin Peterson in branch 'default': Backed out changeset af29d89083b3 (closes #25548) (closes #27498) https://hg.python.org/cpython/rev/4f11e6b72e8f -- nosy: +ned.deily, python-dev resolution: -> fixed stage: ->

[issue25548] Show the address in the repr for class objects

2016-07-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f11e6b72e8f by Benjamin Peterson in branch 'default': Backed out changeset af29d89083b3 (closes #25548) (closes #27498) https://hg.python.org/cpython/rev/4f11e6b72e8f -- nosy: +ned.deily resolution: -> fixed stage: commit review ->

[issue27369] [PATCH] Tests break with --with-system-expat and Expat 2.2.0

2016-07-13 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-13 Thread Nick Coghlan
Nick Coghlan added the comment: Perhaps a suitable outcome here would be to just add an unconditional RuntimeWarning when the target of "-m" is already in sys.modules after the parent package import, along the lines of: "RuntimeWarning: '' already in sys.modules prior to '__main__'

[issue22758] Regression in Python 3.2 cookie parsing

2016-07-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset a0bf31e50da5 by Martin Panter in branch '3.2': Issue #22758: Move NEWS entry to Library section https://hg.python.org/cpython/rev/a0bf31e50da5 -- ___ Python tracker

[issue27369] [PATCH] Tests break with --with-system-expat and Expat 2.2.0

2016-07-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5b64175c6c24 by Martin Panter in branch '3.2': Issue #27369: Don’t test error message detail that changed in Expat 2.2.0 https://hg.python.org/cpython/rev/5b64175c6c24 New changeset 1c06e02b968a by Martin Panter in branch '3.3': Issue #27369: Merge

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-13 Thread Nick Coghlan
Nick Coghlan added the comment: In http://bugs.python.org/issue27487#msg270300, Wolfgang noted: "In fact, for my own case I have now refactored things a bit so I can avoid the import from __init__.py." So I take that to mean that Wolfgang's particular project is now compatible with the new

[issue18966] Threads within multiprocessing Process terminate early

2016-07-13 Thread Tim Peters
Tim Peters added the comment: About ""No parents, no children", that's fine so far as it goes. But Python isn't C, a threading.Thread is not a POSIX thread, and threading.py _does_ have a concept of "the main thread". There's no conceptual problem _in Python_ with saying "the main thread"

[issue27506] make bytes/bytearray delete a keyword argument

2016-07-13 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your comment Martin. I'll apply them later when we reach agreement on functions. I have already used object = NULL, the C default is not necessary here, and it works as you like I think. In patch version 1, b'abc'.translate(None, None) raises

[issue18966] Threads within multiprocessing Process terminate early

2016-07-13 Thread Eryk Sun
Eryk Sun added the comment: > Per Eryk's point about the difference in multiprocessing's behavior > when using spawn vs. fork, the explanation for why it's done that > way is also described in the DeveloperWorks article I mentioned above. Please spell this out for me. Why can't the "fork" and

[issue18966] Threads within multiprocessing Process terminate early

2016-07-13 Thread Tim Peters
Tim Peters added the comment: Devin, a primary point of `threading.py` is to provide a sane alternative to the cross-platform thread mess. None of these reports are about making it easier for threads to go away "by magic" when the process ends. It's the contrary: they're asking for

[issue18966] Threads within multiprocessing Process terminate early

2016-07-13 Thread Davin Potts
Davin Potts added the comment: It is a general rule that when a process terminates, it likewise terminates all its threads (unless a thread has been explicitly detached). How it goes about doing so is complicated. Remember that POSIX threads have no concept of parent/child among themselves

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-13 Thread John Hagen
John Hagen added the comment: The patch was reviewed and marked ready to commit. Could someone with commit privileges perform the final commit? Thanks. -- ___ Python tracker

[issue27506] make bytes/bytearray delete a keyword argument

2016-07-13 Thread Martin Panter
Martin Panter added the comment: Instead of allowing delete=None (which is not in the RST documentation), perhaps it is possible to change the doc string. I can’t remember the details, but I think Argument Clinic allows a virtual Python-level default, something like “object(py_default=b"") =

[issue25548] Show the address in the repr for class objects

2016-07-13 Thread Ned Deily
Changes by Ned Deily : -- priority: normal -> release blocker ___ Python tracker ___ ___

[issue18966] Threads within multiprocessing Process terminate early

2016-07-13 Thread Ned Deily
Changes by Ned Deily : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list mailing

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-13 Thread Ned Deily
Changes by Ned Deily : -- priority: normal -> release blocker ___ Python tracker ___ ___

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-07-13 Thread ppperry
ppperry added the comment: Ping -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-13 Thread Antti Haapala
Antti Haapala added the comment: Thanks Serhiy, I was writing my comment for a long time, and only now noticed that you'd already posted the patch. Indeed, it seems that not only is this the fastest method, it might also be the fastest string concatenation method in the history of Python. I

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-13 Thread Demur Rumed
Changes by Demur Rumed : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list

[issue27497] csv module: Add return value to DictWriter.writeheader

2016-07-13 Thread STINNER Victor
STINNER Victor added the comment: Oh. I missed the django recipe to implement "streaming csv". It uses an Echo object, its write() method returns its parameter. This recipe looks like an abuse of the API, but I understand that there is a need for a kind of "partial write": give control to I/O

[issue25548] Show the address in the repr for class objects

2016-07-13 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, let's roll it back. The reason it never was an issue for old-style classes is that they behaved like this from the start, so nobody wrote tests that depended on the predictability of repr(). But new-style classes have had this nice clean repr() since

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-13 Thread Antti Haapala
Antti Haapala added the comment: It seems Eric has done some special casing for strings already in FORMAT_VALUE. Here are the results from my computer after applying Demur's patch for concatenating *strings*. python3.6 -m timeit -s "x = 'a'" -- '"X is %s" % x' 100 loops, best of

[issue18966] Threads within multiprocessing Process terminate early

2016-07-13 Thread Eryk Sun
Eryk Sun added the comment: In 3.4+ it works correctly with the "spawn" start method. This uses multiprocessing.spawn.spawn_main, which exits the child via sys.exit(exitcode). "fork" and "forkserver" exit the child via os._exit(code), respectively in multiprocessing.popen_fork.Popen._launch

[issue25548] Show the address in the repr for class objects

2016-07-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 on rolling this back. It sounds like it hurt more than it would have helped. To satisfy my curiosity, can you post one of the tests that broke. It would be nice to see what kind of tests are depend the repr of the class. AFAICT, there was never an

[issue27497] csv module: Add return value to DictWriter.writeheader

2016-07-13 Thread R. David Murray
R. David Murray added the comment: It doesn't make sense when the return value is that provided by io.write. It does make sense in the context of the linked example (a psuedo-file object). However, it *is* an undocumented API, even if people are using it. --

[issue27497] csv module: Add return value to DictWriter.writeheader

2016-07-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: It is a bit irritating to have this small API inconsistency, but I'm a little wary of propagating this undocumented and untested behavior especially given Victor's concern about whether it makes any sense in this context. Skip, what do you think?

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch adds the BUILD_STRING opcode and speeds up PyObject_Format() in common cases. It makes f-strings the fastest method for simple formatting. $ ./python -m timeit -s "x = 2" -- 'f"X is {x}"' 100 loops, best of 3: 0.347 usec per loop

[issue18966] Threads within multiprocessing Process terminate early

2016-07-13 Thread Tim Peters
Tim Peters added the comment: This came up again today as bug 27508. In the absence of "fixing it", we should add docs to multiprocessing explaining the high-level consequences of skipping "normal" exit processing (BTW, I'm unclear on why it's skipped). I've certainly mixed threads with

[issue27508] process thread with implicit join is killed unexpectedly

2016-07-13 Thread Tim Peters
Tim Peters added the comment: Ah - good catch! I'm closing this as a duplicate of bug18966. The real mystery now is why the threads _don't_ terminate early under Windows 3.5.2 - heh. -- resolution: -> duplicate status: open -> closed superseder: -> Threads within multiprocessing

[issue27508] process thread with implicit join is killed unexpectedly

2016-07-13 Thread R. David Murray
R. David Murray added the comment: On my gentoo system it prints hi four times in 2.7, and 3.2 through 3.6. I suspect multiprocessing is killing threads, daemon or not, when the main process thread ends. I expect that's a feature, although I didn't find it documented. Ah, found the

[issue27508] process thread with implicit join is killed unexpectedly

2016-07-13 Thread Tim Peters
Tim Peters added the comment: Curious: under Python 2.7.11 on Windows, the threads also terminate early (they run "forever" - as intended - under 3.5.2). -- ___ Python tracker

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2016-07-13 Thread Daniel Moisset
Daniel Moisset added the comment: OK. Just to give an obvious example of a place where this would be useful for annotations is in the argument for the memoryview() builtin (currently declared with "# TODO arg can be any obj supporting the buffer protocol" in the standard library typesheds)

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet one case for comparison (with msg270095): $ ./python -m timeit -s "x = 2" -- 'f"X is {x!s}"' 100 loops, best of 3: 0.625 usec per loop Seems f'{x!s}' is the fastest way to stringify a value. Thus there is an opportunity to speed up default

[issue27495] Pretty printing sorting for set and frozenset instances

2016-07-13 Thread Danilo J. S. Bellini
Danilo J. S. Bellini added the comment: Wouldn't a fix for all standard collections be a fix for Python 3.5+, therefore another issue? http://bugs.python.org/issue23870 This issue is about sets/frozensets Python 3.2+, and I'm pretty sure it's backwards compatible, as I don't think any code

[issue27508] process thread with implicit join is killed unexpectedly

2016-07-13 Thread Tim Peters
Changes by Tim Peters : -- components: +Library (Lib) type: -> behavior ___ Python tracker ___

[issue27507] bytearray.extend lacks overflow check when increasing buffer

2016-07-13 Thread Xiang Zhang
Xiang Zhang added the comment: Sorry, after checking again, this is still needed but maybe `if (len == PY_SSIZE_T_MAX)` part is not necessary since the iterable's length should not be larger than PY_SSIZE_T_MAX. But keep it to avoid theoretically bug is not a bad idea. -- status:

[issue27508] process thread with implicit join is killed unexpectedly

2016-07-13 Thread Tim Peters
Tim Peters added the comment: Note: this started on stackoverflow: https://stackoverflow.com/questions/38356584/python-multiprocessing-threading-code-exits-early I may be missing something obvious, but the only explanation I could think of for the behavior seen on Ubuntu is that the threads

[issue27508] process thread with implicit join is killed unexpectedly

2016-07-13 Thread JA
New submission from JA: On Ubuntu 16.04 python '3.5.1+ (default, Mar 30 2016, 22:46:26) \n[GCC 5.3.1 20160330]' The following code prints "hi" 4 times: import multiprocessing import time import threading class dumb(threading.Thread): def __init__(self): super(dumb,

[issue27507] bytearray.extend lacks overflow check when increasing buffer

2016-07-13 Thread Xiang Zhang
Xiang Zhang added the comment: Ohh, sorry for the disturb. I made a mistake. This is not needed and now close it. -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue27507] bytearray.extend lacks overflow check when increasing buffer

2016-07-13 Thread Xiang Zhang
New submission from Xiang Zhang: As the title, bytearray.extend simply use `buf_size = len + (len >> 1) + 1;` to determine next *buf_size* when increasing buffer. But this can overflow in theory. So I suggest adding overflow check. -- components: Interpreter Core files:

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-13 Thread Demur Rumed
Changes by Demur Rumed : -- type: enhancement -> performance ___ Python tracker ___ ___

[issue27495] Pretty printing sorting for set and frozenset instances

2016-07-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since pprint() now supports all standard collections, I think it is worth to support them in saferepr() too. I have written an implementation and am finishing writing tests. -- ___ Python tracker

[issue27495] Pretty printing sorting for set and frozenset instances

2016-07-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for treating this as a bug fix. -- ___ Python tracker ___ ___

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-13 Thread Brett Cannon
Brett Cannon added the comment: So what I'm gathering is that Martin fixed a bug that accidentally introduced a new one in 3.5.2 (which Martin should not feel responsible for; this import stuff is all very subtle and people use every nuance of it). To me, the question is whether there is a

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2016-07-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Since collections.abc is the wrong place, I'll change the title of this to typing and see if any of the typing aficionados think it is sufficiently useful (they are deliberately focusing on common use cases first since the whole static typing endeavor is

[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-13 Thread R. David Murray
R. David Murray added the comment: There's actually programmatic way to generate a deprecation warning when the function is called (and then we'd want a test to make sure it gets generated). if you don't feel like working through that hopefully someone else will pick it up. If you want to

[issue27501] Create a collections.abc class that describes PEP 3118 buffer

2016-07-13 Thread Daniel Moisset
Daniel Moisset added the comment: Thanks for the feedback. Just for the context, I opened this issue also based on this email: http://permalink.gmane.org/gmane.comp.python.devel/156411 Probably there are two different discussions to have here: 1) Is the "Buffer" a useful ABC to have even if

[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-13 Thread Michael Lazar
Changes by Michael Lazar : Added file: http://bugs.python.org/file43706/mailcap_v3.patch ___ Python tracker ___

[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-13 Thread Michael Lazar
Michael Lazar added the comment: Whoops -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-13 Thread Demur Rumed
Demur Rumed added the comment: I'm not understanding your message. We don't call FORMAT_VALUE on constant strings in f"x is {x}" & FORMAT_VALUE doesn't take an argument. Are you saying in a hypothetical FORMAT_VALUE where BUILD_STRING takes a set of objects & applies formatting to them, thus

[issue27506] make bytes/bytearray delete a keyword argument

2016-07-13 Thread R. David Murray
R. David Murray added the comment: Ah, I was looking at the 2.7 docs. -- nosy: +r.david.murray title: make bytes/bytearray deletechars a keyword argument named delete -> make bytes/bytearray delete a keyword argument ___ Python tracker

[issue27506] make bytes/bytearray delete a keyword argument

2016-07-13 Thread Xiang Zhang
Xiang Zhang added the comment: Please review the new version. It makes two changes comparing with the last one. 1. It exposes Python parameter as "delete" (which the document always uses so I think it's the API) while still use "deletechars" (which I prefer as a C variable name) in C code.

[issue27490] ARM cross-compile: pgen built without $(CFLAGS) as $(LIBRARY) dependency

2016-07-13 Thread Thomas Perl
Thomas Perl added the comment: Adding "-mfloat-abi=hard" to LDFLAGS fixes the issue for me, and also allows $(BUILDPYTHON) to be built correctly in addition to $(PGEN). So I guess the resolution to this issue is "works for me" (with setting CC or LDFLAGS properly for cross-compilation being

[issue27501] Create a collections.abc class that describes PEP 3118 buffer

2016-07-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll defer to typing gurus as to whether something like this might make sense in typing.py, but it doesn't make much sense as a collections.abc without an API exposed in pure python and without useful mixin methods. By way of comparison, consider that the

[issue25548] Show the address in the repr for class objects

2016-07-13 Thread Guido van Rossum
Guido van Rossum added the comment: Doing it only for user-defined types would still break my tests. -- ___ Python tracker ___

[issue25548] Show the address in the repr for class objects

2016-07-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Would there be a way to confine this to just heap types? The user defined classes are where there is the most benefit. For the built-in types, it just seems to add noise. -- ___ Python tracker

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-13 Thread Antti Haapala
Antti Haapala added the comment: Yet the test cases just prove what is so expensive there: name lookups (global name `str`; looking up `join` on a string instance); building a tuple (for function arguments) is expensive as well. Of course `__format__` will be costly as well as it is not a

[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2016-07-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: I confirm that, on 3.6 and after the changesets that fixed issue 22359, pgen is always cross-compiled whatever the timestamps and that pgen is not run on a cross-build for Android. So I think it should work as well now for Trevor with v2.7.12. --

[issue27506] make bytes/bytearray deletechars a keyword argument named delete

2016-07-13 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, David, that may be not quite right. Users only reading the doc never know it's deletechars not delete. The doc is always delete, though conflicting with __doc__. >>> print(bytes.translate.__doc__) B.translate(table[, deletechars]) -> bytes ... I

[issue27490] ARM cross-compile: pgen built without $(CFLAGS) as $(LIBRARY) dependency

2016-07-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: > the underlying problem is that pgen gets built in cases where it shouldn't This statement does not take into account the following note of your initial post: "note that the same $(CFLAGS) needs to be added to the rule for $(BUILDPYTHON) if one wants to

[issue27366] PEP487: Simpler customization of class creation

2016-07-13 Thread Martin Teichmann
Changes by Martin Teichmann : Removed file: http://bugs.python.org/file43506/pep487.patch ___ Python tracker ___

[issue27498] Regression in repr() of class object

2016-07-13 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker ___ ___ Python-bugs-list

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-13 Thread Demur Rumed
Demur Rumed added the comment: fstrtup2.patch is a bit more of an involved optimization for when we are joining 2 strings. Instead it emits BINARY_ADD. This may be considered too 'niche' since it only triggers when the substitution occurs at the start or end of a string & there is only one

[issue27506] make bytes/bytearray deletechars a keyword argument named delete

2016-07-13 Thread R. David Murray
Changes by R. David Murray : -- title: bytes/bytearray delete acts as keyword argument -> make bytes/bytearray deletechars a keyword argument named delete ___ Python tracker

[issue22125] Cure signedness warnings introduced by #22003

2016-07-13 Thread Berker Peksag
Berker Peksag added the comment: Since 2e29d54843a4 this is no longer needed. Thanks for the patches! -- nosy: +berker.peksag resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-13 Thread R. David Murray
R. David Murray added the comment: Looks like you didn't attach the new patch. -- ___ Python tracker ___ ___

[issue27504] Missing assertion methods in unittest documentation

2016-07-13 Thread R. David Murray
R. David Murray added the comment: No problem. Personally I'd like to see a table of all of them at the top; however, that wasn't the decision that was made in issue 9796 when the tables were added. -- ___ Python tracker

[issue27490] ARM cross-compile: pgen built without $(CFLAGS) as $(LIBRARY) dependency

2016-07-13 Thread Thomas Perl
Thomas Perl added the comment: Yes setting "CC" would fix the problem, but i guess the CFLAGS issue was just the original symptom (and my first reaction to fixing it), whereas the underlying problem is that pgen gets built in cases where it shouldn't be built at all. The solution with "ifeq"

[issue27506] bytes/bytearray delete acts as keyword argument

2016-07-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka stage: -> patch review ___ Python tracker ___

[issue27506] bytes/bytearray delete acts as keyword argument

2016-07-13 Thread Xiang Zhang
New submission from Xiang Zhang: Write a patch to make bytes/bytearray.translate's delete argument support acting as keyword arguments. This won't break any backwards compatibility and make the method more flexible to use. Besides, in the C code level, it stops using argument clinic's legacy

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-13 Thread Nick Coghlan
Nick Coghlan added the comment: Sorry, I got the levels slightly confused there - a bit more experimentation shows it isn't the parent package that needs a __spec__ attribute, but only the package being executed. # Parent package needs __path__ rather than __spec__ >>>

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-13 Thread Nick Coghlan
Nick Coghlan added the comment: Aye, the report is definitely appreciated - the interaction between "__main__" execution and normal module imports has always been tricky, so it's always good to be informed of new problems folks encounter. As an example illustrating the underlying problem here

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-13 Thread Wolfgang Maier
Wolfgang Maier added the comment: @Martin and regarding Python3.3: Right, you cannot do the replacement when running the module as __main__. For my use case that's not required though so in the module I can just do: if __name__ == '__main__': print('running module as a script') else:

[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-13 Thread Michael Lazar
Michael Lazar added the comment: That works for me, patch updated to match your suggestion. So to recap, the proposed fix implements the following changes to the api: getcaps() The returned dict now has an additional `lineno` field. There's a *slim* chance that this could break behavior

[issue27492] Enhance bytearray_repr with bytes_repr's logic

2016-07-13 Thread Xiang Zhang
Xiang Zhang added the comment: Hi, Serhiy. I've tried one version factoring the common parts out. I make them one function but it seems not very elegant. I also think about passing the object and use it to get the type and then determine how to get the string, what the pre/postfix are, and