Alexander Belopolsky added the comment:
Raymond,
Did you mean to exclude unit test additions from your commit? See
issue10221-with-tests.diff.
--
___
Python tracker
<http://bugs.python.org/issue10
Alexander Belopolsky added the comment:
On Mon, Nov 1, 2010 at 2:13 PM, Raymond Hettinger
wrote:
..
>
> We don't usually test the content of error messages because they are not a
> guaranteed behavior.
>
I recall that when I asked about this on #python-dev, someone pointe
Alexander Belopolsky added the comment:
On Mon, Nov 1, 2010 at 2:09 PM, Antoine Pitrou wrote:
..
>> > Well, the problem is that the "appropriate test" is not easy to guess a
>> > priori, so it would
>> > be useful for the stdlib to provide the right tool f
Alexander Belopolsky added the comment:
On Mon, Nov 1, 2010 at 2:09 PM, Antoine Pitrou wrote:
..
> The problem is time.clock(), since it does two wildly different things
> depending on the OS.
> I would suggest to deprecate time.clock() at the same time as we add
> time.wallcloc
Alexander Belopolsky added the comment:
Éric,
I just wanted to link to a related discussion we had under issue 8983. See
msg107689.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue10
Alexander Belopolsky added the comment:
2010/11/1 Kristján Valur Jónsson :
..
> I put in the patch since it was quick to do, but I'll provoke a discussion
> on python-ideas for now.
I am looking forward to it. You may find reviewing the following
issues helpful for your case: #
New submission from Alexander Belopolsky :
Since after closing of issue #10199, docstrings in demo scripts are accessible
to pydoc, it is important to bring them up to date. For example,
turtledemo.wikipedia docstring contains a reference to nonexistent wikipedia1
and calls itself
Alexander Belopolsky added the comment:
I am attaching a patch that adds a hack that allows to run turtle doctests
using turtle.run_doctests() function. Running this function has revealed
numerous mistakes in doctests that are corrected in the patch.
The patch is against release27 branch
Alexander Belopolsky added the comment:
I think threading is a red herring here. The issue is really a duplicate of
#6639.
--
nosy: +belopolsky
status: open -> pending
superseder: -> turtle: _tkinter.TclError: invalid command name &quo
Alexander Belopolsky added the comment:
On a closer look at the first post, I see that there are two parts to the
issue. The first is indeed a duplicate of #6639, but the second is thread
related. I am attaching the OP's code in a script file for convenience.
Running ninja.py
New submission from Alexander Belopolsky :
In r84640, Raymond added TurtleShell to the cmd module documentation as an
example of a simple interpreter that can be written using that module. I
propose adding this code to turtle.py and make it runnable as python -m turtle.
--
components
New submission from Alexander Schmolck :
In certain cases a zero-width /Z match that should be replaced isn't.
An example might help:
re.compile('(?m)(?P[
\t]+\r*$)|(?P(?<=[^\n])\Z)').subn(lambda m:next('<'+k+'>' for
k,v in m.groupdict().items
Alexander Belopolsky added the comment:
On Fri, Nov 5, 2010 at 3:34 AM, Georg Brandl wrote:
..
> Why shouldn't global function doctests be runnable?
They should - I just couldn't figure out a better hack that would work
for both mathods and functions. Note that functions are
a
Alexander Belopolsky added the comment:
I don't think trace.diff is proposed for commit. I see it more as a supporting
file for diagnosing the problem.
I see two problems here:
1. Apparently OP's system opens files with encoding set to 'ascii' by default.
This is not th
Alexander Belopolsky added the comment:
On Fri, Nov 5, 2010 at 1:18 PM, Éric Araujo wrote:
..
> nosy: +eric.araujo
Raymond has already rejected and closed this request, so I am not
optimistic that anything will happen here. (I also understand that he
feels rather strongly about this beca
Changes by Alexander Belopolsky :
--
nosy: +gregorlingl
___
Python tracker
<http://bugs.python.org/issue10317>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
I wish I could test this patch but on OSX I get
$ ./configure --without-threads
$ make
Traceback (most recent call last):
File "/Users/sasha/Work/python-svn/py3k/Lib/site.py", line 519, in
main()
File "/Users/sasha/Work/pyth
Alexander Belopolsky added the comment:
dummy_threading feels a bit like black magic to me. What do you think about
something like issue10330.diff attached.
--
keywords: +patch
Added file: http://bugs.python.org/file19512/issue10330.diff
Alexander Belopolsky added the comment:
I'll commit tonight. BTW, on a without-threads build:
>>> import dummy_threading
>>> dummy_threading.settrace
>>> dummy_threading.settrace.__module__
'threading'
In other words, dummy_threading.settrace is alw
Alexander Belopolsky added the comment:
Committed in r86229, merged in r86231 (3.1) and r86233 (2.7).
--
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Alexander Belopolsky added the comment:
On Fri, Nov 5, 2010 at 2:43 PM, Antoine Pitrou wrote:
..
> Who are the consumers of the trace files? Is there a formal specification
> or is Python the primary consumer?
The trace files contain annotated python source code. There is no
Alexander Belopolsky added the comment:
Attached patch, issue10329.diff fixes the issue by setting the encoding of the
coverage file to that of the source file. I am not 100% happy with this patch
for the following reasons:
1. It opens the source file one more time. This is probably
New submission from Alexander Belopolsky :
Please run attached zip archive as a python script. Note that the problem is
not specific for using __main__.py - any module that comes from a zip archive
or loaded by a custom loader would show the same bug.
$ unzip -l test.zip
Archive: test.zip
Alexander Belopolsky added the comment:
+1 on adding the function.
Note that it is useful for opening any text file with an encoding cookie, not
only python source code, so "tokenize.open()" sounds attractive.
Once we are at it, I would like to factor out and document code that ext
Alexander Belopolsky added the comment:
On Sat, Nov 6, 2010 at 12:15 PM, Éric Araujo wrote:
..
>> so "tokenize.open()" sounds attractive.
> Agreed, even though the docstring of tokenize does talk about Python code.
I still like "tokenize.open()" more, but fo
Alexander Belopolsky added the comment:
Reopening as a reminder to add a unit test for this case.
--
stage: needs patch -> unit test needed
status: closed -> open
___
Python tracker
<http://bugs.python.org/i
Alexander Belopolsky added the comment:
I am attaching a "proof of concept" patch. The trace code is in a dire need of
restructuring to eliminate repeated reading of source files.
--
keywords: +needs review, patch
nosy: +eli.bendersky, terry.reedy
stage: unit test neede
Changes by Alexander Belopolsky :
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue10342>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
On Sun, Nov 7, 2010 at 8:47 PM, STINNER Victor wrote:
>
> STINNER Victor added the comment:
>
> + try:
> + with open(filename, 'rb') as fp:
> + encoding, _ = tokenize
Alexander Belopolsky added the comment:
On Sun, Nov 7, 2010 at 8:59 PM, Brett Cannon wrote:
> .. I don't quite see the point of the get_source call as it isn't returned or
> used.
It is passed to find_docstrings() to produce the &
Alexander Belopolsky added the comment:
On Sun, Nov 7, 2010 at 4:24 AM, STINNER Victor wrote:
..
> Ok, the new patch (tokenize_open-2.patch) uses tokenize.open() name and adds a
> test for BOM without coding cookie (test utf-8-sig encoding).
Here are my comments on the new patch:
1.
Alexander Belopolsky added the comment:
Changing the title to make the latest choice of function name more visible.
--
stage: -> patch review
title: tokenize.open_python(): open a Python file with the right encoding ->
tokenize.open(): open a Python file with the right encodin
Alexander Belopolsky added the comment:
As discussed on #python-dev, building 3.x documentation using python3.x will
require Sphinx 1.1 which will not be released in time for 3.2.
I am adding #10225 as a dependency because I feel that fixing actual errors in
ReST doctests is more important
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue10366>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alexander Belopolsky :
Following python-dev discussion on the issue, I would like to propose
trace-deprecations.diff patch for review.
I would like to make these changes before turning to issue10342 which will
require changing many of these APIs that take a source path to
Alexander Belopolsky added the comment:
>From IRC (raymondh):
in the turtle docs, can you add a quick start guide (like we have in the
unittest docs)
the turtle docs have grown into a small book and is intimidating to get started
with.
--
nosy: +rhettin
Changes by Alexander Belopolsky :
--
title: Improve 24.5. turtle doc -> Improve turtle module documentation
___
Python tracker
<http://bugs.python.org/iss
Changes by Alexander Belopolsky :
--
dependencies: +Deprecate trace module undocumented API
___
Python tracker
<http://bugs.python.org/issue10342>
___
___
Pytho
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file19558/turtle-star.png
___
Python tracker
<http://bugs.python.org/issue7061>
___
___
Python-bug
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file19559/turtle-sidebar-screenshot.png
___
Python tracker
<http://bugs.python.org/issue7061>
___
___
Alexander Belopolsky added the comment:
As a follow-up to Raymond's suggestion, I am attaching a patch that will add a
sidebar to the introduction section of the turtle documentation section. While
it is not common to include screenshots in python documentation, I think it is
Alexander Belopolsky added the comment:
On Sat, Oct 30, 2010 at 8:27 PM, Terry J. Reedy wrote:
..
> Sections about 2.x changes should not be in 3.x docs.
I agree. Neither "Changes since Python 2.6" nor "Changes since Python 2.6"
belong in this section. The first be
Alexander Belopolsky added the comment:
I would like to add my +1 to Eric's msg120485 above. What I really find
puzzling is why some scripts in Tools/ have hashbangs, but don't have execute
permission.
Tools/scripts/cleanfuture.py
Tools/scripts/combinerefs.py
Tools/scripts/db
Alexander Belopolsky added the comment:
On Tue, Nov 9, 2010 at 11:45 AM, Raymond Hettinger
wrote:
..
> Raymond Hettinger added the comment:
>
> The mini change log is harmless. I would leave it as is.
It is not entirely harmless. First, it occupies valuable easy to
scroll to en
Changes by Alexander Belopolsky :
--
nosy: +brett.cannon, eli.bendersky, terry.reedy
___
Python tracker
<http://bugs.python.org/issue10371>
___
___
Python-bug
Alexander Belopolsky added the comment:
Committed a slightly modified turtle-star-sidebar.diff in revision 86364. Note
that I've included both pdf and postscript files in case someone would want to
run postscript through a better distiller than the OSX preview that I used.
The posts
New submission from Alexander Belopolsky :
I was going to commit this patch, but decided to ask for a second opinion. I
think module names in section titles should be marked up with :mod:.
--
assignee: belopolsky
components: Documentation
files: subprocess-doc.diff
keywords: patch
Alexander Belopolsky added the comment:
I am attaching a patch that seems to fix the issue. Note that I considered
fixing the problem in parsetok.c where offset is originally computed, but this
is part of pgen which has to be compiled without unicode support.
The test case suitable to be
New submission from Alexander Belopolsky :
>>> ¡™£¢∞§¶•ªº
File "", line 1
¡™£¢∞§¶•ªº
^
SyntaxError: invalid character in identifier
It looks like strlen() is used instead of number of characters in the decoded
string.
--
component
Changes by Alexander Belopolsky :
--
nosy: +loewis
___
Python tracker
<http://bugs.python.org/issue10382>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
dependencies: +Command line error marker misplaced on unicode entry
___
Python tracker
<http://bugs.python.org/issue10
Changes by Alexander Belopolsky :
--
nosy: +ezio.melotti, haypo, lemburg
___
Python tracker
<http://bugs.python.org/issue10382>
___
___
Python-bugs-list mailin
Alexander Belopolsky added the comment:
On Sun, Oct 31, 2010 at 8:00 PM, Éric Araujo wrote:
..
> “Python” is lower-cased only when referring to the executable (as a
> file) itself. When talking about the language, the implementation or
> the VM in an abstract way (not a file), It t
New submission from Alexander Belopolsky :
The token module appears to be designed to be used with import *. In fact it
is used this way in the tokenize module. However it does not define __all__
and as a result, from token import * leaks symbol "main":
>>> import tokeniz
New submission from Alexander Belopolsky :
With timezone class added to datetime module, C API should be extended to at
the minimum support efficient creation of timezone instances and access to the
singleton UTC instance.
I am not sure whether PyDateTime_TimeZone details should be exposed in
New submission from Alexander Belopolsky :
Can you see the error in the following?
>>> invalid = 5
File "", line 1
invalid = 5
^
SyntaxError: invalid character in identifier
The problem is that an invisible space character crept into the identifier:
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue7434>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Committed revision 86410.
--
___
Python tracker
<http://bugs.python.org/issue10386>
___
___
Python-bugs-list mailin
Changes by Alexander Belopolsky :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10386>
___
___
Python-bugs-list mailing list
Un
New submission from Alexander Belopolsky :
Following a brief and consensual discussion on d...@python and #python-dev, I
am proposing attached patch for the Python documentation style guide.
--
assignee: belopolsky
components: Documentation
files: style-guide.diff
keywords: patch
Alexander Belopolsky added the comment:
The new patch, issue10389.diff, addresses Éric's comments and adds an entry for
"reST".
--
Added file: http://bugs.python.org/file19571/issue10389.diff
___
Python tracker
<http://bugs.pyt
Alexander Belopolsky added the comment:
Committed in revision 86417.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10389>
___
_
Alexander Belopolsky added the comment:
haypo> See also #2382: I wrote patches two years ago for this issue.
Yes, this is the same issue. I don't want to close this as a duplicate because
#2382 contains a much more ambitious set of patches. What I am trying to
achieve here is si
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file19573/issue10382a.diff
___
Python tracker
<http://bugs.python.org/issue10382>
___
___
Python-bug
Alexander Belopolsky added the comment:
On Fri, Nov 12, 2010 at 12:54 PM, Terry J. Reedy wrote:
..
>>What is the best way to pass around source code?
>> - file-like objects, line iterators, readline-like function?
>
> Line iterator (list of lines) as returned by open().r
Alexander Belopolsky added the comment:
On Fri, Nov 12, 2010 at 2:09 PM, Terry J. Reedy wrote:
..
> 1. Does the markup make any visual difference?
It does on my browser. (I wouldn't have noticed it otherwise.) See
http://docs.python.org/dev/contents.html
> 2. Does the markup
New submission from Alexander Belopolsky :
Attached patch updates some comments in unicode.h mostly reflecting the fact
that the default encoding is now unconditionally UTF-8.
--
assignee: belopolsky
components: Documentation, Interpreter Core
files: unicode-comments.diff
keywords
Alexander Belopolsky added the comment:
+1
Note that in Python, semi-open intervals are favored, but specifying the last
hour of the day is awkward when using datetime (as OP mentioned) and impossible
using just time. Using closed intervals is not a good work-around in many
cases because
Alexander Belopolsky added the comment:
Committed in revision 86478. Should this go in 3.1? This is a comments-only
change, so it is fairly safe and merging may help future maintenance. On the
other hand, it is very unlikely that the header file will need to be changed in
maintenance
New submission from Alexander Belopolsky :
As discussed in "Breaking undocumented API" thread [1] on python-dev, a
definition of "public names" is buried deep in the language reference manual:
"""
The public names defined by a module are determined by ch
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue10433>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
assignee: -> d...@python
components: +Documentation, Macintosh
nosy: +d...@python
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/issu
Alexander Belopolsky added the comment:
Michael Foord suggested adding the following to developer documentation such as
PEP 8. [1] I am not sure PEP 8 is the right place for it. In my opinion, PEP 8
is mostly about stylistic choices that don't have a major impact on the users.
In
Alexander Belopolsky added the comment:
Committed to 3.1 branch in revision 86481.
--
status: pending -> closed
type: -> behavior
versions: +Python 3.1
___
Python tracker
<http://bugs.python.org/i
New submission from Alexander Belopolsky :
The following C-APIs are only documented in comments inside unicode.h:
PyUnicode_GetMax
PyUnicode_Resize
PyUnicode_InternImmortal
PyUnicode_FromOrdinal
PyUnicode_GetDefaultEncoding
PyUnicode_AsDecodedObject
PyUnicode_AsDecodedUnicode
Alexander Belopolsky added the comment:
There are more undocumented functions in unicode.h. It makes sense to fix all
of them in one patch. Closing this as superseded by #10435.
--
nosy: +belopolsky
resolution: -> duplicate
status: open -> closed
superseder: -> Document
Changes by Alexander Belopolsky :
--
components: +Interpreter Core
stage: -> needs patch
versions: +Python 3.3 -Python 3.0, Python 3.1
___
Python tracker
<http://bugs.python.org/iss
Alexander Belopolsky added the comment:
On Tue, Nov 16, 2010 at 10:38 AM, M.-A. Lemburg wrote:
> Alexander Belopolsky wrote:
..
>> I also have a similar question about C API. Here, in absence of
>> __all__, the answer should be clear: all symbols in public header
>> fi
Changes by Alexander Belopolsky :
--
nosy: +haypo, lemburg, loewis
___
Python tracker
<http://bugs.python.org/issue10435>
___
___
Python-bugs-list mailin
Alexander Belopolsky added the comment:
PyUnicode_AsDecodedObject() and PyUnicode_AsDecodedUnicode() appear to be
broken as well: both start with a PyUnicode_Check(unicode) and then pass
unicode to PyCodec_Decode() which expects bytes
Alexander Belopolsky added the comment:
On Tue, Nov 16, 2010 at 5:54 PM, Marc-Andre Lemburg
wrote:
>
> Marc-Andre Lemburg added the comment:
>
> Please note that PyCodec_Encode()/PyCodec_Decode() will return whatever the
> codec returns for these operations.
>
> Th
Alexander Belopolsky added the comment:
Attached patch documents all previously undocumented unicode C API functions.
Note that for the PyUnicode_As{En,De}codedObject() and
PyUnicode_As{En,De}DecodedUnicode() functions I attempted to capture what they
are supposed to do rather than what the
New submission from Alexander Belopolsky :
Python Codec Registry and support functions are well documented in codecs.h
header file. It should be easy to convert that to reST.
--
assignee: d...@python
components: Documentation
keywords: easy
messages: 121329
nosy: belopolsky, d
Alexander Belopolsky added the comment:
On Tue, Nov 16, 2010 at 7:19 PM, Marc-Andre Lemburg
wrote:
..
>> * Decoding converts a bytes object encoded using a particular
>> character set encoding to a string object.
>> """
>> http://docs.python.org/d
Alexander Belopolsky added the comment:
> I agree and will handle this in #10435 because codecs.h
s/#10435/#10439/
--
___
Python tracker
<http://bugs.python.org/issu
Alexander Belopolsky added the comment:
It looks like I misunderstood what PyUnicode_As{En,De}codedObject() and
PyUnicode_As{En,De}codedUnicode() functions are designed to do. Attaching a
corrected patch, issue10435a.diff.
--
Added file: http://bugs.python.org/file19622
New submission from Alexander Belopolsky :
$ pydoc3.1 pydoc
Help on module pydoc:
NAME
pydoc - Generate Python documentation in HTML or text for interactive use.
FILE
/opt/local/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pydoc.py
MODULE DOCS
http
Changes by Alexander Belopolsky :
--
nosy: +d...@python
___
Python tracker
<http://bugs.python.org/issue10446>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue11286>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
I am not sure PyUnicode_Decode() should treat NULL as an empty string.
Decoding empty string is wasteful and if the caller knows that the string is
empty, it should skip decoding because the result is empty. Providing *two*
ways to invoke expensive
Alexander Belopolsky added the comment:
Antoine is right, my patch is only of "discussion" quality and if my approach
gets support, I will produce a more polished patch.
While I am fairly certain that this bug should be fixed where it was
introduced, namely in the _pickle module
Alexander Belopolsky added the comment:
On Wed, Feb 23, 2011 at 10:22 AM, Antoine Pitrou wrote:
..
> Well, a theoretical argument could be made that some codec could return
> a non-empty string when asked to decode an empty bytestring, but I'm not
> sure it has much practical w
Changes by Alexander Belopolsky :
--
assignee: -> belopolsky
___
Python tracker
<http://bugs.python.org/issue11286>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
I am attaching a new version of issue11286.diff which fixes the issue by
removing special handling of n == 0 case from _Unpickler_Read(). Note that
_Unpickler_Read() (formerly known as unpickler_read()) only started to return
null pointer instead of a
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file20856/issue11286.diff
___
Python tracker
<http://bugs.python.org/issue11286>
___
___
Python-bug
New submission from Alexander Belopolsky :
$ ./python.exe -m timeit "b'x'.decode('latin1')"
10 loops, best of 3: 2.57 usec per loop
$ ./python.exe -m timeit "b'x'.decode('latin-1')"
100 loops, best of 3: 0.336 usec per l
Alexander Belopolsky added the comment:
In issue11303.diff, I add similar optimization for encode('latin1') and for
'utf8' variant of utf-8. I don't think dash-less variants of utf-16 and utf-32
are common enough to justify special-casing.
--
Added fil
Alexander Belopolsky added the comment:
What is the status of this. Status=open and Resolution=rejected contradict
each other.
This discussion is relevant for issue11303. Currently alias lookup incurs huge
performance penalty in some cases.
--
nosy: +belopolsky
Alexander Belopolsky added the comment:
> Accepting all common forms for
> encoding names means that you can usually give Python an encoding name
> from, e.g. a HTML page, or any other file or system that specifies an
> encoding.
I don't buy this argument. Running attache
Alexander Belopolsky added the comment:
Ezio and I discussed on IRC the implementation of alias lookup and neither of
us was able to point out to the function that strips non-alphanumeric
characters from encoding names.
It turns out that there are three "normalize" function
301 - 400 of 4095 matches
Mail list logo