Changes by Xiang Zhang :
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue24339>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
> The name _PyUnicode_CompareWithIdEqual looks too long to me. What about
> _PyUnicode_EqualToId?
+1. I think this name is more clear.
Serhiy's idea on the implementation sounds good. As for _PyUnicode_FROM_ID, I
think it's better f
Changes by Xiang Zhang :
Added file: http://bugs.python.org/file45480/_PyUnicode_EqualToId_v2.patch
___
Python tracker
<http://bugs.python.org/issue21449>
___
___
Pytho
Xiang Zhang added the comment:
_PyUnicode_FromId could fail due to memoryerror or bad encoded data. They
should be treated differently like PyUnicode_READY.
Could we treat it like PyDict_GetItem? If memoryerror happens it's highly
possible other parts will fai
Xiang Zhang added the comment:
GNU gettext only allows the plural value(n) to be an integer(unsigned long
int). Django deliberately converts the value to long in filesizeformat. Any
reason not to use int?
--
___
Python tracker
<h
Xiang Zhang added the comment:
test___all__ gets the same behaviour.
./python -Werror -m test test___all__
Run tests sequentially
0:00:00 [1/1] test___all__
Warning -- warnings.filters was modified by test___all__
test___all__ failed (env changed)
1 test altered the execution environment
Xiang Zhang added the comment:
Maybe you have forgotten to remove the debug print in the patch?
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue28
Xiang Zhang added the comment:
I think the stacklevel should be 3.
stacklevel = 3:
./python -Walways /tmp/a.py
/tmp/a.py:2: DeprecationWarning: Plural value must be an integer, got float
c2py('n!=1')(1.1)
stacklevel = 4:
./python -Walways /tmp/a.py
sys:1: DeprecationWarning: Pl
Xiang Zhang added the comment:
Ohh, sorry. It should be 4 and I make a mistake. Sorry for the noise. Patch
LGTM.
--
___
Python tracker
<http://bugs.python.org/issue28
Xiang Zhang added the comment:
Since currently _PyUnicode_CompareWithId is used to compare a unicode with
ascii identifiers for all cases, how about introduce a more specific function
like _PyUnicode_EqualToASCIIId for this case? We can preserve
_PyUnicode_CompareWithId for more general
Xiang Zhang added the comment:
+1 for this idea. I use this command everyday in work and every time must cd to
the directory is an annoyance.
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue28
Xiang Zhang added the comment:
LGTM.
--
___
Python tracker
<http://bugs.python.org/issue28701>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
> _PyUnicode_CompareWithId is a private function. We can remove it if it has
> issues.
It doesn't. But once there is _PyUnicode_EqualToASCIIId, it's can be rarely
used.
The new patch implements a version of _PyUnicode_EqualToASCIIId.
-
Xiang Zhang added the comment:
Hi Davin, could it be fixed like this?
diff -r 05a728e1da15 Lib/multiprocessing/pool.py
--- a/Lib/multiprocessing/pool.py Wed Nov 16 16:35:53 2016 -0800
+++ b/Lib/multiprocessing/pool.py Thu Nov 17 16:35:38 2016 +0800
@@ -398,7 +398,7
Xiang Zhang added the comment:
In Py3.6, it raises error:
>>> next((pool.imap(str, gen(
Traceback (most recent call last):
File "/opt/lib/python3.7/multiprocessing/pool.py", line 684, in next
item = self._items.popleft()
IndexError: pop from an empty deque
Dur
Xiang Zhang added the comment:
What's more, this case seems non-reentrant. Since there is no task in this
case, the job id is always 0 which is not true. This means after the first
time, we can not set even the exception.
--
___
Python tr
Xiang Zhang added the comment:
Here is a patch which is just a try. I don't quite like the implementation but
I can not figure out a better solution. The examples in this one and #28696
seems to work and no test fails currently.
--
Added file: http://bugs.python.org/file
Xiang Zhang added the comment:
> Your patch looks to be introducing a number of changes to the structure of
> the data being passed around between threads and even monitored/indirectly
> shared across processes.
That's why I say even myself don't like it. To solve an
Xiang Zhang added the comment:
> My question is simple: in what circumstances the patch has an effect?
My original intention is that there is no need for the caller to check for the
empty string. Even there is no use case now, it could be in future.
But Serhiy, I am actually very glad to
New submission from Xiang Zhang:
The docs of the encoders of unicode-escape and raw-unicode-escape still tell
the result of the encoding is Python string object. It should be Python bytes
object.
--
assignee: docs@python
components: Documentation
files: unicode-escape-doc.patch
Changes by Xiang Zhang :
Added file: http://bugs.python.org/file45559/unicode-escape-doc_v2.patch
___
Python tracker
<http://bugs.python.org/issue28750>
___
___
Python-bug
Xiang Zhang added the comment:
> But I think the word "Python" in "Python bytes object" is redundant. It was
> needed in "Python string object" to distinguish from "C string" and "Python
> Unicode object".
Make sense. This "Pyt
Xiang Zhang added the comment:
Hi, John. This issue of robotparser has been reported in #15851. I'll close
this as duplicate and you can discuss in that thread.
--
nosy: +xiang.zhang
resolution: -> duplicate
status: open -> closed
superseder: -> Lib/robotparser.py
Changes by Xiang Zhang :
--
versions: +Python 3.7 -Python 3.5
___
Python tracker
<http://bugs.python.org/issue15851>
___
___
Python-bugs-list mailing list
Unsub
New submission from Xiang Zhang:
PyUnicode_AsUnicodeEscapeString now still has some old comments and codes about
the original "quotes" parameter of unicodeescape_string. Current implementation
could get rid of them.
--
files: PyUnicode_AsUnicodeEscapeString.patch
keywo
Xiang Zhang added the comment:
Thanks for your work, Serhiy. ;-)
--
___
Python tracker
<http://bugs.python.org/issue28760>
___
___
Python-bugs-list mailin
Xiang Zhang added the comment:
v2 applies the suggestions.
--
priority: low -> normal
versions: +Python 3.7
Added file: http://bugs.python.org/file45597/issue27414_v2.patch
___
Python tracker
<http://bugs.python.org/issu
Changes by Xiang Zhang :
--
stage: -> resolved
___
Python tracker
<http://bugs.python.org/issue28766>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Xiang Zhang:
unicode_encode_ucs1 now recognizes as many characters as it can one time
instead of one character a time. But the unicodeerror positions still only
count 1(the second time). A similar problem reported in #28561.
--
components: Interpreter Core
files
1601 - 1629 of 1629 matches
Mail list logo