Xiang Zhang added the comment:
LGTM generally. :-)
--
___
Python tracker
<http://bugs.python.org/issue29099>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
You can't do it like this. The document explicitly states it only works inside
a class definition:
"Also note that, aside from the zero argument form, super() is not limited to
use inside methods. The two argument form specifies the arguments exactly
Xiang Zhang added the comment:
Behaviour changed in #5319. Add author Martin.
--
nosy: +martin.panter, xiang.zhang
___
Python tracker
<http://bugs.python.org/issue29
Xiang Zhang added the comment:
> As for `operator.concat`, any reason why the check is made beforehand to see
> if the first argument has a `__getitem__` method?
Concatenation is an operation of sequence (+ could be used both for
concatenation and addition), so you have to check __get
New submission from Xiang Zhang:
As the title, but I think it should also continue if only the right operand is
a sequence since the right operand could get a __radd__ to do the concatenation:
>>> class S:
... def __init__(self):
... self.v = list(range(10))
..
Changes by Xiang Zhang :
--
nosy: +serhiy.storchaka, zach.ware
___
Python tracker
<http://bugs.python.org/issue29139>
___
___
Python-bugs-list mailing list
Unsub
Xiang Zhang added the comment:
> You can use operator.add() if you need to fall back to a __radd__ of the
> right operand.
IMHO for sequences when defining __add__, __radd__, there is no difference
between addition and concatenation, just as
https://docs.python.org/3/reference/datamode
Changes by Xiang Zhang :
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue29117>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
Actually this issue was discussed when import the pure Python implementation in
#16694. There seems once an effort checking also the right operand but was
later removed, but I couldn't understand why (though there is an explanation,
but it's more
Xiang Zhang added the comment:
It seems you are surprised `super(C, self).foo2()` works but it is actually how
super() and class.__mro__ works. :-) So not a bug. You could learn more about
it but sorry I don't have any good reference for you. :-(
--
nosy: +xiang.zhang
resol
Xiang Zhang added the comment:
> It does, but "-fwrapv" is not automatically added when you specify custom OPT
> flags.
Indeed I think this is why the changes in #27473 and #1621 make sense.
> GCC 6 optimizes away broken overflow checks.
I am sorry but I don't unde
Xiang Zhang added the comment:
Ohh sorry I misunderstand your intention. :-( Attach a patch. :-)
--
keywords: +patch
stage: -> patch review
Added file: http://bugs.python.org/file46141/replace-overflow-check.patch
___
Python tracker
&l
Xiang Zhang added the comment:
Could you provide your default locale setting, the result of
`locale.setlocale(locale.LC_ALL, '')`?
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.o
Xiang Zhang added the comment:
> It would be better to write the code in the same form as in 3.x. This could
> help backporting other patches if needed.
Yes, it is. :-) I only had a fast glance at at 3.x codes and thought they
didn't share much. :-( But apparently I was wrong. Th
Changes by Xiang Zhang :
--
Removed message: http://bugs.python.org/msg284711
___
Python tracker
<http://bugs.python.org/issue29166>
___
___
Python-bugs-list m
Changes by Xiang Zhang :
--
nosy: -gvanrossum, yselivanov
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Xiang Zhang :
Removed file: http://bugs.python.org/file46152/1 855 338 0710 AT&T tech email
support phone number AT&T email support number.jpg
___
Python tracker
<http://bugs.python.org
Xiang Zhang added the comment:
This test still fails with lastest Py2.7 on Ubuntu 16.10. Could we backport the
patch to silence the failure?
./python -m test.regrtest test_ssl
[1/1] test_ssl
test test_ssl failed -- Traceback (most recent call last):
File "/home/angwer/py2.7/Lib
Changes by Xiang Zhang :
--
nosy: +r.david.murray -haypo
___
Python tracker
<http://bugs.python.org/issue28806>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
> some instances are present in unicodeobject.c too
Thanks for your notification.
v3 adds the some changes needed I could find in unicodeobject.c. Nothing in v2
is changed.
--
Added file: http://bugs.python.org/file46158/replace-overflow-check-v3.pa
Xiang Zhang added the comment:
> It seems to me that unicodeobject.c should be changed in 3.x too.
I don't understand. Would you mind tell me which part? The only suspicious part
to me is `PY_SSIZE_T_MAX >> (rkind - 1)`. It seems should be `PY_SSIZE_T_MAX /
rkind`.
And I miss
Xiang Zhang added the comment:
The new patch is a try to solve the problems mentioned in this thread.
> It can be solved by making path->object referring an original argument (but
> some code checks the type of path->object), or making path->object owning a
> reference.
Xiang Zhang added the comment:
path_converter-new-2.patch addresses Serhiy's comments. :-)
--
Added file: http://bugs.python.org/file46170/path_converter-new-2.patch
___
Python tracker
<http://bugs.python.org/is
Xiang Zhang added the comment:
LGTM.
--
___
Python tracker
<http://bugs.python.org/issue29157>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Xiang Zhang :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue29174>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
> I think it makes sense to strip at the end as well (`example.com` is the same
> domain as `example.com.`).
Are your sure the host checked against the list is FQDN? With and without the
trailing dot are dif
Changes by Xiang Zhang :
--
stage: -> resolved
___
Python tracker
<http://bugs.python.org/issue29186>
___
___
Python-bugs-list mailing list
Unsubscrib
Xiang Zhang added the comment:
Paste my point here:
I prefer checking the result PyUnicode_Compare to see it's a success or failure.
getrandom doesn't use any lower level unicode operations so it doesn't get a
responsibility to ready the unicode.
--
nos
Xiang Zhang added the comment:
I'm -1 if the intention is about easiness and efficiency.
I think a new API is usually added due to functional defect not performance
defect. We get a way here though the performance seems not ideal, according to
INADA's mail. I think we should firs
Xiang Zhang added the comment:
path_converter-new-3.patch fixes the wrong return value on successful cases.
--
Added file: http://bugs.python.org/file46206/path_converter-new-3.patch
___
Python tracker
<http://bugs.python.org/issue29
Changes by Xiang Zhang :
Added file: http://bugs.python.org/file46208/path_converter-new-4.patch
___
Python tracker
<http://bugs.python.org/issue29034>
___
___
Python-bug
Xiang Zhang added the comment:
> Is 3.5 free from all these bugs?
path_converter is much simpler in 3.5 so I think it's free of these bugs. :-)
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
_
Xiang Zhang added the comment:
LGTM.
--
assignee: -> xiang.zhang
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/i
Xiang Zhang added the comment:
I committed the patch to 2.7. The new patch is for 3.x.
--
stage: patch review -> commit review
versions: +Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46221/overflow-checks-3x.pa
Xiang Zhang added the comment:
> FTR I thought the consensus was not to backport these fixes unless there was
> a demonstrated problem: <https://bugs.python.org/issue1621#msg144499>, though
> personally, I would be in favour of backporting in many cases.
Sorry not know th
Xiang Zhang added the comment:
Thanks Milan and Thomas!
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Xiang Zhang :
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue28870>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
That's a change in 3.6, see
https://docs.python.org/3/whatsnew/3.6.html#build-and-c-api-changes.
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/is
Xiang Zhang added the comment:
I found that conflict once but lost it then. :-(
> Or should I just assume that all headers are henceforth C99 and any wrapping
> code should also be C99?
I am not sure. :-( Nosy other experts. :-)
--
nosy: +haypo, serhiy.sto
Xiang Zhang added the comment:
Thanks you all. :-)
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Xiang Zhang added the comment:
Thanks for your report David. :-) I simply remove the type description since I
think the type of the constants doesn't matter here.
--
nosy: +xiang.zhang
resolution: -> fixed
stage: -> resolved
status: open -> closed
versions: -Python 3
Changes by Xiang Zhang :
--
nosy: +vinay.sajip
___
Python tracker
<http://bugs.python.org/issue29220>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
About the comment style confliction, I opened an issue on Github and assigned
to you Benjamin. https://github.com/python/peps/issues/176
--
___
Python tracker
<http://bugs.python.org/issue29
Changes by Xiang Zhang :
Added file: http://bugs.python.org/file46254/sqlite3-3.patch
___
Python tracker
<http://bugs.python.org/issue29099>
___
___
Python-bugs-list m
Xiang Zhang added the comment:
> LGTM except that arguments of assertEqual() should be swapped.
Thanks Serhiy! I'll take care of that. One problem remained is what to do with
2.7. There is no timezone object in 2.7. My preference is just pointing out the
limitation that only naive
Xiang Zhang added the comment:
I asked whether this should be treated as an enhancement or bug fix. Now with
your concerns I think it fits as enhancement more.
> Is it possible to make the support optional for 3.5 and 3.6 and only enable
> it for 3.7 (with the possibility of disabl
New submission from Xiang Zhang:
In 3.6 we get --enable-optimizations. One thing I find annoyed with this flag
is that it makes some build commands compile from scratch since it always
clears the environment first. For example, with the commands listed at the top
of Makefile:
./configure
Xiang Zhang added the comment:
timestamptz.patch implements a new converter that's able to convert aware
datetime objects.
--
stage: needs patch -> patch review
Added file: http://bugs.python.org/file46265/timestamptz.patch
___
Python tracke
Xiang Zhang added the comment:
> I think the timestamptz converter should either interpret strings without
> timezone as UTC (and perhaps understand the "Z" suffix as sqlite3 date()
> function) or raises an error. It should never return naive datetime.
Currently timestampt
Xiang Zhang added the comment:
Although I am +1 for merging it before but these days I find it's not the only
case. There are also two unittest.mock entries. This is just FYI, no opinion on
this issue.
--
___
Python tracker
<http://bugs.py
Xiang Zhang added the comment:
> I think the old code unlikely will be broken if preserve an exception type
> and don't change conditions for raising an error.
Currently there could be no error when the object gets a timezone. The timezone
is simply discarded and only when microse
Xiang Zhang added the comment:
timestamptz-2.patch make timestamp and timestamptz specilized for their own
objects.
--
Added file: http://bugs.python.org/file46277/timestamptz-2.patch
___
Python tracker
<http://bugs.python.org/issue29
Xiang Zhang added the comment:
I am okay with ValueError(actually I use it in the patch originally) but I am
not in favour of catching the errors of the parser. The parser raises errors
due to invalid data, not timezone. I think propagate it to users could make the
reason more obvious
Xiang Zhang added the comment:
timestamptz-3.patch uses ValueError instead of ProgrammingError and treat
suffix Z as UTC timezone.
--
Added file: http://bugs.python.org/file46279/timestamptz-3.patch
___
Python tracker
<http://bugs.python.
Xiang Zhang added the comment:
I can get the expected behaviour with the lastest 2.7 build.
Python 2.7.13+ (2.7:0d4e0a736688, Jan 15 2017, 00:51:57)
[GCC 5.2.1 20151010] on linux2
Type "help", "copyright", "credits" or "license" for more informatio
Xiang Zhang added the comment:
> I suspect unit tests and documentation updates?
Yes. Code alone is not enough. It's better to have tests and documentation.
Also, it's appreciated to sign the CLA:
https://www.python.org/psf/contrib/contrib-form/. :-)
--
nosy: +xian
Xiang Zhang added the comment:
textwrap has been fixed in #20491 but this problem still exists. The reason
seems to be that argparse replaces the non-break spaces with spaces:
before self.whitespace_matcher.sub
'Disable default font-style: condensed. Also disables "M+\\xa01M&
Xiang Zhang added the comment:
I think this is a regression when coming to 3.x. In 2.7, r'\s+' is by default
in ASCII mode and won't match unicode non-breaking spaces. In 3.x it's by
default unicode mode so non-breaking spaces are replaced by spaces. I think we
can j
Xiang Zhang added the comment:
#29290 reports the same problem as here.
--
nosy: +xiang.zhang
resolution: -> fixed
stage: -> resolved
status: open -> closed
superseder: -> argparse breaks long lines on NO-BREAK SPACE
___
Python tr
Xiang Zhang added the comment:
Ahh, sorry. I made a mistake. It's not the same as 29290. This is about 2.7.
Although #20491 is closed but 2.7 seems not patched. Nosy Serhiy.
--
nosy: +serhiy.storchaka
resolution: fixed ->
stage: resolved -> needs patch
status: clo
New submission from Xiang Zhang:
The signature of PyEval_EvalCodeEx now gets a "PyObject *kwdefs" parameter but
the doc doesn't mention it.
--
assignee: docs@python
components: Documentation
messages: 285620
nosy: docs@python, xiang.zhang
priority: normal
severity: norm
Changes by Xiang Zhang :
--
keywords: +easy
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue29292>
___
___
Python-bugs-list mai
Xiang Zhang added the comment:
This doesn't look like a bug in the doc to me.
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue29291>
___
___
Xiang Zhang added the comment:
#29082 fixed it?
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue29294>
___
___
Python-bugs-list mailin
Xiang Zhang added the comment:
> "keywords and defaults," however, the kwdefs argument was never added to the
> prototype.
I don't think this is about the missing "kwdefs". I think "arrays of arguments,
keywords and defaults" is a whole part d
Xiang Zhang added the comment:
Ahh, I got the same idea before. But then I persuaded myself that the first
"lookup()" was deliberately extracted from the loop since it's highly possible
there is no collision and you can hit the result (empty or not) the first time.
Xiang Zhang added the comment:
It seems to be vendor's issue not CPython itself. This same issue also happens
in Ubuntu 16.10's Python 3.6. Raise any exception can cause this:
Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
[GCC 6.2.0 20161005] on linux
Type "help", "
Xiang Zhang added the comment:
Hi Michael, this bug tracker is meant for developing CPython. Your problem
exists in your own codes or third party applications. You'd better report to
the related parties.
--
nosy: +xiang.zhang
resolution: -> third party
stage: -> reso
Xiang Zhang added the comment:
Thanks Ammar. :-)
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Xiang Zhang added the comment:
pysqlite is not part of Python stdlib so here is not the right place. :-(
Maybe you could go to https://github.com/ghaering/pysqlite for help.
--
nosy: +xiang.zhang
resolution: -> third party
stage: -> resolved
status: open -&g
Xiang Zhang added the comment:
Hi Ma Lin. If you find this is also a problem in sqlite3 module, feel free to
open another issue against sqlite3. :-)
--
___
Python tracker
<http://bugs.python.org/issue29
Xiang Zhang added the comment:
Kushal I think the OP is reporting `mock.MagicMock() == mock.ANY` is False
while `mock.ANY == mock.MagicMock()` is True which is still the case in 3.7. A
related issue is #25195. In that issue Serhiy has mentioned this
behaviour(http://bugs.python.org/issue25195
Xiang Zhang added the comment:
v2 addresses the comments. I didn't receive the review notification mail so
just saw them today. :-(
--
stage: -> patch review
Added file:
http://bugs.python.org/file46376/argparse-help-non-breaking-spaces
Xiang Zhang added the comment:
Ping for review for timestamptz-3.patch.
--
___
Python tracker
<http://bugs.python.org/issue29099>
___
___
Python-bugs-list mailin
Changes by Xiang Zhang :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
New submission from Xiang Zhang:
PathLike objects are added in 3.6 and they are mentioned in the documentation.
But in some os module functions' docstrings, acceptable types of path parameter
are mentioned and they are not altered to mention path-like object. For example:
chown(path, uid
Changes by Xiang Zhang :
--
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue29341>
___
___
Python-bugs-list mailing list
Unsubscrib
Xiang Zhang added the comment:
> Maybe discuss this on Python-Dev?
It's fine. Could you compose a mail instead of me? I am not good at that. :-(
--
___
Python tracker
<http://bugs.python.org
Xiang Zhang added the comment:
> I'm even worse at that. :-(
LoL. Okay I'll do that. :-)
--
___
Python tracker
<http://bugs.python.org/issue29099>
___
Xiang Zhang added the comment:
Thanks Serhiy.
BTW, #16623 is about 2.7 and the cause is wrap doesn't handle unicode
non-breaking spaces right. So it's not the same thing as here.
--
resolution: -> fixed
stage: commit review -> resolved
status
Changes by Xiang Zhang :
--
nosy: +gregory.p.smith
___
Python tracker
<http://bugs.python.org/issue29212>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
The buildbots are failing due to test_pydoc. :-(
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue29
Xiang Zhang added the comment:
Things doesn't come to an end. :-( The enum test suite also gets a related test
and make the buildbot fail:
FAIL: test_pydoc (test.test_enum.TestStdLib)
--
Traceback (most recent call
Xiang Zhang added the comment:
I don't mean to sync the docstring and the documentation totally. But just like
os.chown, there are some functions explicitly mention the acceptable types of
path parameter in their docstrings. I think since they already mention the
types, then make the
Xiang Zhang added the comment:
> Making the suggested "make, make test, make install" process effectively
> useless or at least take 3x longer than it should.
About this, I once opened #29243.
--
nosy: +xiang.zhang
___
Pytho
Xiang Zhang added the comment:
This seems not related to #27931.
The problem is that the receiver's content is only CFWS. It's just like it's
empty and for the default policy, it checks `value[0] == '"'` in `get_word`.
Xiang Zhang added the comment:
LGTM. -t is not removed but only ignored in Py3 for backwards compatibility.
And I am fine with the wording.
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue29
Xiang Zhang added the comment:
I can't see any problem with the example either. So I just close this issue for
now. But if you still think it gets problems please reopen it and tell your
thoughts.
--
nosy: +xiang.zhang
resolution: -> not a bug
stage: -> resolved
s
Changes by Xiang Zhang :
--
nosy: +pitrou, tim.peters
___
Python tracker
<http://bugs.python.org/issue29376>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
This seems an regression from #18808, so nosy Tim and Antoine. Since
_DummyThread is always alive and daemonic, I think the solution could be
overriding is_alive in _DummyThread and always returning True.
--
keywords: +patch
nosy: +xiang.zhang
stage
Changes by Xiang Zhang :
--
nosy: +xiang.zhang
versions: -Python 3.3, Python 3.4
___
Python tracker
<http://bugs.python.org/issue29347>
___
___
Python-bugs-list m
Changes by Xiang Zhang :
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue29405>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
I could reproduce this using Audric's command. And yes, debug build doesn't
suffer from this crash. Nosy Victor.
DEBUG:root:Called with: ['/tmp/minimal_crash.py', '-d', 'sqlite:///crash.db',
'-v']
Xiang Zhang added the comment:
Sounds reasonable. IIUC if the sample data gets 11 lines the total could be 20.
I also think the second min is redundant. Would you mind review my patch Milt?
--
keywords: +patch
stage: -> patch review
type: behavior -> enhancement
versions: +Pyth
Changes by Xiang Zhang :
--
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issue29405>
___
___
Python-bugs-list mailing list
Un
Xiang Zhang added the comment:
After reading the code I could see the possibility. A weakref object gets two
linkedlist pointers which are not initialized by new_weakref (actually they are
initialized by insert_head or insert_after). But the weakref object is possible
to be destroyed in [1
Changes by Xiang Zhang :
--
nosy: +fdrake
___
Python tracker
<http://bugs.python.org/issue29347>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
Hmm, what's your test program? Would you mind show it?
--
___
Python tracker
<http://bugs.python.org/issue29347>
___
___
Pytho
Xiang Zhang added the comment:
But your weakref_crash.c doesn't look correct to me. Your test.object type
doesn't support weak references at all. How could you use GET_WEAKREFS_LISTPTR
then? See https://docs.python.org/3/extending/newtypes.html#weakr
Xiang Zhang added the comment:
Saida, I changed your test program to use set instead of self created type (see
attachment). I tested it under Py2.7 and it seems no crash happens.
python test.py 1 1
2.7.10 (default, Oct 14 2015, 16:09:02)
[GCC 5.2.1 20151010]
0x101010101010101
0x1010101010101
701 - 800 of 1629 matches
Mail list logo