[issue21430] Document ssl.pending()

2014-05-13 Thread Alexey Gorshkov
Alexey Gorshkov added the comment: Ok. As https://docs.python.org/dev/library/ssl.html#notes-on-non-blocking-sockets says: "Calling select() tells you that the OS-level socket can be read from (or written to)", and here is situation: len(select([ssl_socket],[],[], 0.2)[0]) returns

[issue21430] Document ssl.pending()

2014-05-17 Thread Alexey Gorshkov
Alexey Gorshkov added the comment: >Issue #21430: additions to the description of non-blocking SSL sockets I do not see any mention of .pending() in Your commit. Is this some personal hate to subject? Are You going to document this method or not? Documenting it on line of text. If You

[issue16309] "PYTHONPATH=" different from no PYTHONPATH at all

2012-11-03 Thread Alexey Kachayev
Alexey Kachayev added the comment: Unit test added. pythonpath2.diff is included into issue16309.diff. -- nosy: +kachayev Added file: http://bugs.python.org/file27848/issue16309.diff ___ Python tracker <http://bugs.python.org/issue16

[issue7317] Display full tracebacks when an error occurs asynchronously

2012-11-03 Thread Alexey Kachayev
Alexey Kachayev added the comment: Updated test case for traceback printing, fixed test_cmd_line crashing with new ignored exception message formatting (test was based on regular expression). Patch is attached. -- nosy: +kachayev Added file: http://bugs.python.org/file27853/issue7317

[issue16469] Exceptions raised by Fraction() different from those raised by int()

2012-11-15 Thread Alexey Kachayev
Alexey Kachayev added the comment: Patch is attached for {float, Decimal} -> {int, Fraction} consistency (with ValueError and OverflowError). Test cases are changed as well. I can also change OverflowError to ValueError for all cases, but I'm not sure should I open for this separat

[issue16469] Exceptions raised by Fraction() different from those raised by int()

2012-11-15 Thread Alexey Kachayev
Alexey Kachayev added the comment: I also attached "full_issue" patch: change OverflowError to ValueError for all cases. -- Added file: http://bugs.python.org/file27991/full_issues16469.diff ___ Python tracker <http://bugs.python.o

[issue16469] Exceptions raised by Fraction() different from those raised by int()

2012-11-15 Thread Alexey Kachayev
Changes by Alexey Kachayev : Added file: http://bugs.python.org/file27992/full_issues16469_fixed.diff ___ Python tracker <http://bugs.python.org/issue16469> ___ ___ Pytho

[issue16483] Make int(float('inf')) raise ValueError rather than OverflowError.

2012-11-15 Thread Alexey Kachayev
Alexey Kachayev added the comment: Patch is attached (ported from full issue patch for issue 16469). -- keywords: +patch nosy: +kachayev Added file: http://bugs.python.org/file27993/issue16483.diff ___ Python tracker <http://bugs.python.

[issue16469] Exceptions raised by Fraction() different from those raised by int()

2012-11-15 Thread Alexey Kachayev
Alexey Kachayev added the comment: Ok, I think that ValueError is more appropriate and I have already attached adopted patch for issue 16483. -- ___ Python tracker <http://bugs.python.org/issue16

[issue16464] urllib.request: opener not resetting content-length

2012-11-17 Thread Alexey Kachayev
Alexey Kachayev added the comment: This is special case for more "general" problem. When request is executed with HTTP client and data is not None, it calculates content length and adds special header to request. Then one can change request.data attribute value, but header "Con

[issue16464] urllib.request: opener not resetting content-length

2012-11-22 Thread Alexey Kachayev
Alexey Kachayev added the comment: Fixed patch is attached. Documentation is updated. -- Added file: http://bugs.python.org/file28074/issue16464_fixed.diff ___ Python tracker <http://bugs.python.org/issue16

[issue14373] C implementation of functools.lru_cache

2012-12-19 Thread Alexey Kachayev
Alexey Kachayev added the comment: Updated patch with next points: * fix typedefs * python implementation works normally without C acceleration * test cases cover both python/c implementations * several style fixes in C module -- nosy: +kachayev Added file: http://bugs.python.org

[issue14373] C implementation of functools.lru_cache

2012-12-21 Thread Alexey Kachayev
Alexey Kachayev added the comment: Serhiy, thank you for review. Working further on fixes. -- ___ Python tracker <http://bugs.python.org/issue14373> ___ ___ Pytho

[issue14373] C implementation of functools.lru_cache

2012-12-21 Thread Alexey Kachayev
Alexey Kachayev added the comment: Fixed my previous patch according to all comments from review, except removing keyword arguments from lru_cache_new function. -- Added file: http://bugs.python.org/file28386/14373.v3.diff ___ Python tracker <h

[issue14373] C implementation of functools.lru_cache

2012-12-21 Thread Alexey Kachayev
Alexey Kachayev added the comment: Added additional Py_DECREF(s) for key and value. -- Added file: http://bugs.python.org/file28390/14373.v4.diff ___ Python tracker <http://bugs.python.org/issue14

[issue16774] Additional recipes for itertools docs

2012-12-24 Thread Alexey Kachayev
New submission from Alexey Kachayev: Additional recipes for itertools documentation (widespread functions in other programming languages): * drop * split-at * split-by -- assignee: docs@python components: Documentation files: itertools.doc.diff keywords: patch messages: 178098 nosy

[issue16774] Additional recipes for itertools docs

2012-12-25 Thread Alexey Kachayev
Alexey Kachayev added the comment: Added: * takelast * droplast -- Added file: http://bugs.python.org/file28433/itertools.doc.v2.diff ___ Python tracker <http://bugs.python.org/issue16

[issue14373] C implementation of functools.lru_cache

2012-12-30 Thread Alexey Kachayev
Alexey Kachayev added the comment: Thread-safe implementation for cache cleanup. -- Added file: http://bugs.python.org/file28490/14373.v7.diff ___ Python tracker <http://bugs.python.org/issue14

[issue14373] C implementation of functools.lru_cache

2012-12-30 Thread Alexey Kachayev
Alexey Kachayev added the comment: Updated diff with: * fix object leaks * tp_clear * additional test for maxsize < 0 I also reimplemented multithreading test (fixed error and added skip rule). But actually, I'm not sure that it's enough for ensuring thread-safety of clear o

[issue16774] Additional recipes for itertools docs

2013-01-18 Thread Alexey Kachayev
Alexey Kachayev added the comment: Updated patch with: * fix error in islice function name * made n=None default second argument for consume(iterator, n=None) cause it provides specific behavior when n is None which can be assumed as default for function -- Added file: http

[issue16774] Additional recipes for itertools docs

2013-01-19 Thread Alexey Kachayev
Alexey Kachayev added the comment: It's hard to evaluate how popular given recipes, but: * drop is opposite to take, so it's as popular as take * the same situation with splitat, splitby - it's one case of partition that's hard to write each time with enumerator (par

[issue19035] tokenize.generate_tokens treat '\f' symbol as the end of file (when reading in unicode)

2013-09-16 Thread Alexey Umnov
New submission from Alexey Umnov: I execute the following code on the attached file 'text.txt': import tokenize import codecs with open('text.txt', 'r') as f: reader = codecs.getreader('utf-8')(f) tokens = tokenize.generate_tokens(reader

[issue2931] optparse: various problems with unicode and gettext

2009-07-08 Thread Alexey Shamrin
Alexey Shamrin added the comment: More than a year passed since I reported this... Could someone suggest how to move this forward? If needed, I can try to improve patch, test or description of this issue. Should I, for example, split this into separate issues

[issue6414] struct module : processor endianness descriptions misleading

2009-07-09 Thread Alexey Shamrin
Alexey Shamrin added the comment: Good suggestions, Mark! We should do both, I think. I didn't know about sys.byteorder before your message ;-) Thanks for education! How about this: "Native byte order is big-endian or little-endian, depending on the host system. For example, Int

[issue6414] struct module : processor endianness descriptions misleading

2009-07-09 Thread Alexey Shamrin
Alexey Shamrin added the comment: Little style: "Native byte order is big-endian or little-endian, depending on the host system. For example, Intel x86 and AMD64 (x86-64) are little-endian; Motorola 68000 and PowerPC G5 are big-endian; ARM and DEC Alpha feature switchable endiannes

[issue2931] optparse: various problems with unicode and gettext

2009-07-09 Thread Alexey Shamrin
Changes by Alexey Shamrin : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue2931> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4319] optparse and non-ascii help strings

2009-07-09 Thread Alexey Shamrin
Alexey Shamrin added the comment: There's nothing to fix here, I think... There's no point in allowing arbitrary byte strings in help strings. Especially because Python 3 features unicode strings by default. IMHO, this issue should be closed. And see also #2931 for remaining i18n pro

[issue6658] typo in buffer api docs

2009-08-06 Thread Alexey Shamrin
New submission from Alexey Shamrin : Typo in PyObject_GetBuffer docs: "...handle all the complexibity..." Links: http://docs.python.org/c-api/buffer.html#buffer-related-functions http://docs.python.org/dev/c-api/buffer.html#buffer-related-functions http://docs.python.org/3.1/c-api/b

[issue6658] typo in buffer api docs

2009-08-06 Thread Alexey Shamrin
Alexey Shamrin added the comment: Well, there's another typo in buffer documentation (PyBuffer_Release): "This shouldd be called..." Only in 2.x series: http://docs.python.org/c-api/buffer.html#PyBuffer_Release http://docs.python.org/dev/c-api/buffer.html#P

[issue6659] buffer c-api: memoryview object documentation

2009-08-06 Thread Alexey Shamrin
New submission from Alexey Shamrin : "A memoryview object is an extended buffer object that could replace the buffer object (but doesn’t have to as that could be kept as a simple 1-d memoryview object)." Well, buffer object was dropped Python 3, wasn't it? http://docs.python.org

[issue6659] buffer c-api: memoryview object documentation

2009-08-07 Thread Alexey Shamrin
Alexey Shamrin added the comment: Antoine, it seems, this sentence was taken literally from PEP3118 (http://www.python.org/dev/peps/pep-3118/#new-c-api-calls-are-proposed). PEP authors discussed if __builtins__.buffer should be removed. I agree, old __builtins__.buffer should not be mentioned

[issue6663] re.findall does not always return a list of strings

2009-08-07 Thread Alexey Shamrin
Alexey Shamrin added the comment: You've made three groups with parentheses. Just drop them: >>> re.findall('-?\d+[.]\d+|-?\d+[.]?|-?[.]\d+', 'asdf6.77.33ff9') ['6.7', '7.33', '9'] Everything is according to documentation:

[issue3158] Doctest fails to find doctests in extension modules

2009-08-13 Thread Alexey Shamrin
Alexey Shamrin added the comment: I've added Tim Peters to the nosy list. Is there anyone else who should be considered as doctest maintainer? I've also checked further Python versions - a quick a look at latest doctest source shows that the problem is still there. There are some de

[issue6648] codecs documentation does not mention surrogateescape

2009-08-18 Thread Alexey Shamrin
Alexey Shamrin added the comment: Georg, it would also be nice to give a link to 'surrogateescape' information in os module [1]. Yes, you gave a link to PEP 383, but PEP harder to follow and more lengthy. [1]: http://docs.python.org/3.1/library/os.html#file-names-command-line-arg

[issue6722] collections.namedtuple: confusing example

2009-08-18 Thread Alexey Shamrin
New submission from Alexey Shamrin : Maybe it's just me, but it took me several attempts to understand namedtuple example in the documentation [1]. The problem is that the first example uses verbose=True. It's very unusual to get Python source as the output in Python shell. At first

[issue6722] collections.namedtuple: confusing example

2009-08-20 Thread Alexey Shamrin
Alexey Shamrin added the comment: Raymond, sorry if I wasn't clear. I'm fine with the API (haven't used it yet though, because I was stuck after skimming through its documentation). I suggest to make *first* example simple (without verbose=True) and to move an example with verb

[issue6722] collections.namedtuple: confusing example

2009-08-20 Thread Alexey Shamrin
Alexey Shamrin added the comment: Roundup broke formatting... I've attached a text file with the proposed example. -- Added file: http://bugs.python.org/file14747/namedtuple_doc_example.txt ___ Python tracker <http://bugs.python.org/i

[issue6337] multiprocessing module: Double close of sys.stdin - ID: 2811568

2009-06-24 Thread Alexey Akimov
New submission from Alexey Akimov : Double close of FD 0 when child process spawns its own child process. Bug causes wrong file descriptors to be closed. Bug affects only posix system. How to reproduce: >>> import multiprocessing as mp >>> def child(q): ... prin

[issue28896] Embeddable zip allows Windows registry to override module location

2016-12-07 Thread Alexey Izbyshev
New submission from Alexey Izbyshev: The docs claim: "... the embedded distribution is (almost) fully isolated from the user’s system, including environment variables, system registry settings, and installed packages." Via ProcessMonitor tool I've discovered that python.exe

[issue28896] Embeddable zip allows Windows registry to override module location

2016-12-08 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thanks to Steve and everyone for quick and decisive action! -- ___ Python tracker <http://bugs.python.org/issue28896> ___ ___

[issue29281] json.loads documentation missing "versionchanged" statement

2017-01-16 Thread Alexey Popravka
New submission from Alexey Popravka: json.loads function was changed in Python 3.6 to accept bytes and bytearrays, however documentation is missing `versionchanged` block describing this changes. -- assignee: docs@python components: Documentation messages: 285545 nosy: Alexey Popravka

[issue29326] Blank lines in ._pth file are not ignored

2017-01-27 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I've encountered this issue too. (FYI, the official 3.6.0 embeddable zip from https://www.python.org/downloads/windows/ does contain a blank line in its ._pth, so all its users get an invalid entry in sys.path). The patch is attached. I couldn't fi

[issue27154] Regression in file.writelines behavior

2016-05-29 Thread Alexey Borzenkov
New submission from Alexey Borzenkov: There's a regression in file.writelines behavior for binary files when writing unicode strings, which seems to have first appeared in Python 2.7.7. The problem is that when writing unicode strings the internal representation (UCS2 or UCS4) is wr

[issue27154] Regression in file.writelines behavior

2016-05-29 Thread Alexey Borzenkov
Alexey Borzenkov added the comment: Didn't need to bisect, it's very easy to find the problematic commit, since writelines doesn't change that often: https://hg.python.org/releases/2.7.11/rev/db842f730432 The old code was buggy in a sense that it always called PyObject_AsCha

[issue17631] inspect getsource does not display full text of lambda

2013-04-03 Thread Alexey Spiridonov
New submission from Alexey Spiridonov: This happens because the block search algorithm seems not to be handling lambda arguments correctly. $ cat x.py import inspect def a(y): print inspect.getsource(y) print inspect.getsourcelines(y) a( lambda x: x * 3

[issue23009] selectors.EpollSelector.select raises exception when nothing to select.

2014-12-08 Thread Alexey Poryadin
New submission from Alexey Poryadin: When is called `select`, but registered no one `fileobject` rise exception: ... polled = self._selector.select(timeout) File "/usr/lib/python3.4/selectors.py", line 424, in select fd_event_list = self._epoll.poll(timeout, max_ev)

[issue22140] "python-config --includes" returns a wrong path (double prefix)

2015-08-23 Thread Alexey Gorshkov
Alexey Gorshkov added the comment: I don't understand: Why python-config needs to seek "realpath"? Why python-config is trying to be smarter than one who starts ./configure script? As so, the right thing to this, is remove "smart" parts from python-config. But as fo

[issue25473] socket.recv() raises correct code with the misleading description 'BlockingIOError: [Errno 11] Resource temporarily unavailable'

2015-10-25 Thread Alexey Gorshkov
New submission from Alexey Gorshkov: (in continuation to bug https://bugs.python.org/issue25471 ) socket.recv() raises 'BlockingIOError: [Errno 11] Resource temporarily unavailable' in case, if setblocking(False) on socket returned by non-blocking socket's .accept() method and

[issue25471] socket.recv() blocks while it's gettimeout() returns 0.0

2015-10-25 Thread Alexey Gorshkov
New submission from Alexey Gorshkov: socket created with listening socket set to setblocking(False). gettimeout() of accept()-returned socket returns 0.0 , but recv() method blocks while client is connected and not sending any data. If client disconnects, socket returned by accept() starting

[issue25471] socket.recv() blocks while it's gettimeout() returns 0.0

2015-10-25 Thread Alexey Gorshkov
Alexey Gorshkov added the comment: telnet 127.0.0.1 9000 can be used as testing client -- ___ Python tracker <http://bugs.python.org/issue25471> ___ ___ Python-bug

[issue25471] socket.recv() blocks while it's gettimeout() returns 0.0

2015-10-25 Thread Alexey Gorshkov
Changes by Alexey Gorshkov : Added file: http://bugs.python.org/file40856/s1.py ___ Python tracker <http://bugs.python.org/issue25471> ___ ___ Python-bugs-list mailin

[issue25471] socket.recv() blocks while it's gettimeout() returns 0.0

2015-10-25 Thread Alexey Gorshkov
Changes by Alexey Gorshkov : Removed file: http://bugs.python.org/file40855/s1.py ___ Python tracker <http://bugs.python.org/issue25471> ___ ___ Python-bugs-list mailin

[issue25531] greenlet header file is missing inside virtualenv

2015-11-01 Thread Alexey Borzenkov
Alexey Borzenkov added the comment: Just wanted to clarify that greenlet.h is not missing in virtualenv, but headers seem to be installed in venv/include/site/python3.5, when only venv/include is considered for includes when building extensions. It is not specific to OSX and it is trivial to

[issue25531] greenlet header file is missing inside virtualenv

2015-11-02 Thread Alexey Borzenkov
Alexey Borzenkov added the comment: I have reproduced this problem on Linux with pyvenv, isn't that part of Python 3.5? -- ___ Python tracker <http://bugs.python.org/is

[issue25531] greenlet header file is missing inside virtualenv

2015-11-02 Thread Alexey Borzenkov
Alexey Borzenkov added the comment: I created a simple gist that can show the problem: https://gist.github.com/snaury/ea167713b1804ffbaf5a (testme.sh builds Python 3.5, creates a venv, install greenlet and tries to compile an extension

[issue26645] argparse prints help messages to stdout instead of stderr by default

2016-03-26 Thread Alexey Muranov
New submission from Alexey Muranov: I believe that printing help and usage messages to stdout is a design error. In stdout i expect to find the output of my program, not help or diagnostic messages. It is strange to see nothing printed on the screen (where stderr usually goes), and then to

[issue26645] argparse prints help messages to stdout instead of stderr by default

2016-03-26 Thread Alexey Muranov
Alexey Muranov added the comment: Thanks for the explanation, this makes sense. I did not notice that argparse outputs to stderr if command line arguments are wrong, i was probably wrong when said it prints error messages to stdout. I did not notice indeed that there were no `-h` option in

[issue26645] argparse prints help messages to stdout instead of stderr by default

2016-03-27 Thread Alexey Muranov
Alexey Muranov added the comment: My grep man page says --help Print a brief help message. but indeed there is no `--help` in usage message. Maybe this is a bug of the man page. Thanks for the explanation. -- ___ Python tracker <h

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Alexey Gorshkov
New submission from Alexey Gorshkov: example code is in attachment example URI is (for example): http://127.0.0.1:8005/тест -- components: Extension Modules files: t.py messages: 263819 nosy: animus priority: normal severity: normal status: open title: wsgiref.simple_server breaks

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Alexey Gorshkov
Changes by Alexey Gorshkov : Removed file: http://bugs.python.org/file42532/t.py ___ Python tracker <http://bugs.python.org/issue26808> ___ ___ Python-bugs-list mailin

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Alexey Gorshkov
Changes by Alexey Gorshkov : Added file: http://bugs.python.org/file42533/t.py ___ Python tracker <http://bugs.python.org/issue26808> ___ ___ Python-bugs-list mailin

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Alexey Gorshkov
Alexey Gorshkov added the comment: take a look at 'pi:' result, please. - attaching screenshot -- Added file: http://bugs.python.org/file42534/Screenshot from 2016-04-20 14-26-03.png ___ Python tracker <http://bugs.python.o

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Alexey Gorshkov
Alexey Gorshkov added the comment: also attaching same print output in console -- Added file: http://bugs.python.org/file42535/Screenshot from 2016-04-20 14-28-03.png ___ Python tracker <http://bugs.python.org/issue26

[issue16679] Add advice about non-ASCII wsgiref PATH_INFO

2016-04-20 Thread Alexey Gorshkov
Alexey Gorshkov added the comment: I'm from Issue 26808. I'd like to see some explanation on: how about QUERY_STRING value? Why only PATH_INFO is encoded in such a manner, but QUERY_STRING is passed without any changes and does not requires any latin-1 to utf-8 recodings? -

[issue15795] Zipfile.extractall does not preserve file permissions

2015-03-03 Thread Alexey Boriskin
Alexey Boriskin added the comment: I'm working on updating the patch to unify tarfile and zipfile interfaces and to restore owner/timestamp for zipfile -- ___ Python tracker <http://bugs.python.org/is

[issue23720] __del__() order is broken since 3.4.0

2015-03-20 Thread Alexey Kazantsev
Changes by Alexey Kazantsev : -- components: +Interpreter Core ___ Python tracker <http://bugs.python.org/issue23720> ___ ___ Python-bugs-list mailing list Unsub

[issue23720] __del__() order is broken since 3.4.0

2015-03-20 Thread Alexey Kazantsev
New submission from Alexey Kazantsev: Pythons prior to 3.4.0 print Vector! Device! while >=3.4.0 print Device! Vector! If we replace Main with Vector on line 21, the behavior becomes random: in 50% of all cases it prints the wrong sequence, in other 50% the right. Our team treats this a

[issue23720] __del__() order is broken since 3.4.0

2015-03-21 Thread Alexey Kazantsev
Alexey Kazantsev added the comment: Ok, even assuming that all module globals are in circular reference starting with python 3.4, here is another example without using the globals: Brief description: v holds reference to d a.v = v b.d = d Now when we form a circular reference a <->

[issue1134] Parsing a simple script eats all of your memory

2007-09-15 Thread Alexey Suda-Chen
Alexey Suda-Chen added the comment: --- tokenizer.c (revision 58161) +++ tokenizer.c (working copy) @@ -402,6 +402,8 @@ if (allocated) { Py_DECREF(bufobj); } + Py_XDECREF(tok->decoding_buffer); + tok->decoding_buffer = 0; return s; -

[issue1134] Parsing a simple script eats all of your memory

2007-09-16 Thread Alexey Suda-Chen
Alexey Suda-Chen added the comment: Oops, i see there are two bugs. Previously i have fixed multiline strings only. I think it will be: Index: tokenizer.c === --- tokenizer.c (revision 58161) +++ tokenizer.c (working copy

<    1   2   3   4   5