[issue19583] time.strftime fails to use %:z time formatter of the underlying C library

2013-11-14 Thread Mathieu Dupuy
New submission from Mathieu Dupuy: function time.strftime fails to use '%:z' time formatter of the underlying library. Passing it does not format time accordingly but returns it as if it was a non-formatting string. Simple reproduction, on Linux: $ date +%:z +01:00 $ python -c 'import time

[issue19583] time.strftime fails to use %:z time formatter of the underlying C library

2013-11-14 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: But in fact date was not the right reference to look at, C strftime has exactly the same behaviour than python, so I'm marking this bug as invalid and closing it. -- resolution: - invalid status: open - closed

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2014-06-13 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Could we at least do something cleaner that let the interpreter raise an UnboundLocalError ? Maybe something like NotImplemented ? -- nosy: +deronnax ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2014-09-25 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: and here for the 2.7 branch -- Added file: http://bugs.python.org/file36725/md5-sess_not_implem_27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2202

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2014-09-25 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: here is the patch, for the trunk -- versions: -Python 3.4 Added file: http://bugs.python.org/file36724/md5-sess_not_implem_cur.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2202

[issue22496] urllib2 fails against IIS (urllib2 can't parse 401 reply www-authenticate headers)

2014-09-25 Thread Mathieu Dupuy
New submission from Mathieu Dupuy: When connecting to a IIS server, it replies that: Unauthorized Server: Microsoft-IIS/7.5 WWW-Authenticate: Digest qop=auth,algorithm=MD5-sess,nonce=+Upgraded

[issue22496] urllib2 fails against IIS (urllib2 can't parse 401 reply www-authenticate headers)

2014-09-25 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: I filled the bug in a hurry. You have to read when connecting to a IIS for a protected resource and replying with 401 for an authentication challenge, it replies this [...] -- ___ Python tracker rep

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2014-09-30 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: But I think md5-sess should really be integrated. It's a standard mechanism described by a RFC (https://www.ietf.org/rfc/rfc2617.txt), and people need it, however insecure it may be (aren't other method (md5) insecure too

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

2016-06-06 Thread Mathieu Dupuy
Changes by Mathieu Dupuy <deron...@gmail.com>: -- nosy: -deronnax ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25738> ___ _

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

2016-02-11 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: So, shall we include it ? Otherwise, py8601 (https://bitbucket.org/micktwomey/pyiso8601/) looks pretty popular and well maintained (various committers, started in 2012, last commit in 2016). I think we should hurry, that's a great shame it has been while Python

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-02-28 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: first draft -- Added file: http://bugs.python.org/file42045/digest_md5sess_unittest.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-02-28 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: I can see in the tests (test_urllib2_localnet.py) that Digest auth is tested only through "ProxyAuthTests". Is that sufficient ? Isn't it a bug ? If no, should I add the test in that class ? -- ___ Pyth

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

2016-02-28 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: I know. Martin was suggesting to defer the processing to an actual Python implementation, hence my answer. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

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

2016-02-28 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: What I really want is to use regex in the C part as I did for the python one. It's the best approach and by very far. I need to figure out how to use regex in CPython internals. If I defer the actual processing to the Python part, what's the point of doing a C

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

2016-02-14 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: I don't know. The taken code is really little, modified, and is nothing much that an implementation you had seen a while ago, and recoded by memory not remembering where you saw it in the first place. Do you think that's really an issue

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

2016-02-14 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: discarding the microseconds digits after the 6th. 2016-02-15 13:30 GMT+10:30 karl <rep...@bugs.python.org>: > > karl added the comment: > > About > > > Actually, I realized that the best implementation of parsing rfc 3339 > > is

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

2016-02-14 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: slightly improved + addresses issues stated here : https://bugs.python.org/review/15873/diff/16581/Lib/datetime.py#newcode1418Lib/datetime.py:1418 -- Added file: http://bugs.python.org/file41926/fromisoformat3.patch

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

[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

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

[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 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 <rep...@bugs.python.org>: > > Martin Panter added the comment: > > The regular expression r"\d" matches any digit in Unicode I think,

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

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

2016-02-16 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: OK, I know I post a lot, but this one should be the good one: * recoded from scratch. Apart the algorithm, nothing come from Django anymore. * help me fill the docstring, I'm not inspired * datetime has few tests since it use the implementation of time

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

2016-02-17 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Crap, I just checked spams today and almost all mails of the reviewboard landed in spams ! So I made a new patch addressing all concerns: * regex moved closer to where they're used * regex globals start with an _ * case insensitive regex + handling(already

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

2016-02-17 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Oh, my mistake ; I though send_error was to be used internally only, but it's actually a documented public method, that does not enforce to only use "actual" HTTP error code (I wonder what's the point of calling send_error with a non-error s

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-02-17 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: up -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2202> ___ ___ Python-bugs-list mailing list

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

2016-02-17 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: New patch with all your concerns addressed (martin.panther+ silentghost) EXCEPT the single dispatch dictionary thing. -- Added file: http://bugs.python.org/file41945/fromisoformat_new3.patch ___ Python tracker <

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

2016-02-17 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: SilentGhost: the dictionary single dispatch thing attached (apply on top of the last, fromisoformat_new3). I mind the performance penalty for date-only parsing users, but the code is definitively shorter and more elegant. But we have a major problem: tests

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-02-18 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: python current -- Added file: http://bugs.python.org/file41950/md5-sess_not_implem_cur_v2.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-02-18 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: python 2.7 -- Added file: http://bugs.python.org/file41949/md5-sess_not_implem_27_v2.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/

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

2016-02-18 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: crap, here is the attachment. Yeah, but I really would like to use regex in the C version (unless you strongly disadvise), so we will have the same logic and the same problem. And I never made a patch for the C interpreter itself, so the C equivalent

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

2016-02-14 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: (slightly improved version, better use of timedelta) -- Added file: http://bugs.python.org/file41923/fromisoformat2.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

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

2016-02-14 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Here is the PoC with code taken from django.utils.parse_datetime and adapted for the datetime module (I didn't ask for their agreement yet). Of course tests pass. For me it's the most elegant solution. (I think date and time also need their "fromisotime

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

2016-02-14 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: #12006 will unfortunately of no use for this one. Actually, I realized that the best implementation of parsing rfc 3339 is in django dateparse utils. To me it's the finest, the most elegant, and no other one can claim to be more robust since it's probably

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-03-08 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Much better indeed. Thanks. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2202> ___ ___ Pyth

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-03-03 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: I'm waiting for reviews. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2202> ___ ___ Pyth

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

2016-07-19 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: because it limits itself to only support the RFC 3339 subset, as explained in the begining of the discussion. 2016-07-19 16:07 GMT+02:00 Anders Hovmöller <rep...@bugs.python.org>: > > Anders Hovmöller added the comment: > > The tests attached t

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

2016-08-05 Thread Mathieu Dupuy
Changes by Mathieu Dupuy <deron...@gmail.com>: Added file: http://bugs.python.org/file44016/fromisoformat_strptimesingledispatch.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

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

2016-08-05 Thread Mathieu Dupuy
Changes by Mathieu Dupuy <deron...@gmail.com>: Added file: http://bugs.python.org/file44015/fromisoformat_regexinclasses.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

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

2016-08-05 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: I'm back on the issue. I'm currently stuck on the design. We need to store the regexes somewhere, and that's what causes problem : I can't really find a good place to store them. We basically have two possible designs : * single dispatch kind, class-type

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

2016-08-05 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: updated version with SilentGhost's concerns addressed. -- Added file: http://bugs.python.org/file44019/fromisoformat_regexinclasses2.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue20004] csv.DictReader classic class has a property with setter

2016-08-08 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Yeah, it turned out I was actually browsing Python 2.7 sources. My bad. 2016-08-08 16:39 GMT+02:00 R. David Murray <rep...@bugs.python.org>: > > R. David Murray added the comment: > > I don't believe it was ever committed to

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

2016-07-02 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Hi. I'm back, and willing to move forward on this issue. With the new code layout, the compiled regexes now lay in datetime classes as class attributes. Will it be possible to import date, time and datetime from datetime.py in _datetime.c without a problem

[issue20004] csv.DictReader classic class has a property with setter

2016-08-05 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: The comment is still present in python 3 sources at the moment. Shouldn't we remove it in python 3 ? -- nosy: +deronnax ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29690] no %z directive for strptime in python2, doc says nothing about it

2017-03-01 Thread Mathieu Dupuy
New submission from Mathieu Dupuy: ➜ ~ cat dt.py from datetime import * dt = datetime.strptime('+1720', '%z') print(dt) ➜ ~ python2 dt.py Traceback (most recent call last): File "dt.py", line 2, in dt = datetime.strptime('+1720', '%z') File "/usr/lib/python2.7/_str

[issue29690] no %z directive for strptime in python2, doc says nothing about it

2017-03-05 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Neither documentation is clear on whether each of those flags are available for strptime too. A precision should be added on a flag if it's not available for strptime. What do you think ? -- ___ Python tracker <

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

2017-12-04 Thread Mathieu Dupuy
Mathieu Dupuy <deron...@gmail.com> added the comment: I'm right now available again to work on this issue. I'll submit a pull request within a week with all issues addressed Le 4 déc. 2017 11:45 PM, "Alexander Belopolsky" <rep...@bugs.python.org> a écrit : &g

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

2017-12-13 Thread Mathieu Dupuy
Mathieu Dupuy <deron...@gmail.com> added the comment: I finally released my work. It looks like Paul's work is more comprehensive, but if you want to pick one thing or two in mine, feel free. -- ___ Python tracker <rep...@bugs.python.or

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

2017-12-29 Thread Mathieu Dupuy
Mathieu Dupuy <deron...@gmail.com> added the comment: maybe it's worth adding an entry in python 3.7 "what's new" ? I think it was a very long awaited issue. The opposite of isoformat() is a very frequent question from python newcomers -- __

[issue35255] delete "How do I extract the downloaded documentation" section in Windows FAQ

2018-11-15 Thread Mathieu Dupuy
Change by Mathieu Dupuy : -- assignee: -> docs@python components: +Documentation nosy: +docs@python type: -> enhancement ___ Python tracker <https://bugs.python.org/i

[issue35255] delete "How do I extract the downloaded documentation" section in Windows FAQ

2018-11-15 Thread Mathieu Dupuy
New submission from Mathieu Dupuy : I think it's been a long time since Windows/IE no longer mess up with file extensions, so long I can't recall anymore. I just tried on a Windows 7 + IE 11 (released in 2013) to download the .tar.bz2 archive from docs.python.org and it worked alright

[issue35255] delete "How do I extract the downloaded documentation" section in Windows FAQ

2018-11-15 Thread Mathieu Dupuy
Change by Mathieu Dupuy : -- pull_requests: +9802 ___ Python tracker <https://bugs.python.org/issue35255> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35220] delete "how do I emulate os.kill" section in Windows FAQ

2018-11-12 Thread Mathieu Dupuy
New submission from Mathieu Dupuy : That section is a tip on how to kill process on Windows for Python prior to 2.7 and 3.2. 3.1 end of support was April 2012 and 2.6 was October 2013, so that hasn't been needed for supported versions of Python for more than 5 years. Beside not being needed

[issue22496] urllib2 fails against IIS (urllib2 can't parse 401 reply www-authenticate headers)

2018-12-01 Thread Mathieu Dupuy
Change by Mathieu Dupuy : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue22496> ___ ___

[issue22496] urllib2 fails against IIS (urllib2 can't parse 401 reply www-authenticate headers)

2018-11-23 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: A lot of time has passed and things have changed significantly. We now live in a mostly python3-world (which doesn't have the bug) and Python2 has less than two years before beeing put to sleep. If nobody opposes, I offer to close this issue that I opened

[issue35220] delete "how do I emulate os.kill" section in Windows FAQ

2018-11-23 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: My PR has been merged, thanks -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or