Ray.Allen added the comment:
The unittest of this patch.
--
Added file: http://bugs.python.org/file16815/issue_8297_test.py
___
Python tracker
<http://bugs.python.org/issue8
Ray.Allen added the comment:
Yes. I think if the argument object's reference count is increased because of
the exception traceback or other cases, it has nothing to do with the
PyObject_CallObject itself. Both of the Py_INCREF(arg) and Py_DECREF(arg) will
always run once throug
Ray.Allen added the comment:
Yes, I agree with you, this may be a bug?
Seemingly, the sysconfig.get_python_lib() should act just like the
get_python_inc() function, return "[prefix]/lib/python[version]" in case of
"python_build" flag is False, and "[prefix]/Lib&
Changes by Ray.Allen :
--
versions: +Python 2.7 -Python 3.2
___
Python tracker
<http://bugs.python.org/issue6087>
___
___
Python-bugs-list mailing list
Unsub
Changes by Ray.Allen :
--
versions: +Python 2.6, Python 3.2
___
Python tracker
<http://bugs.python.org/issue6087>
___
___
Python-bugs-list mailing list
Unsub
Changes by Ray.Allen :
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issue8376>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Ray.Allen added the comment:
I think there is not much ploblem. Please notice this sentence in the previous
paragraph in the toturial :
"Behind the scenes, the for statement calls iter() on the container object. The
function returns an iterator object that defines the method next()
New submission from Ray.Allen :
The shutil.copytree() function copies the whole tree recursively, and copy one
single regular file with copy2(). I hope it can be more powerful(), that is,
allow specifying a customerized copy function, rather than copy2(). To be
specific, add an optional
Ray.Allen added the comment:
Thanks for your help!
I see the 'ignore' parameter, but I need not just ignore some file, but also
treat some file totally differently, for example, changing file name, or
replace some text in the destin
Ray.Allen added the comment:
The 'as' trigger some more instructions after import, not just renaming the
loaded file name, to be specific in your example is, load attribute 'b' from
'a', and then load attribute 'c' from 'b'.
'import
New submission from Ray.Allen :
According to PEP 383, the new "surrogateescape" error handler of codecs should
begin to appear since Python3.1, but in the trunk I found some code have
already used it:
Modules/_io/fileio.c:
static int
fileio_init(PyObject *oself, PyObject *args
Ray.Allen added the comment:
Hi,
krisvale:
> Since the exact mechanics seem to be unclair to many, let me just step you
> through the series of events.
> 1) A has the lock, B is waiting for it. the bit is "set".
> 2) A releases the lock: Clears the bit, signals the c
Changes by Ray.Allen :
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issue7946>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Ray.Allen added the comment:
Tested on Debian 5, also not occurs.
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issue8705>
___
___
Python-bug
Ray.Allen added the comment:
Yes, I saw the "
--> -->
..
So the hole page is not displayed correctly!
Is there any problem with me?
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python
Ray.Allen added the comment:
This is really a bug, but why it's not fixed during such a long time?
Since trentm's python_difflib_no_eol.patch patch failed against the current
trunk, I modified it to work again, also a patch against py3k.
--
nosy: +ysj.ray
Added
Changes by Ray.Allen :
Added file: http://bugs.python.org/file17333/issue_2142_py3k.diff
___
Python tracker
<http://bugs.python.org/issue2142>
___
___
Python-bugs-list m
New submission from Ray.Allen :
Does *= need document? I think the documentation of * for all sequence type can
already cover the *= usage.
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issue8
Ray.Allen added the comment:
When I perform some test on debian-5.0, I see the timing results almost the
same before and after apply your patch(I modified the patch to against the
trunk).
Could you give some test result on windows? I can't see the speedups on
debian-5.0.
--
Ray.Allen added the comment:
Here is the explanation from Python Language Reference 7.6: Function Definitions
"""
When one or more top-level parameters have the form parameter = expression, the
function is said to have ``default parameter values.'' For a parameter w
Changes by Ray.Allen :
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issue8070>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Ray.Allen added the comment:
Add get_paths()'s output seems reasonable and simple enough, also we could make
the output format prettier.
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/i
Ray.Allen added the comment:
This is the problem with module tabnanny, it always tries to read the py source
file as a platform-dependent encoded text module, that is, open the file with
builtin function "open()", and with no encoding parameters. It doesn't parse
the encodin
Ray.Allen added the comment:
I add "tim_one" to nosy list since I found this name in
Misc/maintainers:tabnanny. Sorry if I did something improper.
If this is really a problem, I'm glad to apply a patch for it.
Thanks!
--
nosy: +tim_one
___
Ray.Allen added the comment:
pakal wrote:
"""
In test_fileio, one of the tests wants to ensure writing to closed raw streams
fails, but it actually tries to write an unicode string
"""
I don't understand. Isn't b'xxx' and 'xxx' the s
Ray.Allen added the comment:
Yes, I saw that, thanks for explanation!
So I work a patch against the trunk, including modification of fileio_write(),
bufferedwriter_write() and test_fileio.py.
--
Added file: http://bugs.python.org/file17436/issue_8765.diff
Ray.Allen added the comment:
Since urllib.urlopen() is removed in py3k, and is intended to be replaced by
urllib2.urlopen(), I think we'd better just leave as it is.
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issu
Changes by Ray.Allen :
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issue6715>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Ray.Allen added the comment:
Date and Datetime comparison is not defined and not documented, and until we
find a nice way to implement the comparison, we should just let this comparison
raise NotImpelemented.
--
nosy: +ysj.ray
___
Python tracker
New submission from Ray.Allen :
As discussed in python-dev mailing list, something should be add to os.mkdir()
and os.makedirs() to simulate the shell's "mkdir -p" function, that is,
suppress the OSError exception if the target directory exists.
Here is a patch against py3k,
Changes by Ray.Allen :
Removed file: http://bugs.python.org/file18059/mkdir_py3k.diff
___
Python tracker
<http://bugs.python.org/issue9299>
___
___
Python-bugs-list mailin
Ray.Allen added the comment:
I update the patch since an problem is found in doc/library/os.rst.
--
Added file: http://bugs.python.org/file18060/mkdir_py3k.diff
___
Python tracker
<http://bugs.python.org/issue9
New submission from Ray.Allen :
The distutils api document for class Extension:
http://docs.python.org/dev/py3k/distutils/apiref.html#distutils.core.Extension
Among the argument, in fact, the type of the arguments "sources",
"include_dirs", "library_dirs", &quo
Changes by Ray.Allen :
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issue9301>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Ray.Allen added the comment:
I guess this is intended not documented:
http://docs.python.org/dev/py3k/library/profile.html#extensions-deriving-better-profilers
Here it said:
"The Profile class of both modules, profile and cProfile, were written so that
derived classes could be develop
Ray.Allen added the comment:
I don't think this patch is correct, because we don't know if the closure[0] is
the wrapped function, consider the following case:
def fun():
abc = 1
def fun2():
print(abc)
print(inspect.getsource(fun2))
In this case, the __closure
Ray.Allen added the comment:
If I understander correctly, Issue 1608579, Issue 1239890, Issue 1223238, and
Issue 1314067 all deal with the case that the intermediate directories already
exists during creating them caused by race condition, but if the target
directory(the leaf directory
Ray.Allen added the comment:
Thanks for reviewing!
> The name 'ensure_exist' for the new parameter strikes me as wrong, as well as
> too long for something that will nearly always be set to True. The function
> always ensures that the directory exists. The question
Ray.Allen added the comment:
I worked out two patches, one for trunk and one for py3k, both with tests, hope
someone could do a reviewing.
--
keywords: +patch
nosy: +ysj.ray
Added file: http://bugs.python.org/file18078/json_trunk.diff
___
Python
Changes by Ray.Allen :
Added file: http://bugs.python.org/file18079/json_py3k.diff
___
Python tracker
<http://bugs.python.org/issue9296>
___
___
Python-bugs-list mailin
Ray.Allen added the comment:
Firstly, since this is marked as feature request, I updated the patch against
py3k, to fix the problems found by BreamoreBoy.
--
Added file: http://bugs.python.org/file18081/issue_2142_py3k_updated.diff
___
Python
Ray.Allen added the comment:
I feel adding a keyword argument to deal with such a case is not quiet worthy.
I'd prefer not fix it for 2.x, and make its behavior consist with svn diff and
other similar tools, as trentm said, "tools like "patch"
Ray.Allen added the comment:
By confirming the "%2525" case, I guess this is really a bug. But the patch
cause test_urllib2.py failed. I modified the patch to fix it.
--
nosy: +ysj.ray
Added file: http://bugs.python.org/file18082/urllib_issue_upd
Changes by Ray.Allen :
Added file: http://bugs.python.org/file18083/urllib_issue_updated.patch
___
Python tracker
<http://bugs.python.org/issue2244>
___
___
Python-bug
Changes by Ray.Allen :
Removed file: http://bugs.python.org/file18082/urllib_issue_updated.patch
___
Python tracker
<http://bugs.python.org/issue2244>
___
___
Python-bug
Ray.Allen added the comment:
This bug exists on py3k also, so I worked out a patch for py3k, too.
--
Added file: http://bugs.python.org/file18084/urllib_issue_updated.diff
___
Python tracker
<http://bugs.python.org/issue2
Ray.Allen added the comment:
I don't think this can go into python2.x. Besides, is it really worthy to add
such a new environment variable?
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/i
Ray.Allen added the comment:
Thanks for conclusion! I'll try to check and improve my patch.
--
___
Python tracker
<http://bugs.python.org/issue9299>
___
___
Ray.Allen added the comment:
I update my patch with improved doc string of posix_mkdir.
By the way, after I search in the source, I could not find the "nt", "os2",
"ce" modules, I guess these modules only exist in python source at one time,
maybe very
Ray.Allen added the comment:
Alexander:
> When a is mutable, a += b updates it in-place, so there is no ambiguity: the
> type of a cannot change. When you do a + b, there is no reason to treat a as
> more deserving than b when selecting the type of the result
Does this means &q
Ray.Allen added the comment:
I found in Modules/posixmodule.c that:
#if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__)) &&
!defined(__QNX__)
#define INITFUNC PyInit_nt
#define MODNAME "nt"
#elif defined(PYOS_OS2)
#define INITFUNC PyInit_os2
#define MO
Ray.Allen added the comment:
Agree! Sure, the functions in os are mainly to simulate the system call but not
the system command. This seems like a good suggestion.
So here is the new patch which leave posixmodule.c alone and just wrappers
os.mkdir() with try...except... in os.makedirs
Ray.Allen added the comment:
Amaury:
Thanks for reviewing! I quite appreciate your ideas. I was not quite familiar
with python source code convention at that time. Here I worked out a new patch
based on your ideas.
Since py2.7 has released, this feature can only go to py3k. So my new patch
Ray.Allen added the comment:
I think it's a good idea adding a keyword argument to specify the separator of
readlines().
I believe most people can accept the universal meaning of "line", which has
similar meaning of "record", that is a chunk data, maybe from using li
Changes by Ray.Allen :
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issue1723038>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ray.Allen added the comment:
Thanks! durban.
Here is the updated patch fixing such problem.
--
___
Python tracker
<http://bugs.python.org/issue8297>
___
___
Ray.Allen added the comment:
Oh, I'm sorry, I forgot about that case.
I agree with Arfrever, we should suppress the OSError only if the target file
exists as a directory, but not other types. That is, the "exist_ok" argument in
makedirs() should mean "dir existing is o
Ray.Allen added the comment:
I feel we do too much things in such a function if we change the mod the target
directory to the mod we specified. Does anybody feel such behavior maybe
dangerous? Because if the function success, we know nothing about weather we
create a new directory or we
Ray.Allen added the comment:
I want to explain "mkdir -p" as this:
We want to create a specified directory, if such a directory doesn't exist,
then create it. If such a directory already exists, then we have already
reached our goal, do nothing.
While we port this functio
Ray.Allen added the comment:
I updated the patch. Now the patch:
suppress the OSError if and only if the target directory with the same mode as
we specified already exists.
--
___
Python tracker
<http://bugs.python.org/issue9
Ray.Allen added the comment:
I guess it's the problem with lib2to3/fixes/fix_urllib.py. Indentation is not
taken into consideration when fix "import". Fix it with indentation taken into
consideration maybe a little complex, but here is a simple and ugly fix: when
one impor
Ray.Allen added the comment:
When one import statement is split to two or more, we encounter this problem:
the indentation of the import statements except the first one is unknown, and
is difficult to fix this problem, since a import maybe in a multi-statement
line, like: 'a=1;import sy
Ray.Allen added the comment:
Oh, sorry, here is the patch.
--
Added file: http://bugs.python.org/file18229/mkdir.diff
___
Python tracker
<http://bugs.python.org/issue9
Ray.Allen added the comment:
lukasz,
> - manipulation on the internal structures is much simpler when we have a
> single key like that. Having config['name'] return the section would make us
> create another proxy object just to support mutating keys in the section.
I&
Ray.Allen added the comment:
I feel it's not proper to allow the width restrict on types %S, %R, %A. These
types correspond to PyObject_Str(), PyObject_Repr, PyObject_ASCII()
respectively, the results of them are usually a complete string representation
of a object. If you put a
Ray.Allen added the comment:
I didn't see this problem in py2.7 and py3k on debian linux. Is this windows
specific or this bug has been fixed since py2.7?
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/i
Ray.Allen added the comment:
I don't think this problem still exists now. In the current implementation,
there is no "sys_tracefunc" and "sys_profilefunc" in PyThreadState, but
"c_profilefunc", "c_profileobj", "c_tracefunc",
Ray.Allen added the comment:
> Note that the two versions are not exclusive: We can look for an item if a
> tuple is given and look for a section if it’s a string. Maybe confusing.
+1. I think this is a good idea. Getting a section and Getting a key-value are
both very common operation
Ray.Allen added the comment:
You can write "%20s" as a argument for PyUnicode_FromFormat(), but it has no
effect. The width and precision modifiers are not intended to apply to string
formating(%s, %S, %R, %A), only apply to integer(%d, %u, %i, %x). Though you
can write "
Ray.Allen added the comment:
I found that this issue is duplicate with issue6050. And the bug has been fixed
since 2.6.3.
So this issue should be closed.
--
___
Python tracker
<http://bugs.python.org/issue9
Ray.Allen added the comment:
"It may be useful to mention it to show the exception heirarchy as well as in
the case a user may want to catch all ConfigParser errors generally."
+1. I provide a patch for this.
--
keywords: +patch
nosy: +ysj.ray
Added file: http://bugs.
Changes by Ray.Allen :
--
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/issue9407>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ray.Allen added the comment:
This should not be a problem, I think. We cannot avoid such a circular
reference.
I believe the main reason of the circular reference is in MyClass.__mro__, this
is a list and contains a reference to MyClass. You can add "__slots__ = []" to
MyClass
Ray.Allen added the comment:
Is this really worthy to fix?
--
___
Python tracker
<http://bugs.python.org/issue7330>
___
___
Python-bugs-list mailing list
Unsub
Ray.Allen added the comment:
> However here's a proposed solution:
* for the __mro__: instead of using a tuple, use a new object that inherits
from it. This new object should use weak reference for the first item and
should return the real object (if available) only in __g
Ray.Allen added the comment:
Is this due to your adopting of Django?
Are there other guys who using Django suffer the same problem?
--
___
Python tracker
<http://bugs.python.org/issue9
Ray.Allen added the comment:
I got "OSError: [Errno 2] No such file or directory" instead of TypeError when
running the "bug.py", did I miss something?
--
nosy: +ysj.ray
___
Python tracker
<http://bu
Ray.Allen added the comment:
Here is the patch, it add support to use width and precision formatters in
PyUnicode_FromFormat() for type %s, %S, %R, %V, %U, %A, besides fixed two bugs,
which at least I believe:
1. According to PyUnicode_FromFormat() doc:
http://docs.python.org/dev/py3k/c
Ray.Allen added the comment:
This is because when an subprocess.CalledProcessError is raised, the
CalledProcessError instance is picked through a socket and then read by
"parent" process, but in fact CalledProcessError instances cannot be picked
correctly. Because CalledProcessErr
Ray.Allen added the comment:
David Murray, where is the patch?
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issue1553375>
___
___
Python-bug
Ray.Allen added the comment:
In my opinion, the set's operator should be a bit more liberal and accept any
collections.Set instances. Given collections.Set is an ABC and isinstance(set,
collections.Set) is True, the set methods should(strong recommended) follow all
the generalized abs
Ray.Allen added the comment:
+1 on generalize the dbm.gnu and gbm.ndbm, and also dbm.dumb. All of them
should follow the Collections.MutableMapping ABC. I will work out a patch to
fix this.
--
nosy: +ysj.ray
___
Python tracker
<h
Ray.Allen added the comment:
> Doc review: Small typo, Flase vs False. Also, exceptions are "raised" rather
> than "thrown" in Python land (same for the docstring). Both exception
> references should be :exc:`OSError`.
Here fixed these doc problems. Thank
New submission from Ray.Allen :
During the patching work of issue8634, I found several problems about the
module dbm.gnu and dbm.ndbm, I feel it's better to address them on a separate
issue.
1. As issue8634 said, the dbm.gnu, dbm.ndbm and dbm.dumb should have the
similar interface,
Ray.Allen added the comment:
See issue9523.
--
___
Python tracker
<http://bugs.python.org/issue8634>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ray.Allen added the comment:
It seems there is pretty much problems in PyUnicode_FromFormatV().
see issue7330.
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issue7
Changes by Ray.Allen :
--
components: +Extension Modules
type: -> feature request
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/iss
Ray.Allen added the comment:
Why not close this issue? It seems that this has been fixed in current py3k
branch.
--
nosy: +ysj.ray
___
Python tracker
<http://bugs.python.org/issue8
Ray.Allen added the comment:
Since the patch cannot be applied to py3k cleanly, I update it.
--
Added file: http://bugs.python.org/file18422/mkdir.diff
___
Python tracker
<http://bugs.python.org/issue9
Ray.Allen added the comment:
krisvale:
> What about my suggestion of simply providing a convention on how to disable
> links manually, similar to how minidom.document does it with an "unlink"
> method? If these cases are documented, then there shouldn't be any extr
Ray.Allen added the comment:
Besides, not only the header value, but also the header name can only be
printable ascii characters according to RFC2822:
"A field name MUST be composed of printable US-ASCII characters (i.e.,
characters that have values between 33 and 126, inclusive), e
101 - 191 of 191 matches
Mail list logo