Ray.Allen ysj@gmail.com added the comment:
Comparing to the atexit() in C, I think this is the wrong behavior. I's weird
that error in atexit does't change process exit code while error in common
python code does. There should be a fix.
--
nosy: +ysj.ray
Ray.Allen ysj@gmail.com added the comment:
Agreed with nick's idea, the implicitly recreation of the context managers
would confuse users.
How about removing the generator must yield exactly one value restriction of
@contextlib.contextmanage? Then if I want a generator to be used
Ray.Allen ysj@gmail.com added the comment:
A straight forward fix maybe making the interpreter exit code a static global
variable and change it in Modules/atexitmodule.c:atexit_callfuncs() in the case
of errors occurred.
--
___
Python tracker
Ray.Allen ysj@gmail.com added the comment:
Agreed with nick's idea, the implicitly recreation of the context
managers would confuse users.
Uh, why would it? That's exactly what I expect the decorator to do, and
I was astonished to discover that it *doesn't*.
Because
Ray.Allen ysj@gmail.com added the comment:
By the way, as my simple tests, wprintf() with %ls does apply the width and
precision formatters on units of characters.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Ray.Allen ysj@gmail.com added the comment:
Sorry for having done that! I will remove old patches and leave a cleaner view.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file20739/issue_7330.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file20786/issue_7330.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file20983/issue7330_2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Ray.Allen ysj@gmail.com added the comment:
I tried to work out a doc patch for 3.2 to mention the limitation api: the
missing methods compared with dict and the imperfect methods(keys(), items())
of collections.MutableMapping. Here is it.
--
Added file: http://bugs.python.org
Ray.Allen ysj@gmail.com added the comment:
There maybe compatibility issues which prevent such behavior change.
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11655
Ray.Allen ysj@gmail.com added the comment:
Updated patch:
1, Changes follows review comments: http://codereview.appspot.com/4185044/.
Thanks eric!
2, Make Objects/dictobject.c:all_contained_in() a common useful limited api
Object/abstract.c:_PyObject_AllContainedIn() for the purpose
Ray.Allen ysj@gmail.com added the comment:
patch updated.
--
Added file: http://bugs.python.org/file21337/issue_11287.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11287
Ray.Allen ysj@gmail.com added the comment:
I searched the distutils docs for such a parameter description table and find
tow more on the distutils.core.setup() function descriptions. Reflected in my
updated patch.
--
title: distutils.core.Extension: list parameters documented
Ray.Allen ysj@gmail.com added the comment:
I think the patch will not be suitable for 3.1 and 3.2
Yes, it changes some api(e.g keys()), which may introduces compatibility issues.
so there should be a doc patch to mention the limitations of the dbm API
(keys() returning a list and all
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file21032/issue7330_3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Ray.Allen ysj@gmail.com added the comment:
Ooops! I found my last submitted patch is a wrong one.
Here is the updated patch add doc entries about the changes. The test cases
which assert error messages generated by PyUnicode_FromFormat() with %.200s
formatters equality would failed due
Ray.Allen ysj@gmail.com added the comment:
Looks like a duplicate issue of #9664 and #914340. And has been fixed in patch
of #914340.
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11608
Ray.Allen ysj@gmail.com added the comment:
Another fix could be making HTTPResponse to hold a reference to the
HTTPConnection object and call its close() at the time of a bad chunk
length was received. This can close the connection as soon as possible
Ray.Allen ysj@gmail.com added the comment:
I am only suggesting a check for module because the is the only mistake I
remember anyone reporting. Passing a number as a base class gives a
similar message, but no one does that. And as far as I know, there is no
way in general
New submission from Ray.Allen ysj@gmail.com:
I guess there is a typo in the source of this function:
Python/pythonrun.c: get_codec_name()
diff -r 48970d754841 Python/pythonrun.c
--- a/Python/pythonrun.cThu Mar 17 17:06:27 2011 +0800
+++ b/Python/pythonrun.cThu Mar 17 22:11
Ray.Allen ysj@gmail.com added the comment:
Looks like just the problem of error msg.
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11587
Changes by Ray.Allen ysj@gmail.com:
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4492
___
___
Python-bugs-list mailing list
New submission from Ray.Allen ysj@gmail.com:
By working on some PyUnicode_FromFormatV() related issue(#7330, #10829), I
found some same problems with PyBytes_FromFormatV(): It doesn't support width
formatter for %u, %i, %x, %d, %s, also it doesn't support %lld and %llu.
Attached patch
Ray.Allen ysj@gmail.com added the comment:
Yes there may be.
Here is the updated patch:
Add a new keyword argument to context_diff() and unified_diff() named
warn_no_newline_at_end. If true, emit \ No newline etc. It defaults to
True, set it to false to get the old behavior. I'm not sure
Ray.Allen ysj@gmail.com added the comment:
I re-read the discussion on python-dev, where it was suggested to add a
keyword argument to get the old behavior. Have you considered it?
IIUC, at the time of that discusstion, 3.2 is pre-beta so the suitable option
is to add \No newline etc
Ray.Allen ysj@gmail.com added the comment:
Does the title of this issue accurately reflect the current status of the
Python interpreter?
Yes, here is the running result on current 3.3 latest code:
[37182 refs]
[39415 refs]
[41607 refs]
[43799 refs]
[45991 refs]
[48183 refs]
[50375 refs
Ray.Allen ysj@gmail.com added the comment:
Updated patch which can apply to current py3k cleanly and with changes follow
eric's review comments.
--
Added file: http://bugs.python.org/file21067/issue_2142.diff
___
Python tracker rep
Ray.Allen ysj@gmail.com added the comment:
I noticed that after apply my last patch and running full unittest cases, some
weird errors which I don't know the reasons occurred, for example:
AttributeError: 'dict' object has no attribute 'get'
and
AttributeError: 'Queue' object has
Ray.Allen ysj@gmail.com added the comment:
Here is the updated patch:
1, Work with function parse_format_flags() which is introduced in issue10829,
and the patch is simpler and more clear than before.
2, Change parse_format_flags() to set precision value to -1 in the case of '%s'
in order
Ray.Allen ysj@gmail.com added the comment:
Hi, haypo, would you mind modify your newly added parse_format_flags() function
so that it can diff the precision value of '%.0s' and '%s'(Currently both of
them return precision as 0)? Because if used with string formatters(%s, %R, %S
Ray.Allen ysj@gmail.com added the comment:
Here is a test case.
First here is a patch which implements a simple builtin function abort() that
calls exit(0) directly, it simulates the cases that Py_FatalError occurred or
segment fault.
Then run the following:
import dbm.dumb as dumb
db
New submission from Ray.Allen ysj@gmail.com:
By reading the Lib/dbm/dumb.py source, there seems to be an distinct problem
which is pointed out in comments: the __setitem__() should call self._commit()
in order to keep .dat file and .dir file consist.
Here is a piece of comment found
Ray.Allen ysj@gmail.com added the comment:
Update: change unittest code following eric's comments.
--
Added file: http://bugs.python.org/file20902/issue11287.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11287
Ray.Allen ysj@gmail.com added the comment:
Here is the patch.
--
keywords: +patch
Added file: http://bugs.python.org/file20882/issue11287.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11287
Ray.Allen ysj@gmail.com added the comment:
Please modify the patch so that it can be applied to current py3k trunk
cleanly. (Notice that Lib/collections.py has been changed to a package in
#11085).
--
___
Python tracker rep...@bugs.python.org
Ray.Allen ysj@gmail.com added the comment:
It looks like because before the second time running of
WhichDBTestCase.test_whichdb(), previous dumb files are not cleaned clearly, so
the gdbm's open() doesn't create a new gdbm database but open an existing dumb
database.
In fact during
Changes by Ray.Allen ysj@gmail.com:
--
versions: +Python 3.3 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3783
___
___
Python
Changes by Ray.Allen ysj@gmail.com:
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2159
___
___
Python-bugs-list mailing list
New submission from Ray.Allen ysj@gmail.com:
dbm objects, including gdbm, ndbm, dumb, should support context manager. That
is, can be used with 'with' keyword, just like regular file objects.
I'm working out a patch for this.
--
components: Extension Modules
messages: 129076
nosy
Ray.Allen ysj@gmail.com added the comment:
Hi, haypo, Your patch seems cannot be applied cleanly on current py3k trunk.
And after modified your patch, test_unicode.py runs into Segmentation fault. Is
there something wrong or some changes which could influence this bug had been
already
Changes by Ray.Allen ysj@gmail.com:
--
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10829
___
___
Python-bugs-list mailing
Ray.Allen ysj@gmail.com added the comment:
see also #7330, I'm implementing %.100s in that issue.
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10833
Ray.Allen ysj@gmail.com added the comment:
Thanks haypo!
Here the updated patch, following your comments.
--
type: - behavior
Added file: http://bugs.python.org/file20831/issue11246.diff
___
Python tracker rep...@bugs.python.org
http
Ray.Allen ysj@gmail.com added the comment:
Well, the main problem is that there are 3 different codes to parse the
format string, and each code is different... Attached patch factorizes the
code: create one subfunction parse_format_flags(). It fixes also this issue
and prepares
Ray.Allen ysj@gmail.com added the comment:
With your patch, %.200s truncates the input string to 200 *characters*,
but I think that it should truncate to 200 *bytes*, as printf does.
Sorry, I don't understand. The result of PyUnicode_FromFormatV() is a
unicode object. Then how
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file20739/issue_7330.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Ray.Allen ysj@gmail.com added the comment:
Yes. The %V should be combination of %U and %s.
Here is a patch which fixed this problem.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11246
Changes by Ray.Allen ysj@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file20818/issue11246.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11246
Ray.Allen ysj@gmail.com added the comment:
An updated patch, based on latest several reviews on
http://codereview.appspot.com/4185044/
update:
1, Refactoring the common tests between test_dbm_gnu and test_dbm_ndbm.
2, Move the abc registering in Lib/dbm/ndbm.py and Lib/dbm/gnu.py.
3, Other
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file20771/issue_9523.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9523
Ray.Allen ysj@gmail.com added the comment:
No you don't. You can copy a substring of the input string with
Py_UNICODE_COPY: just pass a smaller length.
Oh, yes, I got your meaning now. I'll follow this.
You can truncate the input char* on the call to PyUnicode_DecodeUTF8:
Oh, what
Ray.Allen ysj@gmail.com added the comment:
Can you add tests for %.s? I would like to know if %.s is different than
%s :-)
Oh sorry~~ I made an mistake. There is no bug here. I have attached tests that
show that '%.s' is the same as '%s'.
Here is the updated patch:
1, changed
Ray.Allen ysj@gmail.com added the comment:
Thanks hyapo!
It looks like your patch fixes #10829: you should add tests for that, you can
just reuse the tests of my patch (attached to #10829).
Sorry, but I think my patch doesn't fix #10829. It seems link another issue.
And by applying my
Ray.Allen ysj@gmail.com added the comment:
Do you mean combine step 3 and step 4 together? Currently step 3 is just to
compute the biggest width value and step 4 is to compute exact width and do
the real format work. Only by doing real format we can get the exact width of
a string. So
Ray.Allen ysj@gmail.com added the comment:
Thanks!
Here is my updated patch:
1, Now the dbm view objects are the same as dict view objects, which are in
conformity with collections.KeysView, ValuesView and ItemsView.
2, I register all these abcs explicitly because these abcs have
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file20751/issue_9523.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9523
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file18305/issue_7330.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file19132/issue_7330.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file20731/issue_7330.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file18402/issue8634.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9523
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file19987/issue_9523.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9523
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file20726/issue_9523.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9523
Changes by Ray.Allen ysj@gmail.com:
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1635741
___
___
Python-bugs-list mailing
Changes by Ray.Allen ysj@gmail.com:
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3710
___
___
Python-bugs-list mailing list
Ray.Allen ysj@gmail.com added the comment:
1. Make keys(), values(), items() methods return view object for ndbm, gdbm
and dumb objects. I following the codes in dictobject.c.
Did you have to copy the code? Isn’t it possible to somehow reuse it?
I feel not so easy to reuse the code
Changes by Ray.Allen ysj@gmail.com:
Added file: http://bugs.python.org/file20751/issue_9523.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9523
Ray.Allen ysj@gmail.com added the comment:
Thanks eric for reviewing my patch! And thanks for you suggestions. I'm
following them.
I don’t know if you should use a plain set or a collections.ItemsView here.
In dict objects, KeysView and ValuesView are set-like objects with added
Changes by Ray.Allen ysj@gmail.com:
Removed file: http://bugs.python.org/file19131/issue_7330.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Ray.Allen ysj@gmail.com added the comment:
Thanks haypo!
Here is the updated patch, it add the tests about width modifiers and precision
modifiers of %S, %R, %A. Besides I don't know how to add tests of %s, since
when calling through ctypes, I could not get correct result value as python
Ray.Allen ysj@gmail.com added the comment:
Here's the complete patch, added unittest for width modifier and precision
modifier for '%s' formatter of PyUnicode_FromFormat() function.
--
Added file: http://bugs.python.org/file20739/issue_7330.diff
Ray.Allen ysj@gmail.com added the comment:
I'd like to fix all these issues by moving the exception handling into a
single method and unifying the reporting of failure / error / expected
failure / skip test. This will fix all these issues and nicely simplify the
implementation
Ray.Allen ysj@gmail.com added the comment:
That's good if it's so... can you explain why list_clear doesn't
guarantee that the list is empty? Why would XDECREF populate the list?
I don't quite understand it.
Does this mean that durning the Py_DECREF progress the list may be populated
Ray.Allen ysj@gmail.com added the comment:
Here is the updated patch, which fixed:
1. remove get() method of gdbm since issue6045 has already add it.
2. method keys() and items() of dbm object return set instead of list. Since
pep3119 said keys() and items() should return collections.Set
Ray.Allen ysj@gmail.com added the comment:
eli, you should also add New in version 3.3 to the doc of the tow new list
methods.
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10516
Ray.Allen ysj@gmail.com added the comment:
Agreed. I think the except Exception in TestCase.run() should be except
BaseException, since BaseException could catch Exception, SystemExit,
GeneratorExit, KeyboardInterrupt. The KeyboardInterrupt should be caught first.
The remaining three
Ray.Allen ysj@gmail.com added the comment:
Couldn't repro this on my debian 5.
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10517
Ray.Allen ysj@gmail.com added the comment:
Oh, yes. I noticed that the pep3119 defines return value of method
MutableMapping.keys() as Set, as well as method items(). So the implementation
of dumb.keys() and dump.items() are not correct since they all return lists
while the class inherits
Ray.Allen ysj@gmail.com added the comment:
Oh, yes, I missed that, too. I didn't pay attention to that. Thanks for
pointing out it and fix it!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
Ray.Allen ysj@gmail.com added the comment:
Thanks for Terry's addition to the patch!
On my python3.2a3 on windows(also copied os.py and test_os.py to the
installation), I only get the tow os.link errors. And this is because the
python3.2a3 hasn't the os.link function
Ray.Allen ysj@gmail.com added the comment:
It's not a bug. What happens is like this:
1, You set trace function using sys.settrace(tracer).
2, When the following func() is called, tracer is called with a call event,
so the trace function in PyThreadState is set to NULL since
sys.settrace
Ray.Allen ysj@gmail.com added the comment:
I think not only Structures but also other ctypes can be passed with byref() to
functions expecting pointer to mutable memory.
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http
Ray.Allen ysj@gmail.com added the comment:
Additionally, I prefer move the discussion of Py_TRACE_REFS under the
documentation of PyObject:
http://docs.python.org/dev/py3k/c-api/structures.html?highlight=pyobject_head#PyObject,
since they'are connected directly. The doc of PyObject_HEAD
Ray.Allen ysj@gmail.com added the comment:
Could you give an example code which can reproduce this issue?
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10037
Ray.Allen ysj@gmail.com added the comment:
+1 on make it identical to multiprossing.Queue. Since the documentation said:
multiprocessing.dummy replicates the API of multiprocessing but is no more than
a wrapper around the threading module.
Does the word replicates implies
Ray.Allen ysj@gmail.com added the comment:
Agree with Jesse, the description in the patch is not quite correct. I think
detailed description of the GIL has been given in C API documentation:
http://docs.python.org/c-api/init.html#thread-state-and-the-global-interpreter-lock.
How about
Ray.Allen ysj@gmail.com added the comment:
I update the patch. Hope somebody could do a review.
--
Added file: http://bugs.python.org/file19131/issue_7330.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Ray.Allen ysj@gmail.com added the comment:
I update the patch. Hope somebody could do a review.
--
Added file: http://bugs.python.org/file19132/issue_7330.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Ray.Allen ysj@gmail.com added the comment:
Oooops! Sorry for re-submit the request...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7330
Ray.Allen ysj@gmail.com added the comment:
I seems this has been fixed already, at least on my python 2.7 on linux.
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue706406
Ray.Allen ysj@gmail.com added the comment:
How about calling gc.collect() explicitly in the loop?
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1524938
Ray.Allen ysj@gmail.com 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 rep...@bugs.python.org
http://bugs.python.org/issue9299
Ray.Allen ysj@gmail.com 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 extra
bother
Ray.Allen ysj@gmail.com 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
Ray.Allen ysj@gmail.com added the comment:
Why not close this issue? It seems that this has been fixed in current py3k
branch.
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8306
New submission from Ray.Allen ysj@gmail.com:
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
Ray.Allen ysj@gmail.com added the comment:
See issue9523.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8634
___
___
Python-bugs-list
Ray.Allen ysj@gmail.com added the comment:
It seems there is pretty much problems in PyUnicode_FromFormatV().
see issue7330.
--
nosy: +ysj.ray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7574
Changes by Ray.Allen ysj@gmail.com:
--
components: +Extension Modules
type: - feature request
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9523
Ray.Allen ysj@gmail.com 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. Thanks for reviewing! Besides
1 - 100 of 186 matches
Mail list logo