Serhiy Storchaka added the comment:
Patch updated. Tests added.
I am not sure tests will be passed on Windows.
--
Added file: http://bugs.python.org/file28224/pindent_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Serhiy Storchaka added the comment:
Actually without next['with'] = 'end' with support is broken. See
issue15539.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6912
Serhiy Storchaka added the comment:
Possible this is a duplicate of issue16601.
--
nosy: +serhiy.storchaka
versions: -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16631
Serhiy Storchaka added the comment:
Yes, I also noticed this. However, int(x=0) - integer is not enough. The
right calltip should be int(x=0) - integer\nint(x, base=10) - integer.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
OK. Then those issues are just related.
--
nosy: +lars.gustaebel
stage: - patch review
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16631
Serhiy Storchaka added the comment:
Related issue: issue16631.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16601
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +lars.gustaebel
versions: +Python 3.2, Python 3.3, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16601
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16601
___
___
Python-bugs
Serhiy Storchaka added the comment:
Here is a patch, which adds multiline calltips support.
--
Added file: http://bugs.python.org/file28235/idle_calltips_multiline.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16629
Serhiy Storchaka added the comment:
1. rpcclt.remotecall also can raise an exception.
2. I think fetch_tip() should return '' in case of exception as for
non-existent arguments or for non-callables. You can add tests for this cases
too.
3. break is a reserved word. It's not a good name
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16629
___
___
Python-bugs
Serhiy Storchaka added the comment:
Done. Here is an updated patch.
--
Added file: http://bugs.python.org/file28237/idle_calltips_multiline_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16629
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28235/idle_calltips_multiline.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16629
Serhiy Storchaka added the comment:
Since you iterated to the end any iterators are independent (they are just
indices in the list of members).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16631
Serhiy Storchaka added the comment:
Confirm for 3.x.
See also issue8260, issue12446, and issue14475.
--
components: +IO, Unicode
nosy: +ezio.melotti, serhiy.storchaka
stage: - needs patch
versions: +Python 3.2, Python 3.3, Python 3.4
___
Python
Serhiy Storchaka added the comment:
The number of lines in the return value of get_argspec should be limited,
otherwise the calltip window can become too large.
Calltip limited by first empty line. But I agree, some reasonable hard limit
(say 10 lines) should be.
I would separate
Serhiy Storchaka added the comment:
Patch updated. Added hard limit (10) for number of calltip lines.
--
Added file: http://bugs.python.org/file28246/idle_calltips_multiline_3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28237/idle_calltips_multiline_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16629
Serhiy Storchaka added the comment:
I don't think it was ever a requirement of docstrings that their signature
fit on one line or that they render fully in IDLE.
I think this is a requirement of IDLE.
I still think that the rendering of multi-line signatures should be
considered
Serhiy Storchaka added the comment:
I think the patch is wrong or is not optimal for case when chars is -1, but
size is not.
If we want to read all data in any case, then we should call self.stream.read()
without argument if chars 0 or size 0.
If we want to read no more than size bytes
Serhiy Storchaka added the comment:
Yes, this is obviously a duplicate of issue8260.
--
nosy: +serhiy.storchaka
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - When I use codecs.open(...) and f.readline() follow up by
f.read() return bad
Serhiy Storchaka added the comment:
This is obviously a duplicate of issue8260 and issue12446.
--
nosy: +serhiy.storchaka
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - When I use codecs.open(...) and f.readline() follow up by
f.read() return
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: needs patch - committed/rejected
status: open - closed
superseder: - When I use codecs.open(...) and f.readline() follow up by
f.read() return bad result
___
Python tracker rep
Serhiy Storchaka added the comment:
As showed in issue12446, issue14475 and issue16636 there are different methods
to reproduce this bug (read(size, chars) + readlines(), readline() +
readlines()). All this cases should be tested.
--
___
Python
Serhiy Storchaka added the comment:
This is a beautiful patch. LGTM.
However it should be tested on Windows. I'm not sure that reading not closed
file in different process works on Windows.
Zack, can you please submit a contributor form?
http://python.org/psf/contrib/contrib-form/
http
Serhiy Storchaka added the comment:
Here is a patch moved from issue16629.
I think this is a bugfix, because current behavior is wrong. Many functions
(i.e. int, str, list, dict) have multiline signatures and IDLE shows only first
line in a tip. I.e. int(x=0) - integer showed for int
Serhiy Storchaka added the comment:
I think we should add empty lines after signatures in all docstrings where it
needed (i.e. for super()).
Here is a command which shows calltips for all builtins:
./python -c from idlelib.CallTips import get_argspec, get_entity; import
builtins
for name
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file27826/sched_unblock_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16165
Serhiy Storchaka added the comment:
Oh, I submitted wrong patch (it contained unrelated changes). Here is a right
one.
--
Added file: http://bugs.python.org/file28254/sched_unblock_3.patch
___
Python tracker rep...@bugs.python.org
http
New submission from Serhiy Storchaka:
In additional to issue16165 I think that sched.scheduler runs more code under a
lock than needed. The proposed patch moves this code outside a lock. This
unlikely a bug, may be only small enhancement and cleanup.
--
components: Library (Lib)
files
New submission from Serhiy Storchaka:
Example:
import sched
s=sched.scheduler()
s.enter(10, 1, print)
Event(time=7452.676787873, priority=1, action=built-in function print,
argument=[], kwargs={})
next(s.queue).argument.append(spam)
s.enter(5, 1, print)
Event(time=7473.326011725, priority
Changes by Serhiy Storchaka storch...@gmail.com:
--
title: sched.scheduler.enter arguments should be modifiable -
sched.scheduler.enter arguments should not be modifiable
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16641
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28256/sched_nonmodifiable_args.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16641
Serhiy Storchaka added the comment:
Sorry, wrong patch.
--
Added file: http://bugs.python.org/file28257/sched_nonmodifiable_args.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16641
New submission from Serhiy Storchaka:
Here is a patch which adds missed mentions of kwargs named tuple parameter.
--
assignee: docs@python
components: Documentation
files: sched_docs_kwargs.patch
keywords: patch
messages: 177154
nosy: docs@python, giampaolo.rodola, serhiy.storchaka
New submission from Serhiy Storchaka:
sched.scheduler() prefers to use time.monotonic as a default value for timefunc
parameter, and time.time used only as a fallback. But time.time documented as a
default value.
--
assignee: docs@python
components: Documentation
messages: 177155
nosy
New submission from Serhiy Storchaka:
Test ContextManagerTests.test_invalid_args() in file
Lib/test/test_subprocess.py contains code which has no sense. When Popen() fail
then this code will not reachable. When Popen() success then c.exception will
not assigned.
Here is a patch with right
New submission from Serhiy Storchaka:
Test test_extract_hardlink() in Lib/test/test_tarfile.py ran 4 times. First
time (uncompressed tarfile) it extract symbolic and hard links successfully,
but in other 3 times (gzipped, bzipped and lzma'ed tarfile) extracting fails
becouse this links
New submission from Serhiy Storchaka:
In FTP.makeport() a socket error catched and saved but then raised a new error
with saved error as argument.
Here is a patch which reraises an original error.
--
components: Library (Lib)
files: ftplib_makeport_raise_err.patch
keywords: patch
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28262/ftplib_makeport_raise_err.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16646
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file28263/ftplib_makeport_raise_err.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16646
New submission from Serhiy Storchaka:
In LMTP.connect() a socket error catched and saved but then raised a new error
with saved error as argument.
Here is a patch which reraises an original error.
--
components: Library (Lib)
files: smtplib_LMTP_connect_raise_err.patch
keywords: patch
Serhiy Storchaka added the comment:
Right now I'm working on a patch. ;) A pack of issues were produced in process.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16648
New submission from Serhiy Storchaka:
As noted in Popen._internal_poll() docstring this method cannot reference
anything outside of the local scope. However it references errno.ECHILD. The
proposed patch fixes this.
Is it good that Popen._handle_exitstatus() references building
Serhiy Storchaka added the comment:
I found one bug and add some nitpicks and optimization suggestion on Rietveld.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Serhiy Storchaka added the comment:
However Python doesn't work with bytes filenames (I don't think this is a bug).
The proposed patch allows unicode filenames be used in SAX parser.
--
keywords: +patch
nosy: +serhiy.storchaka
stage: - patch review
Added file: http://bugs.python.org
Serhiy Storchaka added the comment:
Patch updated. It can be simpler.
--
Added file:
http://bugs.python.org/file28269/smtplib_LMTP_connect_raise_err_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16647
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file:
http://bugs.python.org/file28264/smtplib_LMTP_connect_raise_err.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16647
Serhiy Storchaka added the comment:
I'm just asking if this is a bug. If using building exceptions is safe, then we
can get rid of _os_error and _ECHILD in 3.3+, using OSError and
ChildProcessError instead.
--
___
Python tracker rep
Serhiy Storchaka added the comment:
you can just stick if not output: continue before it.
And then hang. Because d.unconsumed_tail is not empty and no new data will be
read.
Why is this necessary? If unconsumed_tail is b'', then there's no need to
prepend it (and the concatenation would
Serhiy Storchaka added the comment:
array
audioop
binascii
random
re
struct
xml.parsers.expat
cjkcodecs
zlib, bz2, lzma and crypts also can be implemented in pure Python.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http
Serhiy Storchaka added the comment:
Thank you, Hynek, for review and committing.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
Serhiy Storchaka added the comment:
Thank you, Hynek, for review and committing.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
Changes by Serhiy Storchaka storch...@gmail.com:
--
Removed message: http://bugs.python.org/msg177269
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file:
http://bugs.python.org/file28260/test_tarfile_test_extract_hardlink.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16645
Changes by Serhiy Storchaka storch...@gmail.com:
Added file:
http://bugs.python.org/file28275/test_tarfile_test_extract_hardlink.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16645
Serhiy Storchaka added the comment:
It is reproduced on 3.x?
--
nosy: +serhiy.storchaka
type: - behavior
versions: -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16656
Changes by Serhiy Storchaka storch...@gmail.com:
--
Removed message: http://bugs.python.org/msg177278
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16656
Serhiy Storchaka added the comment:
Is it reproduced on 3.x?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16656
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
So expat doesn't count as that literally wraps the expat library.
XML parser can be implemented in pure Python. There are a lot of XML parsers
implemented in different programming languages.
Random
also requires accessing the system randomization
New submission from Serhiy Storchaka:
C implemented part of random module does not depend on any specific C level
abilities. Here is a patch which implements this part on pure Python. May be
this is not a best implementation. And I don't know how write tests for both
implementations
Serhiy Storchaka added the comment:
Patch updated. Tests now test both implementation. Thank Ezio for tip.
--
Added file: http://bugs.python.org/file28279/random_pure_python_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Changes by Serhiy Storchaka storch...@gmail.com:
--
dependencies: +Pure Python implementation of random
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16651
Serhiy Storchaka added the comment:
I wonder whether it would make sense to use an array to hold the MT state,
for a closer match with the C code.
I don't think it makes sense. The algorithm is same and list is more natural
for Python. Also arrays a little slower than lists, but it doesn't
Serhiy Storchaka added the comment:
What are the results of os.listdir(b'.') and os.listdir(u'.') on Python 2.7 and
Python 3.3+?
What are the results of os.stat(b'Русское имя') and os.stat(b'Русское имя') on
Python 2.7 and Python 3.3+?
What are the results of sys.getdefaultencoding
Serhiy Storchaka added the comment:
Yes, I used test_heapq and test_decimal as an example.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16659
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28278/random_pure_python.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16659
Serhiy Storchaka added the comment:
My guess is that your unicode issue is issue 1602, which is non-trivial to
solve.
In such case the output will be something like:
['English name', '']
[]
[]
--
___
Python tracker rep...@bugs.python.org
http
Serhiy Storchaka added the comment:
See also issue16618.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16664
Serhiy Storchaka added the comment:
Patch updated. Thanks Amaury for nits.
--
Added file: http://bugs.python.org/file28282/sched_nonmodifiable_args_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16641
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file28283/random_pure_python_3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16659
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28279/random_pure_python_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16659
Serhiy Storchaka added the comment:
Issue15861 has a more general patch which fixes also this issue.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11290
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28011/tkinter_quoting_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15861
Serhiy Storchaka added the comment:
Patch updated. Added additional tests for ttk.Combobox (see issue11290).
--
Added file: http://bugs.python.org/file28286/tkinter_quoting_3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Serhiy Storchaka added the comment:
Patch for 2.7 added.
--
Added file: http://bugs.python.org/file28287/tkinter_quoting_3-2.7.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15861
Changes by Serhiy Storchaka storch...@gmail.com:
--
superseder: - ttk.Treeview unmatched open brace in list
versions: +Python 2.7, Python 3.2, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11290
Serhiy Storchaka added the comment:
Ezra's patch is working, but a little non-optimal.
However, I'm not sure, that it is right to extend a set of whitespace
characters. See comments at the top of the file.
Also this approach should be slower, especially for trivial case (no changes
Serhiy Storchaka added the comment:
Thank you, Anatoly, for report. I'll try to investigate this issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16656
Serhiy Storchaka added the comment:
Anatoly, can you please run the attached test?
--
Added file: http://bugs.python.org/file28291/test_unicode_fname.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16656
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file28293/test_unicode_fname.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16656
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28291/test_unicode_fname.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16656
New submission from Serhiy Storchaka:
Here are two patches which implementation two different interface for same
feature.
In first patch you can use *doc* and *field_docs* arguments to specify
namedtuple class docstring and field docstrings. For example:
Point = namedtuple('Point', 'x y
Changes by Serhiy Storchaka storch...@gmail.com:
Added file:
http://bugs.python.org/file28295/namedtuple_docstrings_tuples_seq.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16669
Serhiy Storchaka added the comment:
Patch updated. Comments and docstrings a little enhanced. Thanks Brett for
review.
Also Python implementation of core generator now is threadsafe (in particular
random() and getrandbits() methods) as its C implementation and its private
members now
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28296/random_pure_python_4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16659
Serhiy Storchaka added the comment:
Patch updated. One bug fixed.
Also I made some benchmarks. The pure Python random() about 100 times slower
and getrandbits(32) about 13 times slower than the C implementation.
--
Added file: http://bugs.python.org/file28303/random_pure_python_5
Serhiy Storchaka added the comment:
Yes, we can use inheritance trick/idiom to specify a class docstring. But there
are no way to specify attribute docstrings.
I encountered this when rewriting some C implemented code to Python.
PyStructSequence allows you to specify docstrings for a class
New submission from Serhiy Storchaka:
The proposed patch adds a fast patch for generating small integers (the most
common use case).
Microbenchmark:
$ ./python -m timeit -s import random; r=random.getrandbits; n=30
r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n)
Non patched: 4.27 usec per
Serhiy Storchaka added the comment:
Thanks, Anatoly. I see an actual bug. FindFirstFile and FindNextFile return
broken name if file unicode name can't be represented in current codepage.
I don't know what is perfect solution for this issue.
On 2.7 we can decode listdir() argument to unicode
New submission from Serhiy Storchaka:
The audioop module documentation says that functions works with Python strings.
This was right in 2.x, but in 3.x here should be bytes objects (actually the
functions accept strings too, but this is an implementation detail, meaningless
in general
Changes by Serhiy Storchaka storch...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file28312/audioop_docs_bytes.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16682
New submission from Serhiy Storchaka:
Functions in the audioop module documentation enumerated in alphabetic order.
Only one function out of order. Here is a patch that fixes this.
--
assignee: docs@python
components: Documentation
files: audioop_docs_resort.patch
keywords: patch
New submission from Serhiy Storchaka:
Inadvertently strings accepted as arguments of audioop functions. This is a
meaningless behavior and remnant of Python 2. We should drop string support.
--
components: Extension Modules
messages: 177477
nosy: serhiy.storchaka
priority: normal
Serhiy Storchaka added the comment:
Surrogateescape is for non-decodable names. Here we have a problem with
non-encodable names.
I know that naive approach with using only Unicode API inside is not work
because Windows use complex logic for filename encoding (for example dropping
diacritics
New submission from Serhiy Storchaka:
The audioop module has some issues with an overflow.
1. It uses post-checks for an integer overflow. This means using an undefined
behavior.
2. When the result truncated in case of overflow, -maxval used as minimal
value. But real minimum value is less
Serhiy Storchaka added the comment:
Patch contains unrelated changes.
Sorry, my fault.
Here is a cleaned patch.
--
Added file: http://bugs.python.org/file28314/glob_magic_in_drive.patch
___
Python tracker rep...@bugs.python.org
http
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28221/glob_magic_in_drive.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16626
Serhiy Storchaka added the comment:
What happens if you pass strings?
They are encoded with UTF-8. See 's#' and 's*' formats in PyArg_ParseTuple()
('y*' recommended for bytes).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Serhiy Storchaka added the comment:
Ah, I misunderstood your comment.
Ah, you misunderstood my comment right now.
So, listdir is returning the correct the filename, it's just that we can't
encode it to the console encoding.
listdir() returns already irremediably broken filename (all
1 - 100 of 25750 matches
Mail list logo