[issue47201] pip3.10.4 is configured with locations that require TLS/SSL, however the ssl module in Python is not available

2022-04-02 Thread Alessandro Pioli
New submission from Alessandro Pioli : After installation of 3.4.10 with openssl procedure https://docs.python.org/3/using/unix.html#on-linux on centos 7.9 pip get this error: pip3.10 install -r requirements.txt WARNING: pip is configured with locations that require TLS/SSL, however the ssl

[issue44396] pegen _PyParser_ASTFromFile(): Use-After-Free in syntaxerror()

2021-06-12 Thread alessandro mantovani
alessandro mantovani added the comment: Fuzzing experimental techniques, but then I observed the same behavior was happening with vanilla afl++. As a starting queue I used the *.py files that I found in the repo under ‘test’ or so Best Alessandro Mantovani Inviato da iPhone > Il gio

[issue44396] Use-After-Free

2021-06-11 Thread alessandro mantovani
New submission from alessandro mantovani : Use After Free in python3.11 (commit 2ab27c4af4ddf752) Steps to reproduce: 1) ./configure --with-address-sanitizer 2) make 3) ./python I attach some of the input that lead to the undefined behavior For the complete description you can find

[issue32426] Tkinter.ttk Widget does not define wich option exists to set the cursor

2020-11-12 Thread Alessandro Piccione
Alessandro Piccione added the comment: As suggested the documentation for "cursor" is here: https://www.tcl.tk/man/tcl/TkCmd/cursors.htm Close [SOLVED] -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Pyt

[issue40307] multiprocessing.BaseManager does not retain Client type.

2020-04-19 Thread Alessandro Molina
Change by Alessandro Molina : -- keywords: +patch pull_requests: +18942 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19609 ___ Python tracker <https://bugs.python.org/issu

[issue40307] multiprocessing.BaseManager does not retain Client type.

2020-04-16 Thread Alessandro Molina
Alessandro Molina added the comment: The issue seems fairly easy to fix, it's just a matter in consistency in usage of self._Client attribute in the manager. I'm working on a PR that I'm willing to propose for review once I have finished it and wrote tests

[issue40307] multiprocessing.BaseManager does not retain Client type.

2020-04-16 Thread Alessandro Molina
New submission from Alessandro Molina : When a new `multiprocessing.managers.BaseManager` instance is made, the client used to connect is not stable across the life of the object. A very quick example to show that is ``` from unittest.mock import Mock from multiprocessing.managers import

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

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

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

[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/issue36

[issue34886] subprocess.run throws exception when input and stdin are passed as kwargs

2018-10-03 Thread Alessandro
Alessandro added the comment: > and I got the same ValueError as for passing using kwargs. Where did you get > the idea subprocess.run('ls', input=b'', stdin=None) worked? Sorry, the example was wrong. Both calls have the same behaviour. > so it obeys the documented API (that s

[issue34886] subprocess.run throws exception when input and stdin are passed as kwargs

2018-10-03 Thread Alessandro
Alessandro added the comment: subprocess.run('ls', input=b'', stdin=None) # this is ok kwargs = {'input': b'', 'stdin': None} subprocess.run('ls', **kwargs) # this throws exception The two calls should have the same behaviour, but one throws exception and the other doesn't. I think

[issue34886] subprocess.run throws exception when input and stdin are passed as kwargs

2018-10-03 Thread Alessandro
New submission from Alessandro : If input and stdin parameters are passed as keyword arguments to subprocess.run, an exception is thrown even if input and stdin are both None. The exception is ValueError: stdin and input arguments may not both be used. I attach a minimal working example

[issue32426] Tkinter.ttk Widget does not define wich option exists to set the cursor

2017-12-25 Thread Alessandro Piccione
New submission from Alessandro Piccione <alessandro.piccione...@gmail.com>: In the documentation of Tkinter.ttk Widget it is defined the "cursor" parameter. It is: cursor Specifies the mouse cursor to be used for the widget. If set to the empty string (the default), the cur

[issue30874] unittest execute tests twice in some conditions

2017-07-07 Thread Alessandro Cannini
New submission from Alessandro Cannini: Unittest execute the tests twice in some conditions. You can see the log here: https://travis-ci.org/ale5000-git/test/builds/251382617 based on this code: https://github.com/ale5000-git/test/tree/7a64f24a8bfea0579e30346ba993744272aa9c36 The code

[issue30743] unittest discover does not mention module file must be named with "test_" prefix

2017-06-27 Thread Alessandro Piccione
Alessandro Piccione added the comment: You are right. As the `--pattern` documentation says, the default pattern is "test*.py" which does not match "aaaTest.py". I had looking for the wrong pattern. Thanks, Alex -- resolution: -> not a bug stage: -

[issue30743] unittest discover does not mention module file must be named with "test_" prefix

2017-06-23 Thread Alessandro Piccione
Alessandro Piccione added the comment: If you refer to the -p ("pattern" parameter) I think not. I have my module named aaaTest.py. I is is not mentioned that discover look for modules named "test_" for which reason I have to use a pattern? If you refer to -s ("start-d

[issue30743] unittest discover does not mention module file must be named with "test_" prefix

2017-06-23 Thread Alessandro Piccione
New submission from Alessandro Piccione: 1. execute "python -m unittest" 2. Result: 0 test found 3. Change file name from "aaaTest.py" to "test_aaa.py" 4. execute "python -m unittest" 3. Result: Ran 1 tests in 000.0s Module file MUST be named usi

[issue30011] HTMLParser class is not thread safe

2017-04-15 Thread Alessandro Vesely
Alessandro Vesely added the comment: Serhiy's analysis is correct. If anything more than a comment is going to make its way to the code, I'd suggest to move dictionary building to its own function, so that it can be called either on first use --like now-- or before threading if the user

[issue30011] HTMLParser class is not thread safe

2017-04-14 Thread Alessandro Vesely
Alessandro Vesely added the comment: On Fri 14/Apr/2017 19:44:29 +0200 Serhiy Storchaka wrote: > > Changes by Serhiy Storchaka <storchaka+cpyt...@gmail.com>: > > > -- > pull_requests: +1272 Thank you for your fix, Serhiy. It makes the class behave cons

[issue30011] HTMLParser class is not thread safe

2017-04-07 Thread Alessandro Vesely
New submission from Alessandro Vesely: SYMPTOM: When used in a multithreaded program, instances of a class derived from HTMLParser may convert an entity or leave it alone, in an apparently random fashion. CAUSE: The class has a static attribute, entitydefs, which, on first use

[issue29462] RFC822-comments in email header fields can fool, e.g., get_filename()

2017-02-07 Thread Alessandro Vesely
Alessandro Vesely added the comment: We can close this, then. Let's hope migration to Python3 isn't going to last forever... Thank you for your cooperation -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Pytho

[issue29462] RFC822-comments in email header fields can fool, e.g., get_filename()

2017-02-06 Thread Alessandro Vesely
Alessandro Vesely added the comment: Neither I found CFWS in rfc2231. In addition, rfc 2045 (Introduction) says that Content-Disposition —where filename is defined— cannot include comments. However, Content-Type can include RFC 822 comments, so the filename should be de-commented in case

[issue29462] RFC822-comments in email header fields can fool, e.g., get_filename()

2017-02-06 Thread Alessandro Vesely
New submission from Alessandro Vesely: Comments are allowed almost everywhere in an email message, and should be eliminated before attributing any meaning to a field. In the words of RFC5322, any CRLF that appears in FWS is semantically "invisible". In particular, some note that co

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

2016-08-12 Thread Fabio Alessandro Locati
Fabio Alessandro Locati added the comment: Any news on this? -- nosy: +Fabio Alessandro Locati ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[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/i

[issue26497] Documentation - HOWTO Use Python in the web paragraph on TurboGears still mentions it's based on Pylons

2016-03-06 Thread Alessandro Molina
New submission from Alessandro Molina: https://docs.python.org/3.6/howto/webservers.html#turbogears still mentions "TurboGears 2 is based on the WSGI stack of another popular component-based web framework, Pylons." which is not true anymore since TurboGears 2.3.0. TurboGears switc

[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/i

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

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

[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/i

[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/i

[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

[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

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

[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

[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/i

[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

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

[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/i

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

[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/i

[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

[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

[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

[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

[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

[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

[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

[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/i

[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/i

[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

[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

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

[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

[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

[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

[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

[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

[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

[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-07-13 Thread Alessandro Rosa
Alessandro Rosa added the comment: Hi Terry, I will try my best to answer your questions. To update you, I decided to completely uninstall the ActiveState frameworks from my Mac. This brought me back to the dreaded Apple version of Tcl/Tk 8.5.9 with the IDLE warning about it. At this point

[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up

2015-07-05 Thread Alessandro Rosa
New submission from Alessandro Rosa: I recently upgraded to Python 2.7.10 on my MacOSX Yosemite computer. I also added a Python 3.4.3 installation. At the time I upgraded Tcl/Tk with ActiveTcl 8.5.18 as was suggested on the Python for MacOSX installation page. At this point, Autocomplete

[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-07-05 Thread Alessandro Rosa
Alessandro Rosa added the comment: Thank you for the reply. I raised a bug with ActiveState. I am a Community User, so I can't access prior builds of ActiveTcl, and I am no where near competent enough to build up a framework. -- ___ Python tracker

[issue20462] Python IDLE auto closed when creating a new file or open existing file

2014-01-31 Thread Alessandro Reinoso
New submission from Alessandro Reinoso: I looked for some online help and i found a question on stackoverflow wich shows my same problem except that i just installed python to get started: http://stackoverflow.com/questions/20768949/python-idle-auto-closed-when-i-create-a-new-file-or-open

[issue17714] str.encode('base64') add trailing new line character is not documented

2013-04-13 Thread Alessandro Piccione
New submission from Alessandro Piccione: str.encode() with 'base64' as argument add a trailing new line character to the returned string. This is the difference from base64.b64encode(str) (that is used internally). This is not documented in str.encode() http://docs.python.org/2/library

[issue17714] str.encode('base64') add trailing new line character. It is not documented.

2013-04-13 Thread Alessandro Piccione
Changes by Alessandro Piccione alessandro.piccione...@gmail.com: -- title: str.encode('base64') add trailing new line character is not documented - str.encode('base64') add trailing new line character. It is not documented. ___ Python tracker rep

[issue16415] eventlet.monkey_patch() breaks subprocess.Popen on Windows

2012-11-05 Thread Alessandro Pilotti
New submission from Alessandro Pilotti: eventlet.monkey_patch() breaks subprocess.Popen on Windows with error: NotImplementedError: set_nonblocking() on a file object with no setblocking() method (Windows pipes don't support non-blocking I/O) Here's the full stack trace: http

[issue15842] Some SocketIO methods can succeed after close()

2012-09-08 Thread Alessandro Moura
Alessandro Moura added the comment: Fixed seekable(), and amended tests; see patch. -- Added file: http://bugs.python.org/file27149/socket.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15842

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-09-06 Thread Alessandro Moura
Alessandro Moura added the comment: Yes, confirmed. When checking whether the provided path is a directory, rmtree does not check whether ignore_errors is set. According to the docstring, If ignore_errors is set, errors are ignored. Presumably this means any error, in which case

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-09-06 Thread Alessandro Moura
Alessandro Moura added the comment: Added test to patch. -- Added file: http://bugs.python.org/file27139/shutil.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15872

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-05 Thread Alessandro Moura
Alessandro Moura added the comment: I just emailed my contributor's agreement. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15841

[issue15842] Some SocketIO methods can succeed after close()

2012-09-05 Thread Alessandro Moura
Alessandro Moura added the comment: This patch fixes the problem, making those methods raise a ValueError exception after close. I also added one test case for this issue. -- keywords: +patch nosy: +eng793 Added file: http://bugs.python.org/file27128/socket.patch

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-04 Thread Alessandro Moura
Alessandro Moura added the comment: Thanks. Here is the amended patch with your suggestions implemented. -- Added file: http://bugs.python.org/file27117/memoryio.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15841

[issue15837] Added test to test_random.py testing Random.shuffle

2012-09-03 Thread Alessandro Moura
Alessandro Moura added the comment: Comparing the execution time with and without the int=int argument of this command: amoura@amoura-laptop:~/cpython$ time ./python -c from random import shuffle; lst=list(range(100)); shuffle(lst); print (len(lst)) I get with int=int: real0m13.755s

[issue15837] Added test to test_random.py testing Random.shuffle

2012-09-03 Thread Alessandro Moura
Alessandro Moura added the comment: The int=int still makes no difference, but if the second argument is set to random.random, we get a big speedup, regardless of whether the third argument is there: without int=int: amoura@amoura-laptop:~/cpython$ time ./python -c import random; lst=list

[issue15837] Added test to test_random.py testing Random.shuffle

2012-09-03 Thread Alessandro Moura
Alessandro Moura added the comment: Yup. This is the result of simply eliminating the condition in the loop and just using the second argument (for the purposes of testing this only): amoura@amoura-laptop:~/cpython$ time ./python -c import random; lst=list(range(100)); random.shuffle(lst

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-02 Thread Alessandro Moura
Alessandro Moura added the comment: This also happens for the writable() and seekable() methods. The problem is that those methods do not check whether the buffers have been closed in stringio.c. This is fixed in the attached patch for StringIO. BytesIO should be the same, but bytesio.c

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-02 Thread Alessandro Moura
Alessandro Moura added the comment: Here is the patch fixing the issue in both StringIO and BytesIO. In both cases, the problem is that in their respective c files, these methods always returned true, without testing whether the file was closed. Is this a recent rewrite? I am surprised

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-02 Thread Alessandro Moura
Alessandro Moura added the comment: Sorry, I should have seen the related issue (or just read the docs :)). Here is the patch fixing these issues, implementing the behaviour stated in the docs (raising ValueError after close). The tests revealed that the _pyio module also needed fixing

[issue15837] Added test to test_random.py testing Random.shuffle

2012-09-01 Thread Alessandro Moura
Alessandro Moura added the comment: Sorry, here it is the patch. -- keywords: +patch Added file: http://bugs.python.org/file27082/random.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15837

[issue15826] Increased test coverage of test_glob.py

2012-09-01 Thread Alessandro Moura
Alessandro Moura added the comment: test_bytes_glob_directory_with_trailing_slash already has a counterpart in the main class, but it is not easily handled by overriding self.glob and self.norm. Since it is only a single test, I just decided to override test_glob_directory_with_trailing_slash

[issue15826] Increased test coverage of test_glob.py

2012-09-01 Thread Alessandro Moura
Alessandro Moura added the comment: Im OK with the patch changes. ''' /home/rdmurray/python/p33/Lib/os.py:263: BytesWarning: Comparison between bytes and string if tail == curdir: # xxx/newdir/. exists if xxx/newdir exists /home/rdmurray/python/p33/Lib/glob.py:63: BytesWarning

[issue15845] Fixing some byte-to-string conversion warnings

2012-09-01 Thread Alessandro Moura
New submission from Alessandro Moura: This is related to issue 15826. When run with the -b option, some glob.py and os.py functions give warnings due to byte-to-string conversions: amoura@amoura-laptop:~/cpython$ ./python -b -c import glob; glob.glob(b'cover*/glob.cover') /home/amoura

[issue15826] Increased test coverage of test_glob.py

2012-08-31 Thread Alessandro Moura
Alessandro Moura added the comment: Agreed, here is the patch where this is done. -- Added file: http://bugs.python.org/file27078/test_glob.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15826

[issue15837] Added test to test_random.py testing Random.shuffle

2012-08-31 Thread Alessandro Moura
New submission from Alessandro Moura: Random.shuffle does not have a test in test_random.py; the attached patch adds this test. In addition, I rewrote the documentation string for Random.shuffle, which apparently did not reflect recent changes in the code and was inconsistent

[issue15826] Increased test coverage of test_glob.py

2012-08-30 Thread Alessandro Moura
New submission from Alessandro Moura: Hi, Here is a patch to increase test coverage of test_glob.py. I added tests where the glob patterns are of type bytes. The coverage (according to coverage.py) is now complete, except for what are clearly artefacts probably caused by the fact that glob

[issue14971] (unittest) loadTestsFromName does not work on method with a decorator

2012-05-31 Thread Alessandro Piccione
New submission from Alessandro Piccione alessandro.piccione...@gmail.com: Steps to reproduce the problem. 1. Create a module (ex. name it test) 2. Create a file in it (ex. mainTest.py) with a class (ex. MainTest) derived from TestCase. 3. Create a test method in that class, (ex. test_base

[issue11378] os.path.join when second starts with '/' (linux/unix)

2011-03-02 Thread Alessandro Forghieri
New submission from Alessandro Forghieri a...@orion.it: Observed behavior: os.path.join('/foo/bar', '/baz') '/baz' Expected behavior: should return '/foo/bar/baz' or (suboptimally) raise an exception. Why: Observed beahvior violates the minimal surprise principle and does not appear

[issue11378] os.path.join when second argument starts with '/' (linux/unix)

2011-03-02 Thread Alessandro Forghieri
Changes by Alessandro Forghieri a...@orion.it: -- title: os.path.join when second starts with '/' (linux/unix) - os.path.join when second argument starts with '/' (linux/unix) ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue11378] os.path.join when second argument starts with '/' (linux/unix)

2011-03-02 Thread Alessandro Forghieri
Alessandro Forghieri a...@orion.it added the comment: Documented it is, and change it may not, but I am still unconvinced. Anything that joins should (IMHO) preserve the leading stuff - this one throws it away - sometimes. Also I do believe a number of other languages take a different stance

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread Alessandro Roat
New submission from Alessandro Roat alexr...@gmail.com: A thread blocked on a recv or a recvfrom method on a UDP socket (waiting for a datagram) can not be unlocked calling a .close() from a different thread. This is in contrast with the standard C++/C behavior, where a close() on a socket

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread Alessandro Roat
Alessandro Roat alexr...@gmail.com added the comment: This is an example, test it with netcat (nc -u localhost ) on linux (ubuntu 9.10). Lauch it with python scriptname, a prompt will appear. Type start to launch the server, test the server sending UDP packets with netcat, the lenght