Greg Ward added the comment:
> I recommend the following: replace the simple test in the attached
> bytes_diff.py with
> Greg's unittest-based tests and adjust the __name__ == '__main__' incantation
> accordingly.
Latest patch, following Terry's suggestion
Changes by Greg Trahair :
--
nosy: +Greg.Trahair
___
Python tracker
<http://bugs.python.org/issue17204>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Greg Trahair :
--
nosy: -Greg.Trahair
___
Python tracker
<http://bugs.python.org/issue17204>
___
___
Python-bugs-list mailing list
Unsubscribe:
Greg Couch added the comment:
We still apply that patch to the Python that we embed in our application
and have for the last 10 years :-)
--
___
Python tracker
<http://bugs.python.org/issue734
Greg Ward added the comment:
> Would it be possible to write a unit test, maybe using unittest.mock to
> mock most parts?
Good idea! Turns out this was quite straightforward. The test patch is:
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -1,6 +1,7 @@
# Copyright (C
Greg Ward added the comment:
> I'll commit on branch 3.4 and merge to default.
Whoops, never mind. Looks like I don't have push permission to hg.python.org
after all. It's been 8 years since my last commit, so I shouldn't complain.
So... can someone with commit priv
New submission from Greg Turner:
Kinda trivial but...
Something like the enclosed, untested patch would seem to make new_class work a
bit more like type_new.
To be explicit, the difference is whether or not to respect virtual subclasses.
So, for example, as implemented, we can implement
Greg Turner added the comment:
Also:
In types.prepare_class, here is what currently happens:
we let x be, in order of preference:
(a) the explicitly given type if, one is given, else
(b) type(bases[0]), if it exists, else
(c) type
and then, if isinstance(x, type), we run
Greg Turner added the comment:
> perhaps "isinstance(x, type)" should have been "issubclass(x, type)" to
> correctly capture how python 2 does it.
Actually, scratch that -- its a brain fart.
IIUC new_class was created because, at the time, there was no exposed turn
Changes by Greg Turner :
--
title: types._calculate_meta nit: isinstance != PyType_IsSubtype ->
Lib/types.py nit: isinstance != PyType_IsSubtype
___
Python tracker
<http://bugs.python.org/issu
Greg Turner added the comment:
Just added a commit message.
--
Added file: http://bugs.python.org/file37349/fix_types_calculate_meta_v3.patch
___
Python tracker
<http://bugs.python.org/issue22
Greg Turner added the comment:
Here are some tests for this... first, some tests that pass right now and
demonstrate, I think, correctness of the second batch of tests.
--
Added file: http://bugs.python.org/file37350/test_virtual_metaclasses.patch
Greg Turner added the comment:
And some analogous tests for types.py, which don't pass without
fix_types_calculate_meta_v3.patch.
--
Added file:
http://bugs.python.org/file37351/test_virtual_metaclasses_in_types_module.patch
___
Python tr
Greg Turner added the comment:
And some analogous tests for types.py, which don't pass without
fix_types_calculate_meta_v3.patch.
--
Added file:
http://bugs.python.org/file37352/test_virtual_metaclasses_in_types_module.patch
___
Python tr
Greg Turner added the comment:
Fixed a trivial typo in test_virtual_metaclass_in_types_module.patch
--
versions: +Python 3.5
Added file:
http://bugs.python.org/file37356/test_virtual_metaclasses_in_types_module_v2.patch
___
Python tracker
<h
Changes by Greg Turner :
--
components: Distutils
nosy: dstufft, eric.araujo, gmt
priority: normal
severity: normal
status: open
title: \\di
___
Python tracker
<http://bugs.python.org/issue23
Changes by Greg Turner :
--
status: open -> closed
title: \\di -> bleh, sorry, my cat reported this non-bug :)
___
Python tracker
<http://bugs.python.org/i
New submission from Greg Turner:
Clinical Presentation:
Sometimes a developer consuming distutils will write what seems like a
perfectly sensible setup.py, but something inscrutable happens: setup.py bombs
out claiming "error: each element of 'ext_modules' option must be an Exte
Greg Turner added the comment:
Here's the same deal more-or-less for issue 23114... this time I expended
considerably less effort verifying that it's not a bad idea. At a glance,
though, it looks fine, and solved an instance of the issue 23114 problem I was
able to repro on my b
Greg Turner added the comment:
Perhaps it is worth addressing, briefly, the following hypothetical question,
as a litmus test against the faint dis-encapsulation code-smell some folks
might be picking up from this:
In a hypothetcial world without setuptools, would these changes have merit
New submission from Greg McCoy:
Wrote test for string template substitute
--
components: Tests
files: mywork.patch
keywords: patch
messages: 260837
nosy: Greg McCoy
priority: normal
severity: normal
status: open
title: string template substitute tests
type: enhancement
versions: Python
Greg McCoy added the comment:
My Mistake, I wasn't running coverage on all the tests
--
___
Python tracker
<http://bugs.python.org/issue26431>
___
___
Pytho
New submission from Greg Price:
In a multi-line list comprehension (or dict or set comprehension), the code for
the main expression of the comprehension is wrongly attributed to the *last*
line of the comprehension, which might be several lines later.
This makes for quite baffling tracebacks
Greg Ward added the comment:
> I've turned ash's test program into a bunch of test cases against
> Python 3.5 trunk. Is it worth committing them?
Yeah, probably. Review comments...
+try:
+self.parser.error(RUSSIAN_TEXT)
+except InterceptedError:
+
Greg Ward added the comment:
OK I've revived my patch and rebased on latest trunk.
http://hg.gerg.ca/cpython/rev/13161c1d9c5f
Comments welcome. I'll push this in a couple of days if nobody objects.
--
___
Python tracker
<http://bu
Changes by Greg Ward :
Added file: http://bugs.python.org/file39083/fa4c6160c518.diff
___
Python tracker
<http://bugs.python.org/issue17445>
___
___
Python-bugs-list m
Greg Ward added the comment:
Just uploaded https://bugs.python.org/file39083/fa4c6160c518.diff. Pretty sure
I've addressed all of @berker.peksag's review comments: thanks for that!
I also fixed a number of subtle bugs in the tests. Pro tip: when asserting that
something raises
Changes by Greg Ward :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue17445>
___
___
Python-bugs-list
Greg Turner added the comment:
Huzzah
--
Added file:
http://bugs.python.org/file44619/0001-distutils-type-checks-can-fail-issue-23102.patch
___
Python tracker
<http://bugs.python.org/issue23
Greg Turner added the comment:
Double Huzzah.
I can probably cook up a test and even look at those method invocations in
considerably less than the existing 1.5-year lifecycle of this bug, but not
necessarily immediately due to reasons.
--
Added file:
http://bugs.python.org
New submission from Greg Ward:
test_dbm.py fails reliably for me in 3.6, but in 3.5 it passes ~80% of the
time. The failure in both cases is KeyError: b'0', which has come up previously
in http://bugs.python.org/issue20094 and http://bugs.python.org/issue14120.
But since we'v
Greg Ward added the comment:
Forgot to mention: I'm running:
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 16.04.1 LTS
Release:16.04
Codename: xenial
with
$ dpkg-query -W | grep dbm
libgdbm3:amd64 1.8.3
Greg Ward added the comment:
As suggested in http://bugs.python.org/issue14120, I installed libgdbm-dev,
re-configured, and re-compiled. That fixes the problem.
IMHO that's not good enough: if we're missing a dependency, then either
configuring or building should fail. It's nic
Changes by Greg Ward :
--
title: test_dbm failure: KeyError: b'0' (regression in 3.6) -> test_dbm
failure: KeyError: b'0' (intermittent in 3.5, reliable in 3.6)
___
Python tracker
<http://
New submission from Greg Ward:
Python's error message when you let None accidentally sneak into an expression
where it doesn't belong could be better. The canonical example is attribute
lookup:
>>> a = None
>>> a.foo
Traceback (most recent call last):
File &q
Greg Ward added the comment:
Based on a brief conversation with Brett Cannon at PyCon Canada the other day.
Thanks for the idea, Brett!
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue28
Greg Ward added the comment:
> Is it worth changing about 800 places in CPython code? Not counting
> third-party code.
Definitely not. My aim is not to fix every possible reference to "instance of
'NoneType'", just the handful of cases that are most frequently enco
301 - 337 of 337 matches
Mail list logo