[issue36461] timeit: Additional changes for autorange

2019-05-24 Thread Alessandro Cucci


Alessandro Cucci  added the comment:

Thanks Steven, I like the new name "target_time".

Just a question: why we need to check ``if number == 0:``? In the proposal you 
asked for None too. What changed? Even if the function is called with False, 
will it hurts to keep the default value?

I'll try to implement your ideas during this weekend.

--
nosy: +acucci -Alessandro Cucci

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



[issue36424] Pickle fails on frozen dataclass that has slots

2019-04-25 Thread Alessandro Cucci


Change by Alessandro Cucci :


--
nosy: +acucci

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



[issue36461] timeit: Additional changes for autorange

2019-04-25 Thread Alessandro Cucci


Change by Alessandro Cucci :


--
pull_requests: +12880

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



[issue36461] timeit: Additional changes for autorange

2019-04-19 Thread Alessandro Cucci


Alessandro Cucci  added the comment:

Hello @Mariatta,
if this is simple I would like to work on that, can I?
Thanks!

--
nosy: +Alessandro Cucci

___
Python tracker 
<https://bugs.python.org/issue36461>
___
___
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

2016-04-20 Thread Alessandro Cucci

Alessandro Cucci added the comment:

I would like to work on a patch if nobody currently are working on it. I'll 
keep you updated

--
nosy: +acucci

___
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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-03-02 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Meanwhile I made corrections after @belopolsky latest review

--
Added file: http://bugs.python.org/file42063/issue19475_v17.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-02-25 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Oh, now I see your point.

I've uploaded a new patch with a note for that.

--
Added file: http://bugs.python.org/file42031/issue19475_v16.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-02-22 Thread Alessandro Cucci

Alessandro Cucci added the comment:

New patch after @martin.panter comments on Rietveld. I left only this:

- ``'milliseconds'``: Append the hours, minutes, seconds and milliseconds.

> vadmium 2016/02/21 23:30:20
> I think this should explain that fractions are truncated to zero, never 
> rounded
> up. At least for fractions of milliseconds, although this could apply 
> to the
> other options as well.

I think is quite obvious that a datetime.now() can't be rounded to the future 
if microseconds are 999500.

--
Added file: http://bugs.python.org/file42007/issue19475_v15.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-02-21 Thread Alessandro Cucci

Alessandro Cucci added the comment:

New patch

--
Added file: http://bugs.python.org/file41988/issue19475_v13.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-01-15 Thread Alessandro Cucci

Alessandro Cucci added the comment:

I there anything else I can do for this?

--

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-01-05 Thread Alessandro Cucci

Alessandro Cucci added the comment:

up

--

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



[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2016-01-02 Thread Alessandro Cucci

Changes by Alessandro Cucci <alessandro.cu...@gmail.com>:


Added file: http://bugs.python.org/file41476/doc.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-01-01 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Thanks @martin.panter, here is another patch made after your comments.

--
Added file: http://bugs.python.org/file41464/issue19475_v12.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-29 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Berker, thank you. 
In the last patch, I removed details about timespec options in Python and C 
docstrings, corrected the rst quotes, and checked PEP7 in the c file.

The only problem now is about versionchanged vs versionadded. I leave it as it 
was, as Silent and the official doc say, if you want to change it, i'll leave 
it to you. 

Again, many many thanks to all. This was my first issue here, I learnt a lot!

--
Added file: http://bugs.python.org/file41448/issue19475_v11.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-29 Thread Alessandro Cucci

Alessandro Cucci added the comment:

what about the comment left by SilentGhost about versionadded?

--

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



[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Alessandro Cucci

Alessandro Cucci added the comment:

I don't think the problem is about the underscores, since this work...

class Foo:
def f1(self):
__obj = object()
def f2():
nonlocal __obj
__obj = []
f2()
return isinstance(__obj, list)

f = Foo()
print(f.f1())

--
nosy: +acucci

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



[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Alessandro Cucci

Alessandro Cucci added the comment:

quoting the docs:

The statement [nonlocal] allows encapsulated code to rebind variables outside 
of the local scope BESIDES the global (module) scope.

--

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



[issue25955] email.utils.formataddr does not support RFC 6532

2015-12-26 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Sergei can you submit a patch? 
Otherwise I can work on that, I have free time.

--
nosy: +acucci

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-25 Thread Alessandro Cucci

Alessandro Cucci added the comment:

> I think timespec= option should also be added to the time.isoformat method.

@belopolsky I've done it in my last patch.

--
Added file: http://bugs.python.org/file41420/issue19475_v10_datetime_time.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-22 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Thanks SilentGhost!

--
Added file: http://bugs.python.org/file41391/issue19475_v9.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-22 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Sorry @SilentGhost, I didn't seen your comment at the bottom of the review. 
With this patch is microsecond is 0, the time will display 6 zeroes.

--
Added file: http://bugs.python.org/file41388/issue19475_v8.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-22 Thread Alessandro Cucci

Changes by Alessandro Cucci <alessandro.cu...@gmail.com>:


Added file: http://bugs.python.org/file41387/issue19475_v7.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-21 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Uploaded a new patch after SilentGhost review comments.

As he told me, I've left out milliseconds and nanoseconds, but refactored both 
python and c code so we could easily add support for them when they will be 
available.

--
Added file: http://bugs.python.org/file41381/issue19475_v6.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-20 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Uploaded a new patch. 

This time I ran tests using:
$ ./python -m test -v test_datetime

and got no errors.

I've written the c docstring, updated docs, and rewrote _format_time function.

I know it's boring review this another time, but I'm doing my best.

Thanks to all.

--
Added file: http://bugs.python.org/file41371/issue19475_v5.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-16 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Uploaded a new patch (v4):
DONE:
- now all tests work (I also added one more)
- removed non ascii chars
- added milliseconds and nanoseconds as multiple of microseconds
- removed code duplication in the datetime.py
- update the docstring.

TODO:
> The doc string in the C module needs updating. 
Where? I guess "Macros to extract fields from datetime objects." in 
c-api/datetime.rst Tell me if I'm wrong

> I think timespec= option should also be added to the time.isoformat method.
I'll do it when I'm sure that the datetime.isoformat method is correct.

--
Added file: http://bugs.python.org/file41329/issue19475_v4.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-16 Thread Alessandro Cucci

Alessandro Cucci added the comment:

I just did that...

~/Documenti/cpython$ ./configure --with-pydebug
~/Documenti/cpython$ make -s -j2
~/Documenti/cpython$ ./python -m test -v datetimetester
...
...

--
Ran 325 tests in 1.128s

OK (skipped=1)
1 test OK.

--

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-15 Thread Alessandro Cucci

Alessandro Cucci added the comment:

I can work on that, although I'll need help from some senior dev. The problem 
here is that millisecond and nanosecond seems not to be attributes of the 
datetime object. What about open a new issue if we have to add them? Is not 
about adding an optional flag anymore...
Anyway, as I said, any help is appreciated!

--

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-15 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Please can I have an update on this? It's already 4 months old, I'd like to see 
it closed. :)

--

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-15 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Thanks for all the comments, here and on Rietveld. I'll keep working on it. 
Hope to upload a new patch soon.

--

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-08-03 Thread Alessandro Cucci

Alessandro Cucci added the comment:

uploaded a new patch!

--
Added file: http://bugs.python.org/file40117/issue19475_v3.patch

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



[issue24729] Input and Output tutorial erroneously references default encoding UTF-8

2015-07-29 Thread Alessandro Cucci

Changes by Alessandro Cucci alessandro.cu...@gmail.com:


Added file: http://bugs.python.org/file40057/issue24729_v4.patch

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



[issue24729] Input and Output tutorial erroneously references default encoding UTF-8

2015-07-29 Thread Alessandro Cucci

Alessandro Cucci added the comment:

ok, this time I tested the render myself and seems ok. For rendering I used 
sphinx. Sorry if I didn't try the final result in the first time, but I've 
never had the chance to use rst files before.

--
Added file: http://bugs.python.org/file40056/issue24729_v4.patch

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



[issue24729] Input and Output tutorial erroneously references default encoding UTF-8

2015-07-28 Thread Alessandro Cucci

Alessandro Cucci added the comment:

tried again :)

--
Added file: http://bugs.python.org/file40046/issue24729_v3.patch

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



[issue24729] Input and Output tutorial erroneously references default encoding UTF-8

2015-07-28 Thread Alessandro Cucci

Alessandro Cucci added the comment:

@r.david.murray: just like that? (see patch v2)

--
Added file: http://bugs.python.org/file40045/issue24729_v2.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-07-26 Thread Alessandro Cucci

Alessandro Cucci added the comment:

udloaded a new patch, hope i had all bugs fixed!

--

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



[issue24729] Input and Output tutorial erroneously references default encoding UTF-8

2015-07-26 Thread Alessandro Cucci

Alessandro Cucci added the comment:

corrected

--
keywords: +patch
nosy: +acucci
Added file: http://bugs.python.org/file40033/issue24729.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-07-25 Thread Alessandro Cucci

Changes by Alessandro Cucci alessandro.cu...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file40018/issue19475.patch

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-07-25 Thread Alessandro Cucci

Alessandro Cucci added the comment:

@haypo thanks for the review and the suggestions, I'll correct the code soon

--
nosy: +acucci

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-07-25 Thread Alessandro Cucci

Changes by Alessandro Cucci alessandro.cu...@gmail.com:


Added file: http://bugs.python.org/file40024/issue19475_v2.patch

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