[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-02-15 Thread Michel Desmoulin
Michel Desmoulin added the comment: We fixed our bug days ago, but I would have expected [*gen] to have triggered an exception before it even got to gather(). The real code was something like: >>> l = (ensure_awaitable(callable_obj) for callable_obj in callable_list) >>> gather(*l)

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-15 Thread STINNER Victor
STINNER Victor added the comment: > How does it parse this date: > 2016-02-15T11:59:46.16588638674+09:00 Mathieu Dupuy added the comment: > discarding the microseconds digits after the 6th. Hum, you should use the same rounding method than datetime.datetime.fromtimestamp(): ROUND_HALF_UP, as

[issue26363] builtins propagation is misleading described in exec and eval documentation

2016-02-15 Thread Xavier Combelle
Changes by Xavier Combelle : -- assignee: docs@python components: Documentation nosy: docs@python, xcombelle priority: normal severity: normal status: open title: builtins propagation is misleading described in exec and eval documentation

[issue26039] More flexibility in zipfile interface

2016-02-15 Thread Thomas Kluyver
Thomas Kluyver added the comment: Hi Serhiy, any more comments on the zf.open() patch? -- ___ Python tracker ___

[issue26363] __builtins__ propagation is misleading described in exec and eval documentation

2016-02-15 Thread Xavier Combelle
New submission from Xavier Combelle: According to my experiment in code, the current behavior of python3.5 is different that the document says. If I understand well the purpose of this behavior is to propagate the __builtins__ global constant if globals has not one. In

[issue26363] __builtins__ propagation is misleading described in exec and eval documentation

2016-02-15 Thread Julien
Changes by Julien : -- nosy: +sizeof ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26364] pip uses colour in messages that does not work on white terminals

2016-02-15 Thread Barry Scott
New submission from Barry Scott: pip3 (3.5 on Mac OS X) is outputting a message in yellow that I can barely see on a white background terminal. "You are using pip version 7.1.2, however version 8.0.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command." I

[issue21145] Add the @cached_property decorator

2016-02-15 Thread Omer Katz
Omer Katz added the comment: Can we make this happen for 3.6? -- versions: +Python 3.6 -Python 3.5 ___ Python tracker ___

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-15 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: > Hum, you should use the same rounding method than datetime.datetime.fromtimestamp(): ROUND_HALF_UP, as round(). In practice, you can for example pass a floating point number as microseconds to datetime.datetime constructor. Unfortunately, you're mistaking with

[issue26365] ntpath.py Error in Windows

2016-02-15 Thread Ben Kummer
New submission from Ben Kummer: ntpath.py throws an error in Python2.7.11 Windows Code snippet: product_dir ="/zope/eggs43" my_tuple= os.path.split(product_dir)[:-1] roduct_prefix = os.path.join(my_tuple ) The same code works in python 2.7.11 under Linux Traceback:

[issue26365] ntpath.py Error in Windows

2016-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The first argument of os.path.join() (as well as all other) in Python 2.7 must be str or unicode. You pass a tuple. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed

[issue21145] Add the @cached_property decorator

2016-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be. If somebody provide a patch. -- ___ Python tracker ___ ___

[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate

2016-02-15 Thread Tony R.
New submission from Tony R.: In the documentation, I noticed several uses of ``.. versionchanged::`` that described things which had been added. I love Python, and its documentation, and I wanted to contribute. So, I figured a low-risk contribution would be to change ``..

[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate

2016-02-15 Thread Georg Brandl
Georg Brandl added the comment: Hi Tony, thanks for the patch, and for the will to contribute. I'm not sure this patch should be merged though; the original intention was to use "versionadded" where the API item is completely new. So "The parameter x was added" in a function is using

[issue26364] pip uses colour in messages that does not work on white terminals

2016-02-15 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, but this needs to be reported to the pip issue tracker: https://github.com/pypa/pip/issues For the record, I found a similar report at https://github.com/pypa/pip/issues/2449 -- nosy: +berker.peksag resolution: -> third party

[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate

2016-02-15 Thread Ezio Melotti
Ezio Melotti added the comment: I agree with Georg. I also went to double-check what the devguide says, and at https://docs.python.org/devguide/documenting.html#paragraph-level-markup it shows an example of versionadded for a parameter. If a versionchanged should be used instead, maybe the

[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-15 Thread Aviv Palivoda
Aviv Palivoda added the comment: I changed the test to just check that shutdown_request is called. Hope this is more clear then the previous test. -- Added file: http://bugs.python.org/file41930/socketserver-shutdown-if-verify-false4.patch ___

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-15 Thread STINNER Victor
STINNER Victor added the comment: > No regex available at all in CPython? It's not really convenient to use the re module in C. > Otherwise, yeah, if I have to, I can do it with strptime. I suggest to parse directly the string with C code, since the format looks quite simple (numbers and a

[issue21145] Add the @cached_property decorator

2016-02-15 Thread STINNER Victor
STINNER Victor added the comment: I like the idea of an helper to build a property on-demand, but I dislike the TTL idea, it seems too specific. If you need TTL, implement your own decorator, or use a regular property and implement your own logic there. --

[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate

2016-02-15 Thread Georg Brandl
Georg Brandl added the comment: The devguide should be updated, yes. And probably someone should look at the remaining versionadded's... -- ___ Python tracker

[issue21145] Add the @cached_property decorator

2016-02-15 Thread Omer Katz
Omer Katz added the comment: Most implementations these days support TTL because they require it. The whole point is to remove the need to reimplement such basic functionality over and over. ‫בתאריך יום ב׳, 15 בפבר׳ 2016 ב-18:33 מאת ‪STINNER Victor‬‏ <‪ rep...@bugs.python.org‬‏>:‬ > > STINNER

[issue21145] Add the @cached_property decorator

2016-02-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: The TTL idea is completely outlandish in a general-purpose library. Let's keep things simple and not try to build a kitchen-sink decorator. -- ___ Python tracker

[issue21145] Add the @cached_property decorator

2016-02-15 Thread Omer Katz
Omer Katz added the comment: In that case, most of the users won't use the standard library @cached_property anyway since they require it. On Mon, Feb 15, 2016, 19:51 Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > The TTL idea is completely outlandish

[issue21145] Add the @cached_property decorator

2016-02-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm sure many people don't need a TTL on a cached property. Please stop arguing about that. -- ___ Python tracker ___

[issue26357] asyncio.wait loses coroutine return value

2016-02-15 Thread André Caron
André Caron added the comment: Hi Guido, Thanks for the quick reply :-) AFAICT, there seem to be three possible directions regarding this issue -- for both wait() and as_completed(): 1) remove the need for ensure_future(): make the membership test succeed and allow multiple await

[issue21145] Add the @cached_property decorator

2016-02-15 Thread STINNER Victor
STINNER Victor added the comment: "Most implementations these days support TTL because they require it." I used this pattern a lot in my old Hachoir project, but I never needed the TTL thing. In my case, data come from the disk and are never invalidated. Example with the description property:

[issue26357] asyncio.wait loses coroutine return value

2016-02-15 Thread Yury Selivanov
Yury Selivanov added the comment: TBH I never ever needed to do membership tests on (done, failed) result of asyncio.wait. If you need to do such tests - just wrap your coroutines into tasks manually. I honestly don't understand what's the problem and why we need to change anything in

[issue26354] re.I does not work as expected

2016-02-15 Thread Magesh Kumar
Magesh Kumar added the comment: Thanks for the inputs, It would be of great help, if someone could help me in explaining the below output : >>> a 'ype="str">falseDefaultMulticastClient>> b = re.sub('\', '', a, re.I)

[issue26354] re.I does not work as expected

2016-02-15 Thread Matthew Barnett
Matthew Barnett added the comment: The pattern '\', which is the same as '', matches the string '', and that is replaced with ''. -- ___ Python tracker

[issue26354] re.I does not work as expected

2016-02-15 Thread Magesh Kumar
Magesh Kumar added the comment: :-) Thanks a lot Matthew for the inputs. If we compare the first example () and the example, I am using re.I as the third element. But for the example, still I am not to get the substitution happening correctly. Could you pls, let me know the reason of

[issue26354] re.I does not work as expected

2016-02-15 Thread Magesh Kumar
Magesh Kumar added the comment: Corrected Message : If we compare the first example () and the example, I am using re.I as the third element. But for the example, still I am able to get the substitution happening correctly. Could you pls, let me know the reason of change in behaviour.

[issue14597] Cannot unload dll in ctypes until script exits

2016-02-15 Thread Mark Mikofski
Mark Mikofski added the comment: I think I have this issue even after interpreter exits. My setup.py creates a .dll then later loads the dll for testing using ctypes. Subsequent runs of setup.py that would force rebuilding the .dll attempt to delete the old dll first if it exists, but I get

[issue26224] Add "version added" for documentation of asyncio.timeout for documentation of python 3.4, 3.5, 3.6

2016-02-15 Thread Martin Panter
Changes by Martin Panter : -- stage: -> patch review ___ Python tracker ___ ___

[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate

2016-02-15 Thread Martin Panter
Martin Panter added the comment: If you changed existing versionadded notices to versionchanged in similar cases, how would the size of the patch compare? This problem was also recently brought up at . My

[issue26354] re.I does not work as expected

2016-02-15 Thread Matthew Barnett
Matthew Barnett added the comment: The 3rd argument is the count (the maximum number of replacements, although 0 means no limit, not no replacements). You're passing in the flag re.I instead. re.I happens to have the numeric value 2, so you're telling it to do no more than 2 replacements.

[issue26359] CPython build options for out-of-the box performance

2016-02-15 Thread SilentGhost
Changes by SilentGhost : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list

[issue26354] re.I does not work as expected

2016-02-15 Thread Magesh Kumar
Magesh Kumar added the comment: Thanks Matthew. :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue20169] random module doc page has broken links

2016-02-15 Thread Ori Avtalion
Changes by Ori Avtalion : -- nosy: +salty-horse ___ Python tracker ___ ___

[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-02-15 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: I was looking at this issue, and actually the problem is on a different level. The function the patch takes place is "send_errror". As its name suggests, it's only used to send error (I checked in the code : it's only used to send 4XX/5XX reply). I'm sure none

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-15 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: > I suggest to parse directly the string with C code, since the format looks > quite simple (numbers and a few separators). But some of them are optional. And I would really like to mimic the same implementation logic in C. Now I think the python version is

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-15 Thread Manuel Jacob
New submission from Manuel Jacob: Python 3.6.0a0 (default:6c6f7dff597b, Feb 16 2016, 01:24:51) [GCC 5.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import importlib >>> importlib.__import__('array', globals(), locals(), level=1) >>>

[issue26368] grammatical error in documentation

2016-02-15 Thread Ryan Stuart
New submission from Ryan Stuart: The note for 18.5.5.1. Stream functions is missing a word. It should read "Note The top-level functions in this module are meant **as** convenience wrappers only; there’s really nothing special there, and if they don’t do exactly what you want, feel free to

[issue26368] grammatical error in documentation

2016-02-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8ee91cb2e2a4 by Ned Deily in branch '3.5': Issue #26368: fix typo in asynchio stream doc, reported by Ryan Stuart. https://hg.python.org/cpython/rev/8ee91cb2e2a4 New changeset 12502327d2c0 by Ned Deily in branch 'default': Issue #26368: fix typo in

[issue26368] grammatical error in asyncio stream documentation

2016-02-15 Thread Ned Deily
Ned Deily added the comment: Thanks for the report, Ryan! -- nosy: +ned.deily resolution: -> fixed stage: -> resolved status: open -> closed title: grammatical error in documentation -> grammatical error in asyncio stream documentation versions: -Python 3.4

[issue22062] Fix pathlib.Path.(r)glob doc glitches.

2016-02-15 Thread Mike Short
Changes by Mike Short : -- keywords: +patch Added file: http://bugs.python.org/file41932/pathlib.patch ___ Python tracker ___

[issue22062] Fix pathlib.Path.(r)glob doc glitches.

2016-02-15 Thread Mike Short
Changes by Mike Short : Added file: http://bugs.python.org/file41933/pathlib.py.patch ___ Python tracker ___

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-15 Thread Martin Panter
Martin Panter added the comment: It looks to me like you copied a lot of code, doc strings, tests, etc from and . I wouldn’t call it trivial. There is a BSD

[issue20169] random module doc page has broken links

2016-02-15 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-15 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: The real question is : should we accept whatever iso8601 format is common to be found on the internet, or just be able to consume back the string issued by isoformat. From that results the answers to the questions you're asking: don't accept single digits,

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-15 Thread Martin Panter
Martin Panter added the comment: The regular expression r"\d" matches any digit in Unicode I think, not just ASCII digits 0-9. Perhaps we should limit it to ASCII digits. Or is it intended to allow non-ASCII digits like in "२०१६-०२-१६ ०१:२१:१४"? --

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-15 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Oh my god you're right. Thanks there is the re.ASCII flag. 2016-02-16 15:07 GMT+10:30 Martin Panter : > > Martin Panter added the comment: > > The regular expression r"\d" matches any digit in Unicode I think, not > just ASCII digits

[issue26362] Approved API for creating a temporary file path

2016-02-15 Thread Ben Finney
Ben Finney added the comment: It has been pointed out that `tempfile.mktemp` does in fact access the filesystem, to query whether the entry exists. So this request would be best met by exposing a simple “get a new return value from the `tempfile._RandomNameSequence` instance” function.

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-15 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: simpler version using a simpler, stricter regex -- Added file: http://bugs.python.org/file41934/simplerfromisoformat.patch ___ Python tracker

[issue26309] socketserver.BaseServer._handle_request_noblock() doesn't shutdown request if verify_request is False

2016-02-15 Thread Martin Panter
Martin Panter added the comment: Yes this patch looks pretty good, thanks -- title: socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False -> socketserver.BaseServer._handle_request_noblock() doesn't shutdown request if verify_request is

[issue26362] Approved API for creating a temporary file path

2016-02-15 Thread Ben Finney
Ben Finney added the comment: An example:: import io import tempfile names = tempfile._get_candidate_names() def test_frobnicates_configured_spungfile(): """ ‘foo’ should frobnicate the configured spungfile. """ fake_file_path =

[issue20169] random module doc page has broken links

2016-02-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +georg.brandl priority: low -> normal versions: +Python 3.6 -Python 3.4 ___ Python tracker

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-15 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: (OK, I said a stupidity: datetime's strptime handle microseconds. But time's one doesn't) -- ___ Python tracker ___

[issue23718] strptime() can produce invalid date with negative year day

2016-02-15 Thread Tamás Bence Gedai
Tamás Bence Gedai added the comment: Actually there are already test cases, but they test for the wrong behaviour. The very same example is tested there, but the test gives the expected result, so tm_yday = -3. My implementation returns 362, which looks more reasonable. So currently with my