Tim Mitchell added the comment:
Here is my patch for parts 3 and 4.
Core issue for part 4 appears to be dk_lookup calling arbitrary python code may
free the key.
dk_lookup is also used in _PyDict_LoadGlobal not sure if this bug can occur
here.
--
nosy: +Tim Mitchell
Added file:
http
Tim Mitchell added the comment:
Verified problem. Added patch to keep reference to dict in PyDict_GetItem.
--
keywords: +patch
nosy: +Tim Mitchell
Added file:
http://bugs.python.org/file44605/0001-issue27946-Hold-reference-to-dict-in-PyDict_GetItem.patch
Tim Mitchell added the comment:
see also similar dict issue 27945
--
___
Python tracker
<http://bugs.python.org/issue27946>
___
___
Python-bugs-list mailin
Tim Mitchell added the comment:
see also similar dict issue 27945
--
___
Python tracker
<http://bugs.python.org/issue27946>
___
___
Python-bugs-list mailin
Changes by Tim Mitchell :
Added file:
http://bugs.python.org/file44611/0001-issue27946-Hold-reference-to-dict-in-PyDict_GetItem.patch
___
Python tracker
<http://bugs.python.org/issue27
Tim Mitchell added the comment:
Added test to patch
--
___
Python tracker
<http://bugs.python.org/issue27946>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Tim Mitchell :
Removed file:
http://bugs.python.org/file44605/0001-issue27946-Hold-reference-to-dict-in-PyDict_GetItem.patch
___
Python tracker
<http://bugs.python.org/issue27
Changes by Tim Smith :
--
nosy: +tdsmith
___
Python tracker
<http://bugs.python.org/issue27806>
___
___
Python-bugs-list mailing list
Unsubscribe:
Tim Graham added the comment:
Could we include the offending pattern in the deprecation message? I'm
attaching a proposed patch. With that patch I can more easily find the
offending pattern, whereas before I had no idea:
django/django/urls/resolvers.py:101: DeprecationWarning: Flags n
Tim Graham added the comment:
And on further investigation, I'm not sure how to fix the deprecation warnings
in Django. We have a urlpattern like this:
url(r'^(?i)CaseInsensitive/(\w+)', empty_view, name="insensitive"),
The regex string r'^(?i)CaseInsensitive/
Tim Graham added the comment:
Looks like we could remove the '^', but it doesn't resolve the deprecation
warnings. The inline flags in `pattern` still need to be moved before `_prefix`.
--
___
Python tracker
<http://bugs.pyt
Tim Graham added the comment:
I hope the message can be improved for Python 3.6 as the warnings I see when
running Django's test suite are rather useless to help find and fix the issues:
cpython/Lib/importlib/_bootstrap.py:205: DeprecationWarning: invalid escape
sequence '\:'
Tim Graham added the comment:
Adding an updated patch.
I guess the (?i:CaseInsensitive) syntax isn't merged yet? I tried it but it
didn't work. It might be premature to proceed with this deprecation if that
alternative isn't already present. Is there an issue for it?
--
Tim Graham added the comment:
Eric, your patch was good enough to allow me to easily identify and fix all the
warnings in Django: https://github.com/django/django/pull/7254. Thanks!
--
___
Python tracker
<http://bugs.python.org/issue28
Tim Peters added the comment:
Mark, the code I showed in roots.py is somewhat more accurate and highly
significantly faster than the code you just posted. It's not complicated at
all: it just uses Decimal to do a single Newton correction with extended
precision.
Since it doesn'
Tim Graham added the comment:
Yes, I found that Django needs an update to support that syntax in URLpatterns.
Thanks.
--
___
Python tracker
<http://bugs.python.org/issue22
Tim Mooney added the comment:
Sooo It's been 3 years. Brian's patch has bit-rotted a bit, but it's easy
to update for recent Python.
What are the hold-ups to getting this applied?
--
___
Python tracker
<http://bugs.pyt
Tim Peters added the comment:
Mark, thanks for the counterexample! I think I can fairly accuse you of
thinking ;-)
I expect the same approach would be zippy for scaling x by 2**e, provided that
the scaled value doesn't exceed the dynamic range of the decimal context. Like
so:
def ero
Tim Peters added the comment:
Oops! The `D2**e` in that code should be `pow(D2, e)`, to make it use the
correct decimal context.
--
___
Python tracker
<http://bugs.python.org/issue27
Tim Peters added the comment:
Let me give complete code for the last idea, also forcing the scaling
multiplication to use the correct context:
import decimal
c = decimal.DefaultContext.copy()
c.prec = 25
c.Emax = decimal.MAX_EMAX
c.Emin = decimal.MIN_EMIN
def erootn(x
Tim Peters added the comment:
I see nothing wrong with combinatorial generators materializing their inputs
before generation. Perhaps it should be documented clearly. It's certainly
not limited to `product()`. For example,
>>> for i in itertools.combinations(iterto
Tim Peters added the comment:
Lucas, I largely agree, but it is documented that the various combinatorial
generators emit items in a particular lexicographic order. So that is
documented, and programs definitely rely on it.
That's why, in an earlier comment, Terry suggested that pe
Tim Peters added the comment:
Let me clarify something about the extended algorithm: the starting guess is
no longer the most significant source of error. It's the `mul(D(x), pow(D2,
e))` part. `D(x)` is exact, but `pow(D2, e)` may not be exactly representable
with 26 decimal digits
Tim Peters added the comment:
Good catch! I agree - and I wrote this code to begin with, so my opinion
should count ;-)
--
nosy: +tim.peters
___
Python tracker
<http://bugs.python.org/issue28
New submission from Tim Graham:
As requested by Nick [0], this is a usability issue against CPython 3.6 to
provide a better chained TypeError in this case:
class _TokenType(tuple):
parent = None
def __getattr__(self, name):
new = _TokenType(self + (name,))
setattr(self
Tim Graham added the comment:
The behavior change is from #10424. Do you believe the new behavior is
incorrect?
--
nosy: +Tim.Graham
___
Python tracker
<http://bugs.python.org/issue28
Tim Graham added the comment:
Is there opposition to changing the default output as outlined in the first
comment? If so, then I think this ticket should be closed or retitled to
reflect the intent.
--
nosy: +Tim.Graham
___
Python tracker
<h
Tim Graham added the comment:
Here's the patch if we make the change in Django instead:
https://github.com/cjerdonek/django/commit/9c8d162f3f616e9d9768659a06fcf27bb389214b
--
___
Python tracker
<http://bugs.python.org/is
Tim Graham added the comment:
Based on the usage output, it looks like the subcommand is required, but I'm
not sure if there are cases where a subcommand could be optional. David, can
you advise?
usage: test_argparse.py [-h] command ...
--
nosy: +r.david.m
Changes by Tim Smith :
--
nosy: +tdsmith
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue19398>
___
___
Python-bugs-list mailing list
Unsub
Tim Golden added the comment:
This sometimes happens when someone copies from a book or a tutorial and
includes as though code the banner header which is only meant to
illustrate the context.
--
___
Python tracker
<http://bugs.python.org/issue28
Tim Peters added the comment:
LGTM! Ship it :-)
--
___
Python tracker
<http://bugs.python.org/issue28201>
___
___
Python-bugs-list mailing list
Unsubscribe:
Tim Graham added the comment:
As far as I can tell, this isn't an issue on Python 3. Can this be closed since
Python 2 is only receiving bug fixes now?
--
nosy: +Tim.Graham
___
Python tracker
<http://bugs.python.org/is
Tim Peters added the comment:
It's fine. Read the docs. "s.insert(i, x) inserts x into s at the index given
by i (same as s[i:i] = [x])"
Note that:
>>> fred[-1:]
[4]
So the empty slice s[-1:-1] is _between_ 3 and 4 in `fred`. If you're not
surprised by
>&
Tim Mitchell added the comment:
Have stripped down the module __doc__ to a list of contents.
I chose to indent the descriptions of each argument to Popen. I know this is
non-standard but it is such a long ramble otherwise.
Changed true -> :const:`True` in subprocess.rst.
--
keywo
Tim Mitchell added the comment:
hg patch with changes forthcoming
--
___
Python tracker
<http://bugs.python.org/issue26240>
___
___
Python-bugs-list mailin
Tim Mitchell added the comment:
Am now working from tip of default in mercurial (Python 3.6).
* Removed all changes to subprocess.rst.
subprocess.__doc__
* Trimmed down even further - removed function signatures.
* added note to see Python docs for complete description.
Exception docs
* just
Tim Mitchell added the comment:
Changes as per Martins review.
--
Added file: http://bugs.python.org/file45159/subprocess3.patch
___
Python tracker
<http://bugs.python.org/issue26
Tim Peters added the comment:
I think Raymond will have to chime in. I assume this is due to the
`letter_range` portion of the test suffering hash randomization dealing it a
bad hand - but the underlying string hash is "supposed to be" strong regardless
of seed. The
self.ass
Tim Peters added the comment:
This has nothing to do with the _values_ you're passing - it has to do with the
length of the pickle string:
def _send_bytes(self, buf):
n = len(buf)
# For wire compatibility with 3.2 and lower
header = struct.pack("!i&
Tim Peters added the comment:
This won't be changed - it's a near-universally mandated behavior across
relevant standards. Many years ago it wasn't, but Knuth changed minds when he
wrote:
"""
We must define x^0=1 for all x, if the binomial theorem is to be valid
Tim Graham added the comment:
The patch is working well to identify warnings when running Django's test
suite. Thanks!
--
___
Python tracker
<http://bugs.python.org/is
Tim Peters added the comment:
Yes, it's both intended and annoying ;-) The standard specifies that, by
default, comparisons involving NANs are "unordered": a NAN is _none_ of "less
than", "equal to", or "greater than" any other float, i
Tim Graham added the comment:
Hi, this broke a couple tests with Django because it's passing number as a
float rather than an integer. For example:
==
ERROR: test_localized_fo
Tim Graham added the comment:
Thanks, that does fix that first test. There is one more that still fails:
$ python -Wall tests/runtests.py
humanize_tests.tests.HumanizeTests.test_i18n_intword
Testing against Django installed in '/home/tim/code/django/django' with up to 3
processe
Tim Graham added the comment:
Yes, that fixes the second test. Current warning (with stacklevel=3):
/home/tim/code/cpython/Lib/gettext.py:454: DeprecationWarning: Plural value
must be an integer, got 1.29
tmsg = self._catalog[(msgid1, self.plural(n))]
Possibly the stacklevel should instead
2301 - 2346 of 2346 matches
Mail list logo