[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>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker 
<https://bugs.python.org/issue22496>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.org/issue35220>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue35255>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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


To me, that entry makes Python looks bad ("the archive format we use does not 
work correctly on the most common, main desktop platform"), the problem seems 
to not exist anymore, and IMHO, is not really Python related.

I think that entry should be removed.

--
messages: 329947
nosy: deronnax
priority: normal
severity: normal
status: open
title: delete "How do I extract the downloaded documentation" section in 
Windows FAQ

___
Python tracker 
<https://bugs.python.org/issue35255>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35248] RawArray causes FileNotFoundError at cleanup

2018-11-14 Thread Mathieu Lamarre


Mathieu Lamarre  added the comment:

To repro, the temp directory returned by tempfile must be a network mount to 
reproduce this error. I have this on server with minimal disk space in /home 
and TMPDIR points to CIFS mounted volume. So maybe can only be reproduced if 
shutils operations on the temp dir are slow (or buggy). 

We have been using a network temp dir in a large project and RawArray is the 
only object giving us error so far. Maybe the error could be ignored, if it's 
only dual delete issue.

--

___
Python tracker 
<https://bugs.python.org/issue35248>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35248] RawArray causes FileNotFoundError at cleanup

2018-11-14 Thread Mathieu Lamarre


New submission from Mathieu Lamarre :

Running:

from multiprocessing.sharedctypes import RawArray
from ctypes import c_uint32
if __name__ == '__main__':
shared_array = RawArray(c_uint32, 1500)

Causes:
Traceback (most recent call last):
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/multiprocessing/util.py", 
line 262, in _run_finalizers
finalizer()
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/multiprocessing/util.py", 
line 186, in __call__
res = self._callback(*self._args, **self._kwargs)
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/shutil.py", line 480, in 
rmtree
_rmtree_safe_fd(fd, path, onerror)
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/shutil.py", line 438, in 
_rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/shutil.py", line 436, in 
_rmtree_safe_fd
os.unlink(name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'pym-10314-v8aznmmb'


Python 3.6.6 |Anaconda, Inc.| (default, Oct  9 2018, 12:34:16)
[GCC 7.3.0] on linux

--

___
Python tracker 
<https://bugs.python.org/issue35248>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35248] RawArray causes FileNotFoundError at cleanup

2018-11-14 Thread Mathieu Lamarre


Change by Mathieu Lamarre :


--
components: Library (Lib)
nosy: Mathieu Lamarre
priority: normal
severity: normal
status: open
title: RawArray causes FileNotFoundError at cleanup
type: behavior
versions: Python 3.6

___
Python tracker 
<https://bugs.python.org/issue35248>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 anymore for a long time, when I read it with the eyes of a Python 
profane, it makes Python looks bad, like a language from the pasts with warts 
you need to circumvent.
Let's delete that.

--
assignee: docs@python
components: Documentation
messages: 329751
nosy: deronnax, docs@python
priority: normal
pull_requests: 9750
severity: normal
status: open
title: delete "how do I emulate os.kill" section in Windows FAQ
type: enhancement
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue35220>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.org>
<https://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

>
> Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
>
> The better is the enemy of the good here.  Given the history of this
> issue, I would rather accept a well documented restrictive parser than wait
> for a more general code to be written.  Note that we can always relax the
> parsing rules in the future.
>
> --
>
> ___
> Python tracker <rep...@bugs.python.org>
> <https://bugs.python.org/issue15873>
> ___
>

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27318] Add support for symlinks to zipfile

2017-06-02 Thread Mathieu Bridon

Mathieu Bridon added the comment:

Do note that extracting a zipfile with symlinks might lead to unexpected 
results, for example if the path pointed to is outside of the extract dir.

Maybe the behaviour introduced in this patch should not be the default, but 
instead `extract` and `extractall` could take a new flag `preserve_symlinks` 
which would default to False? (to keep the same default as today)

--
nosy: +bochecha

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27318>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: SSL certificate of a server on Windows

2017-05-24 Thread COPIN Mathieu.
Le mardi 23 mai 2017 19:10:11 UTC+2, Irmen de Jong a écrit :
> On 23-5-2017 10:19, COPIN Mathieu. wrote:
> > Hi, 
> > 
> > I want to get a server certificate from the host-name.
> > 
> > I know I could do something like :
> >> call(openssl, s_client, -showcerts, -connect, hostname:port)
> > 
> > 
> > But the thing is to do it without openssl because I want to run the script 
> > on Windows.
> > 
> > Any suggestions ?
> > Mathieu
> > 
> 
> I guess you mean: without calling "openssl.exe"
> 
> 
> import ssl
> cert = sll.get_server_certificate(("www.google.com", 443))
> 
> See
> https://docs.python.org/3.6/library/ssl.html#ssl.get_server_certificate
> 
> 
> 
> Irmen

That's what I neeeded, thank you !
-- 
https://mail.python.org/mailman/listinfo/python-list


SSL certificate of a server on Windows

2017-05-23 Thread COPIN Mathieu.
Hi, 

I want to get a server certificate from the host-name.

I know I could do something like :
> call(openssl, s_client, -showcerts, -connect, hostname:port)


But the thing is to do it without openssl because I want to run the script on 
Windows.

Any suggestions ?
Mathieu
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue28414] SSL match_hostname fails for internationalized domain names

2017-04-21 Thread Mathieu Poussin

Mathieu Poussin added the comment:

Hello Christian.

Is there any update about this issue ?
Do we have any alternative to avoid this problem ?

Thank you.

--
nosy: +kedare

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28414>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27585] asyncio.Lock deadlock after cancellation

2017-04-07 Thread Mathieu Sornay

Changes by Mathieu Sornay <msor...@gmail.com>:


--
pull_requests: +1188

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27585>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 <rep...@bugs.python.org>
<http://bugs.python.org/issue29690>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/_strptime.py", line 324, in _strptime
(bad_directive, format))
ValueError: 'z' is a bad directive in format '%z'
➜  ~ python3 dt.py
1900-01-01 00:00:00+17:20

We should either mention it in doc, either cherry-pick the code from python3

--
components: Library (Lib)
messages: 288782
nosy: deronnax
priority: normal
severity: normal
status: open
title: no %z directive for strptime in python2, doc says nothing about it
type: behavior
versions: Python 2.7

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29690>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28789] valgrind shows "invalid file descriptor" when calling platform.system() on my machine.

2016-11-24 Thread Mathieu Duponchelle

New submission from Mathieu Duponchelle:

I'm using Fedora 23.

 meh  ~  1  valgrind python3 -c "import platform; print(platform.system())"
==10093== Memcheck, a memory error detector
==10093== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==10093== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==10093== Command: python3 -c import\ platform;\ print(platform.system())
==10093== 
==10094== Warning: invalid file descriptor 1024 in syscall close()
==10094== Warning: invalid file descriptor 1025 in syscall close()
==10094== Warning: invalid file descriptor 1026 in syscall close()
==10094== Warning: invalid file descriptor 1027 in syscall close()
==10094==Use --log-fd= to select an alternative log fd.
==10094== Warning: invalid file descriptor 1028 in syscall close()
==10094== Warning: invalid file descriptor 1029 in syscall close()
Linux
==10093== 
==10093== HEAP SUMMARY:
==10093== in use at exit: 861,318 bytes in 5,903 blocks
==10093==   total heap usage: 71,738 allocs, 65,835 frees, 10,611,196 bytes 
allocated
==10093== 
==10093== LEAK SUMMARY:
==10093==definitely lost: 0 bytes in 0 blocks
==10093==indirectly lost: 0 bytes in 0 blocks
==10093==  possibly lost: 326,619 bytes in 1,420 blocks
==10093==still reachable: 534,699 bytes in 4,483 blocks
==10093== suppressed: 0 bytes in 0 blocks
==10093== Rerun with --leak-check=full to see details of leaked memory
==10093== 
==10093== For counts of detected and suppressed errors, rerun with: -v
==10093== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
 meh  ~  1  python3 --version
Python 3.4.3
 meh  ~  1  

--
components: Library (Lib)
messages: 281640
nosy: Mathieu_Du
priority: normal
severity: normal
status: open
title: valgrind shows "invalid file descriptor" when calling platform.system() 
on my machine.
versions: Python 3.4

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28789>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27585] asyncio.Lock deadlock after cancellation

2016-11-16 Thread Mathieu Sornay

Mathieu Sornay added the comment:

Fix attempt : https://github.com/python/asyncio/pull/467

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27585>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27585] asyncio.Lock deadlock after cancellation

2016-11-15 Thread Mathieu Sornay

Mathieu Sornay added the comment:

I might have found another pathological case not fixed by 
https://github.com/python/asyncio/pull/393

Tested in 3.6.0b3

The deadlock.py file prints :

DEADLOCK HERE
_locked:  False
_waiters: deque([])

--
nosy: +msornay
versions: +Python 3.6 -Python 3.5
Added file: http://bugs.python.org/file45489/deadlock.py

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27585>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 3.x, nor do I see it there.
>
> --
>
> ___
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue20004>
> ___

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20004>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue20004>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 dictionary lookup for regexes, stored in 
_strpime.py. It's minimally invasive, allow a very simple C implementation, and 
allows us to avoid to add a 're' import in datetime.py. Problem : it breaks 
when the given class is not of type date, time or datetime. And it currently 
breaks the tests because tests are doing this, testing using subclasses. We 
could rely on "isinstance" but do we want this ?

* regex stored as classes attributes. More robust, more invasive, 're' import 
in datetime.py, allows subclassing, passes test. C implementation not done yet. 
Since it requires a better understanding of the C API, I will do it only we are 
sure that's the way to go.

I post the two versions of the implementation as patches here. These adress all 
the concerns expressed before (Martin). If we can't decide, I will post a mail 
on the mailing list Martin suggested, python-ideas. By the way, are you sure 
it's the right one to ask ? Wouldn't be python-dev more appropriated ?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to this ticket seem pretty bare. Issues that I can spot 
> directly:
>
> - only tests for datetimes, not times or dates
> - only tests for zulu and "-8:00” timezones
> - no tests for invalid input (parsing a valid date as a datetime for example)
> - only tests for -MM-DDTHH:MM:SSZ, but ISO8601 supports:
> - Naive times
> - Timezone information (specified as offsets or as Z for 0 offset)
> - Year
> - Year-month
> - Year-month-date
> - Year-week
> - Year-week-weekday
> - Year-ordinal day
> - Hour
> - Hour-minute
> - Hour-minute
> - Hour-minute-second
> - Hour-minute-second-microsecond
> - All combinations of the three "families" above!
> (the above list is a copy paste from my project that implements all ISO8601 
> that fits into native python: https://github.com/boxed/iso8601 
> <https://github.com/boxed/iso8601>)
>
> This is a more reasonable test suite: 
> https://github.com/boxed/iso8601/blob/master/iso8601.py#L166 
> <https://github.com/boxed/iso8601/blob/master/iso8601.py#L166> although it 
> lacks the tests for bogus inputs.
>
>> On 2016-07-16, at 03:41, Alexander Belopolsky <rep...@bugs.python.org> wrote:
>>
>>
>> Alexander Belopolsky added the comment:
>>
>> I would very much like to see this ready before the feature cut-off for 
>> Python 3.6.  Could someone post a summary on python-ideas to get a show of 
>> hands on some of the remaining wrinkles?
>>
>> I would not worry about a C implementation at this point.  We can put python 
>> implementation in _strptime.py and call it from C as we do for the strptime 
>> method.
>>
>> --
>>
>> ___
>> Python tracker <rep...@bugs.python.org>
>> <http://bugs.python.org/issue15873>
>> ___
>
> --
>
> ___
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue15873>
> ___

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

By the way, I just discovered, that the way we treat microseconds differs from 
the strptime one : we are smarter read every digits and smartly round to six, 
strptime doesn't go that far and just *truncate* to this. Should go that way, 
for consistency with what strptime does, maybe ?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-06-29 Thread Mathieu Xhonneux

Mathieu Xhonneux added the comment:

It's line 469 in the latest Lib/http/server.py (and not 473).

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27414>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-06-29 Thread Mathieu Xhonneux

New submission from Mathieu Xhonneux:

With Python 3.5, when I subclass SimpleHTTPRequestHandler, which itself 
subclasses BaseHTTPRequestHandler, and I try to access a non-existing file, the 
server responds with a 404 code, but send_error (see Lib/http/server.py, line 
473) adds the Content-Length header with an int value, whereas all others 
functions convert this value to str (see lines 699, 761).

For consistency, all header values should be str.

--
components: Library (Lib)
messages: 269488
nosy: m.xhonneux
priority: normal
severity: normal
status: open
title: http.server.BaseHTTPRequestHandler inconsistence with Content-Length 
value
type: enhancement
versions: Python 3.5

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27414>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue2202>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 is not 
close to be here soon. (btw if you have a starting point to recommend)

I definitely do not like this fix, it destroys the elegance and the simplicity 
of the "single-dispatch" solution. And it introduce a lot of noisy code for a 
very rare case, people subclassing datetime.* classes.

Maybe making the regex dictionary having string keys instead of class and 
passing the correct string from the calling function, like:

def fromisoformat(string):
_parse_isodatetime('time', string)

or maybe functools.singledispatch handle this case ?

--
Added file: http://bugs.python.org/file41951/fromisoformat_singledispatch.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue2202>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 fails because what is used in tests is a 
subclass of datetime classes (Subclass[Date|Time|DateTime]) and thus, the 
dispatch break with a KeyError: class.SubDate[...]. I have no idea on how 
mitigate that. Do you ?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 status code but that's beyond the point of this bug).

I will finish the work of SpaceOne : do a clean patch with just the 
modification (no rename of the variable nor comments) and write a test case.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25738>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 handled in the previous revision)
* correct rounding + case suggested by Martin added as a test case
* more precise docstrings specifying that only a subset of ISO 8601 is accepted

bonus:
* useless non-capturing groups removed in regex, thus shorter and simpler

I still have a doubt though about the place I moved the regex. Tell me.

--
Added file: http://bugs.python.org/file41940/fromisoformat_new2.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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._parse_time, 
which is heavily tested in time unittests.
* I now handle lowercase T and Z. (I know I could do "if tzinfo[0] in ('Z', 
'z')", but to me it feel like imposing a micro performance penalty to 
implementation correctly sending an uppercase Z)

I'm impatient to receive your feedback.

--
Added file: http://bugs.python.org/file41935/fromisoformat_new.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, 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 "२०१६-०२-१६ ०१:२१:१४"?
>
> --
>
> ___
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue15873>
> ___
>

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, neither second-less datetime, ...
I don't really mind what the answer is. I'm OK for a stricter acceptance. I 
would like to ask ourselves : does a simpler, stricter implementation fulfill 
people needs ? If it's OK for you, it's OK for me.

By taking the Django version, I deviated the bit from the author's original 
need which was just being able to parse back datetime isoformat. The 
limitations he raises for not using strptime are gone now (strptime understand 
timezone), but it still can't understand microseconds nor optional parts (T or 
space for separator, optional microseconds). Even for a much simpler, stricter 
implementation, I'd like to stick with regex.

I'll do a date & time version, I just wait that we fall agree on the whole 
datetime thing.

Wether we change to a simpler code or keep it this way, I can rewrite tests & 
docstring.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 fairly ready. What next ?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 of this reply forbid to carry a body.
So I think the whole "if code >= 200 and code >= 200 and   code 
not in (code not in (HTTPStatus.NO_CONTENT, HTTPStatus.NOT_MODIFIED)):" should 
just be replaced by a assert 400 <= code < 600.

And more seriously : who could be using this code for a modern real world usage 
? Why not delete it ? Isn't it harmful that unwarned might use it ?

--
nosy: +deronnax

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25738>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the timedelta constructor. Datetime's one 
only take int :(
But I figured out an elegant manner to cope with (in my opinion)

> Since datetime is implemented in C, I'm not sure that using the re is
the best choice. Since the regex looks simple enough, we may parse the
string without the re module. Well, maybe only for the C
implementation.

No regex available at all in CPython ? Otherwise, yeah, if I have to, I can do 
it with strptime.

> What is the behaviour is there are spaces before/after the string?
What if there are other characters like letters before/after? You
should add an unit test for that. I expect an error when parsing
"t=2012-04-23T09:15:00" for example.
Your regex ends with $ but doesn't start with ^. Using re.match(), ^
and $ are probably not needed, but I'm not confident when I use regex
:-)

re.match only look at the beginning of the string, so no need for '^'. And 
therefore, the case
you mention is already handled :)

joined to this mail the last revision of the feature, with correct rounding, 
more test and one useless
line removed. Maybe the good one :) ?

--
Added file: http://bugs.python.org/file41927/fromisoformat4.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 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 the #1 iso parsing functions used in python. Have a look at
> >
> https://docs.djangoproject.com/en/1.9/_modules/django/utils/dateparse/#parse_datetime
>
> How does it parse this date:
>
> 2016-02-15T11:59:46.16588638674+09:00
>
> --
>
> ___
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue15873>
> ___
>

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 "fromisotimestamp" counterpart).

--
Added file: http://bugs.python.org/file41922/fromisoformat.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the #1 iso parsing 
functions used in python. Have a look at 
https://docs.djangoproject.com/en/1.9/_modules/django/utils/dateparse/#parse_datetime

Alexander, I won't start before I have your opinion. What do you think ?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 is able 
to generate a 8601 datetime but not parsing it back.

--
nosy: +deronnax

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23749] asyncio missing wrap_socket (starttls)

2015-10-01 Thread Mathieu Sornay

Changes by Mathieu Sornay <msor...@gmail.com>:


--
nosy: +msornay

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23749>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14102] argparse: add ability to create a man page

2015-06-07 Thread Mathieu Bridon

Changes by Mathieu Bridon boche...@daitauha.fr:


--
nosy: +bochecha

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14102
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14102] argparse: add ability to create a man page

2015-06-07 Thread Mathieu Bridon

Mathieu Bridon added the comment:

Any news on this?

The code posted by Oz Tiram (I took the latest from his github repo) works 
quite well, even with Python 3. (I just tested it)

It would be great if argparse could include the formatter class, as well as the 
distutils command.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14102
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23519] using asyncio.iscoroutinefunction() on a functools.partial object

2015-02-26 Thread Mathieu Pasquet

Mathieu Pasquet added the comment:

Using functools.partial with coroutines would be mostly out of convenience, in 
order to avoid having factories in that return parametrized coroutine 
functions. I guess in such cases it might be better to create a two-lines 
wrapper around partial() to make it return a coroutine rather than change the 
stdlib for that.

In the attached file is an example of such use, where EventNotifier is a 
Protocol which receives external events and triggers event handlers based on 
that, and where the add_event_handler function checks if the handler is a 
coroutine function. In which case it uses asyncio.async to schedule the handler 
call; otherwise it uses loop.call_soon.

You can close this, I guess.

--
Added file: http://bugs.python.org/file38246/example_partial.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23519
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23519] using asyncio.iscoroutinefunction() on a functools.partial object

2015-02-25 Thread Mathieu Pasquet

New submission from Mathieu Pasquet:

Using iscoroutinefunction() on an object returned by functools.partial() should 
return True if the function wrapped was a coroutine function.

(a recursive loop like the one in asyncio/events.py get_function_source() may 
be what needs to be done)

--
components: asyncio
messages: 236569
nosy: gvanrossum, haypo, mathieui, yselivanov
priority: normal
severity: normal
status: open
title: using asyncio.iscoroutinefunction() on a functools.partial object
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23519
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22768] Add a way to get the peer certificate of a SSL Transport

2014-10-31 Thread Mathieu Pasquet

Mathieu Pasquet added the comment:

Maybe
transport.get_extra_info('socket').getpeercert(True)
would be okay, no patch needed?

Thanks, that indeed works; I don't know why I missed it while reading the 
source. Maybe the docs could use some clarification, though? (users are not 
supposed to know that _SelectorTransport is subclassed by 
_SelectorSslTransport, which thus gets the extra info of both)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22768
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22768] Add a way to get the peer certificate of a SSL Transport

2014-10-30 Thread Mathieu Pasquet

New submission from Mathieu Pasquet:

Currently, the only workaround is to use transport._sock.getpeercert(True) on 
the Transport returned by loop.create_connection(), which is not something to 
be encouraged. It is useful to get such information, for example to perform a 
manual certificate check against a previously recorded certificate or hash.

I attached a trivial patch adding an extra 'peercert_bin' info, but I do not 
know if this is the right approach, as other issues of feature disparity might 
arise when more people try to switch to asyncio. Exposing a proxy SSLSocket 
object for read-only functions might be more beneficial.

--
components: asyncio
files: peercert_bin.patch
keywords: patch
messages: 230281
nosy: gvanrossum, haypo, mathieui, yselivanov
priority: normal
severity: normal
status: open
title: Add a way to get the peer certificate of a SSL Transport
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file37076/peercert_bin.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22768
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22768] Add a way to get the peer certificate of a SSL Transport

2014-10-30 Thread Mathieu Pasquet

Mathieu Pasquet added the comment:

I'm not sure that would make a difference. We still have to implement
the proxy SSLSocket, which is no easier than adding the extra info by
hand. Or did I misunderstand you?


The difference would be that exposing methods can be more future-proof, as some 
methods take parameters (like the offender getpeercert(bool), or 
get_channel_binding() that takes an element of ssl.CHANNEL_BINDING_TYPES, list 
that may grow in the future) that need to be covered in the properties. But the 
API of SSLSocket is stable and small so I don't think it really matters.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22768
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22678] An OSError subclass for no space left on device would be nice

2014-10-20 Thread Mathieu Bridon

New submission from Mathieu Bridon:

I found myself writing the following code the other day:

try:
os.mkdir(path)

except PermissionError:
do_something()

except FileExistsError:
do_something_else()

except FileNotFoundError:
do_yet_another_thing()

except OSError as e:
import errno
if e.errno == errno.ENOSPC:
and_do_one_more_different_thing()

else:
raise e

The OSError subclasses in Python 3 are amazing, I love them.

I just wish there'd be more of them. :)

--
components: Library (Lib)
messages: 229729
nosy: bochecha
priority: normal
severity: normal
status: open
title: An OSError subclass for no space left on device would be nice
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22678
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22678] An OSError subclass for no space left on device would be nice

2014-10-20 Thread Mathieu Bridon

Changes by Mathieu Bridon boche...@daitauha.fr:


--
keywords: +patch
Added file: http://bugs.python.org/file36981/0001-New-NoSpaceError.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22678
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22678] An OSError subclass for no space left on device would be nice

2014-10-20 Thread Mathieu Bridon

Changes by Mathieu Bridon boche...@daitauha.fr:


Added file: http://bugs.python.org/file36982/0002-Use-the-new-NoSpaceError.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22678
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2202
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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+v1fe2ba746797cfd974e85f9f6dbdd6e514ec45becd2d8cf0112c764c676ad4a00f98517bb166e467dcad4b942254bd9b71d447e3529c509d2,charset=utf-8,realm=Digest
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
X-Powered-By: ASP.NET
Date: Thu, 25 Sep 2014 15:11:03 GMT
Connection: close
Content-Length: 0

which blew python 2.7 utllib2 like this:

File tut2.py, line 23, in module
response = opener.open('https://exca010.encara.local.ads/ews/Services.wsdl')
  File /usr/lib64/python2.7/urllib2.py, line 410, in open
response = meth(req, response)
  File /usr/lib64/python2.7/urllib2.py, line 524, in http_response
'http', request, response, code, msg, hdrs)
  File /usr/lib64/python2.7/urllib2.py, line 442, in error
result = self._call_chain(*args)
  File /usr/lib64/python2.7/urllib2.py, line 382, in _call_chain
result = func(*args)
  File /usr/lib64/python2.7/urllib2.py, line 1090, in http_error_401
host, req, headers)
  File /usr/lib64/python2.7/urllib2.py, line 973, in http_error_auth_reqed
return self.retry_http_digest_auth(req, authreq)
  File /usr/lib64/python2.7/urllib2.py, line 977, in retry_http_digest_auth
chal = parse_keqv_list(parse_http_list(challenge))
  File /usr/lib64/python2.7/urllib2.py, line 1259, in parse_keqv_list
k, v = elt.split('=', 1)
ValueError: need more than 1 value to unpack


urllib2 seems to assume that every www-authenticate header value will be a list 
of equal-signe-separated tuple.

On python3, the error is different and trigger this 
http://bugs.python.org/issue2202 (which is soon-to-be-fixed)

--
components: Library (Lib)
messages: 227543
nosy: deronnax
priority: normal
severity: normal
status: open
title: urllib2 fails against IIS (urllib2 can't parse 401 reply 
www-authenticate headers)
type: crash
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22496
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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...@bugs.python.org
http://bugs.python.org/issue22496
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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;print time.strftime(%:z)'
%:z

%z works fine, any of the other middle-colon variant (glibc also have %::z, 
%:::z) have the same problem.

Reproduced with python 2.7 and 3.3

--
components: Library (Lib)
messages: 202845
nosy: mdupuy
priority: normal
severity: normal
status: open
title: time.strftime fails to use %:z time formatter of the underlying C library
type: behavior
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19583
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19583
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19389] find_file might return a different directory than the tested file

2013-10-25 Thread Mathieu Virbel

New submission from Mathieu Virbel:

With Maverick OSX (latest version), there is no /usr/include/zlib.h anymore. If 
you try to compile Python with -sysroot, it trigger a error message:

error: /usr/include/zlib.h: No such file or directory

The issue is in setup.py, where find_file is checking the existence of a 
filename, but if the filename has been found in a sysroot, it will return the 
path _without_ the sysroot.

In this case (zlib), find_file correctly find the zlib.h in 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/zlib.h,
 but return /usr/include,  and then the setup.py open '/usr/include/zlib.h', 
which fail.

--
components: Build
files: fix-setup-find-file-path.patch
keywords: patch
messages: 201245
nosy: Mathieu.Virbel
priority: normal
severity: normal
status: open
title: find_file might return a different directory than the tested file
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file32352/fix-setup-find-file-path.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19389
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl

2013-09-29 Thread Mathieu Sornay

Changes by Mathieu Sornay msor...@gmail.com:


--
nosy: +lechfeck

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14044
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18866] Invitation to connect on LinkedIn

2013-08-28 Thread Mathieu Dutour Sikiric

New submission from Mathieu Dutour Sikiric:

LinkedIn


Python,

I'd like to add you to my professional network on LinkedIn.

- Mathieu

Mathieu Dutour Sikiric
visitor at Technische Universität Darmstadt
Croatia

Confirm that you know Mathieu Dutour Sikiric:
https://www.linkedin.com/e/-3qcne3-hkwae47b-w/isd/16114407170/_uBqO9cI/?hs=falsetok=1LB6yqjv-xn5U1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-3qcne3-hkwae47b-w/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I5360506395_1/?hs=falsetok=2-0L5OcgWxn5U1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

--
messages: 196357
nosy: mathieu37
priority: normal
severity: normal
status: open
title: Invitation to connect on LinkedIn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18866
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18867] Invitation to connect on LinkedIn

2013-08-28 Thread Mathieu Dutour Sikiric

New submission from Mathieu Dutour Sikiric:

LinkedIn


Python,

I'd like to add you to my professional network on LinkedIn.

- Mathieu

Mathieu Dutour Sikiric
visitor at Technische Universität Darmstadt
Croatia

Confirm that you know Mathieu Dutour Sikiric:
https://www.linkedin.com/e/-3qcne3-hkwamgk2-6i/isd/16114407170/_uBqO9cI/?hs=falsetok=2qk9t5ByeDn5U1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-3qcne3-hkwamgk2-6i/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I5360539519_1/?hs=falsetok=0MVwAfDXCDn5U1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

--
messages: 196358
nosy: mathieu37
priority: normal
severity: normal
status: open
title: Invitation to connect on LinkedIn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18867
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17331] Fix str methods for detecting digits with unicode

2013-03-01 Thread Mathieu Pasquet

New submission from Mathieu Pasquet:

In py3k, str.isalnum(), str.isdigit(), and str.isdecimal() are broken because 
they take into account various unicode numbers.

A common case is doing something like that:

num = -1
while num == -1:
num_in = input('Enter a number ')
if num_in.isdigit():
num = int(num_in)

# do stuff …

If you enter ¹, or any esoteric unicode representation of a number, all the 
methods referenced above will return True. I believe this is a bug.

It also affects the stdlib, e.g. in collection.namedtuple,
A = namedtuple('A¹', 'x y') will return an ugly Syntax Error, because the 
sanity check uses str.isalnum(), which says it’s ok. (n.b.: of course, no sane 
person should ever want to do the above, but I find it worth mentionning)

--
components: Unicode
messages: 183291
nosy: ezio.melotti, mathieui
priority: normal
severity: normal
status: open
title: Fix str methods for detecting digits with unicode
type: behavior
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17331
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17331] Fix str methods for detecting digits with unicode

2013-03-01 Thread Mathieu Pasquet

Mathieu Pasquet added the comment:

I understand the reasoning behind the feature, and the will to be 
unicode-compliant, but I think this might still break a lot of code (though it 
may never be detected).

I understand that isdecimal() is the safe way, because anything that is a 
decimal (Nd) can be translated to an integer by int() ; however, what is the 
recommended way to get something that isnumeric() into an int?

unicodedata.normalize('NFKD', num) or unicodedata.normalize('NFKC', num)?

Maybe str could have a method that does this, or methods performing exclusively 
on ascii values?

Sorry for the noise, I did not find issue 10557 when I searched.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17331
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16346] readline problem

2012-12-08 Thread Mathieu Dutour Sikiric

Mathieu Dutour Sikiric added the comment:

Well, that was the points, the headers were not available.

  Mathieu

On Sunday, December 9, 2012, Éric Araujo wrote:


 Éric Araujo added the comment:

 On a Ubuntu system you don’t need to install readline from PyPI: CPython
 has a readline module, which gets compiled if the headers are available.

 That said, the error you report is still strange.  Can you attach the full
 console output as a text file?

 --

 ___
 Python tracker rep...@bugs.python.org javascript:;
 http://bugs.python.org/issue16346
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16346
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9584] Allow curly brace expansion

2012-11-06 Thread Mathieu Bridon

Mathieu Bridon added the comment:

 glob.glob('*.{sub,ac}')
['config.sub']

I'm surprised this broke, this is one of the behaviour I thought I had 
implemented in my original patch. :-/

 (and moreover, now it is impossible to glob for paths that contain braces)

I am absolutely sure this was working in my original submission, I had even 
added unit tests for it:
+# test some edge cases where braces must not be expanded
+eq(self.glob('c{}d'), [self.norm('c{}d')])
+eq(self.glob('c{d{e,f}g'), map(self.norm, ['c{deg', 'c{dfg']))
+eq(self.glob('c{d,e}{f}g'), map(self.norm, ['cd{f}g', 'ce{f}g']))
+eq(self.glob('c{d,e}f}g'), map(self.norm, ['cdf}g', 'cef}g']))

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9584] Allow curly brace expansion

2012-11-05 Thread Mathieu Bridon

Mathieu Bridon added the comment:

I have to apologize for not following up on this patch. At first I had no time 
to go on pushing for it, and then (after a change of job), I completely forgot 
about it. :(

I guess rebasing the patch on the latest tip is not that useful if you already 
have done it Tim, and I don't have access to a Windows box to figure out the 
issue in the tests.

At this point is there anything else I can do to help getting it integrated?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9584] Allow curly brace expansion

2012-11-05 Thread Mathieu Bridon

Mathieu Bridon added the comment:

  IIUC you're implementing comma-separated lists {abc,def} and nested braces 
 {a{b,c}d,efg} but not ranges {a..z}.

Exactly.

Although that's just because at the time I sent the patch, I didn't know about 
ranges in shells.

So I just implemented the part of curly brace expansion that I knew of and felt 
would be useful.

If ranges are an expected feature from shells, then it would probably be a 
worthwhile addition.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16346] readline problem

2012-10-28 Thread Mathieu Dutour Sikiric

New submission from Mathieu Dutour Sikiric:

Dear all,

I tried to install Python 2.7.3 in a home directory for simplicity. On the 
Ubuntu platform that I had, the readline-dev was not installed.
So, I I tried to install the readline package either by pip install readline 
or python setup.py install and what I got was following behavior:
--
.
.
.
  File /home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py, line 
1118, in write_pkg_file

self._write_field(file, 'Metadata-Version', version)

  File /home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py, line 
1145, in _write_field

file.write('%s: %s\n' % (name, self._encode_field(value)))

  File /home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py, line 
1154, in _encode_field

if isinstance(value, unicode):

RuntimeError: maximum recursion depth exceeded while calling a Python object
--
So, the install went into an infinite loop and crashed.
Instead the correct error message that should have been shown at some point is 
missing .h file.

I am a beginner on Python, I asked on h...@python.org and Matthew Dixon Cowles 
indicated me that I should report the problem here.

--
components: Build
messages: 174012
nosy: mathieu37
priority: normal
severity: normal
status: open
title: readline problem
type: compile error
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16346
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Why derivated exception can not be pickled ?

2012-09-05 Thread Mathieu Courtois
Thanks for your reply


On Wednesday, September 5, 2012 8:02:55 AM UTC+2, Dieter Maurer wrote:
 
 The pickle interface is actually more complex and there are several
 
 ways an object can ensure picklability. For example, there is
 
 also a __reduce__ method. I suppose, that Exception defines methods
 
 which trigger the use of an alternative picklability approach (different
 
 from __getstate__/__setstate__).

You're right: Exception has __reduce__  __reduce_ex__ methods. Always read 
carefully the manual ;-)

I must override these methods.


MC
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Why derivated exception can not be pickled ?

2012-09-05 Thread Mathieu Courtois
Hello,

The simple example works fine using __reduce__:

class MyError(Exception):
def __init__(self, arg):
self.arg = arg

def __reduce__(self):
return (MyError, (self.arg, ))

-- 
http://mail.python.org/mailman/listinfo/python-list


Why derivated exception can not be pickled ?

2012-09-04 Thread Mathieu Courtois
Here is my example :


import cPickle

ParentClass = object # works
ParentClass = Exception  # does not

class MyError(ParentClass):
def __init__(self, arg):
self.arg = arg

def __getstate__(self):
print '#DBG pass in getstate'
odict = self.__dict__.copy()
return odict

def __setstate__(self, state):
print '#DBG pass in setstate'
self.__dict__.update(state)

exc = MyError('IDMESS')

fo = open('pick.1', 'w')
cPickle.dump(exc, fo)
fo.close()

fo = open('pick.1', 'r')
obj = cPickle.load(fo)
fo.close()


1. With ParentClass=object, it works as expected.

2. With ParentClass=Exception, __getstate__/__setstate__ are not called.

Does anyone explain me why ?
Thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list


[issue14270] Can't install a package in a specific directory

2012-03-12 Thread Mathieu Leduc-Hamel

New submission from Mathieu Leduc-Hamel marra...@gmail.com:

When using distutils2.install.install_from_infos to install a package, no 
matter if you have an install_path parameter or not, it doesn't work.

The problem seems to resided at:

distutils2.install._run_install_from_archive

Doesn't have any dest_dir parameter

--
assignee: eric.araujo
components: Distutils2
messages: 155498
nosy: alexis, eric.araujo, mlhamel, tarek
priority: normal
severity: normal
status: open
title: Can't install a package in a specific directory
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14270
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1410680] Add 'surgical editing' to ConfigParser

2011-12-09 Thread Mathieu Pasquet

Mathieu Pasquet mathi...@mathieui.net added the comment:

What is the state of that feature, as of today?

--
nosy: +mathieui

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1410680
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9584] Allow curly brace expansion

2011-05-08 Thread Mathieu Bridon

Mathieu Bridon boche...@fedoraproject.org added the comment:

Is anybody still reading this? :-/

Could somebody commit the patch, reject it, or tell me what else I need to do?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9584] Allow curly brace expansion

2011-03-20 Thread Mathieu Bridon

Mathieu Bridon boche...@fedoraproject.org added the comment:

 I removed the unused import (mostly as a simple test of mercurial, it's my 
 first commit there).

Does it mean that Python development is not being done in SVN, as the 
documentations state it?

My patches have all been based on the SVN py3k branch, please tell me if I must 
base them on something else instead.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >