New submission from Neil :
round() returns incorrect results for certain large real-integer arguments.
Demonstration via interpreter session:
>>> x = 2.0**52+1 # Huge, odd double integer near limits of what IEEE format
>>> can fully represent in its mantissa par
Neil Schemenauer added the comment:
Thanks, I'm indeed interested. Most credit goes to Christian for advancing
this.
For the missing stdatomic.h, would it be appropriate to have an autoconfig
check for it? Can just disable mimalloc if it doesn
Neil Schemenauer added the comment:
My preference would be for --with-mimalloc=yes in an upcoming release. For
platforms without the required stdatomic.h stuff, they can manually specify
--with-mimalloc=no. That will make them aware that a future release of Python
might no longer build (if
New submission from Neil Girdhar :
class C:
@property
def f(self) -> int:
return 2
class D(C):
pass
D().f = 2
Gives:
Traceback (most recent call last):
File "/home/neil/src/cmm/a.py", line 10, in
D().f = 2
AttributeError: can't set attribute
Neil Girdhar added the comment:
Thank you, this would have saved me a lot of time!
On Sat, Feb 12, 2022 at 8:37 PM Alexander wrote:
>
> Alexander added the comment:
>
> Indeed, the error message does not help to identify the problem. Moreover,
> it collides with si
New submission from Neil Girdhar :
When defining a dataclass, it's possible to define a post-init (__post_init__)
method to, for example, verify contracts.
Sometimes, when you inherit from another dataclass, that dataclass has its own
post-init method. If you want that method to also d
Neil Girdhar added the comment:
On Sat, Feb 19, 2022 at 2:51 AM Vedran Čačić wrote:
>
> Vedran Čačić added the comment:
>
> That "except AttributeError" approach is a powerful bug magnet, since it
> can very easily mask real attribute errors stemming from misspelled
Neil Girdhar added the comment:
> I'm not crazy about adding a method to every dataclass just for the 0.1% of
> the times it's needed.
I'm not sure I totally understand the cost here. You can have a single shared
global function that you set on each dataclass. So the
Neil Girdhar added the comment:
> How would an arbitrary derived class know how to call this? It can't. There
> has to be knowledge of the base class's requirements already. Surely knowing
> "__post_init__ must be called with some_arg" isn't too diffe
Neil Girdhar added the comment:
@Raymond yeah I've been thinking about this some more, and there's no way to
have a "top level" method with the dataclass decorator.
I think I will make a case to have a class version of dataclasses that works
with inheritance. Class ver
New submission from Neil Webber :
The math module documentation says:
Except when explicitly noted otherwise, all return values are floats.
But this code returns an integer:
from math import prod; prod((1,2,3))
Doc should "explicitly note otherwise" here, I imagine. The i
Neil Girdhar added the comment:
@eric
Good thinking. Would it make sense to add to the documentation as well that
the __post_init__ methods aren't collected, and you should call super's
__post_init__ if there is one using something like
if hasattr(super(), &quo
Neil Schemenauer added the comment:
I made the changes as suggest by Guido. Commited as SVN rev 58226.
Thanks for the patch.
--
nosy: +nas
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
Neil Schemenauer added the comment:
It looks to me like fp_readl is no longer working as designed and the
patch is not really the right fix. The use of "decoding_buffer" is
tricky and I think the conversion to bytes screwed it up. It might be
clearer to have a separate "de
Neil Toronto added the comment:
Christian: Thanks for that, I'll have to remember DEBUG_LEAK in the
future. :)
It looks like it may be acting correctly since there *is* now a
fastglobals object that needs collecting, and also a new tuple built
from co_names + "__builtins__". I do
Neil Muller added the comment:
This patch is now more than a year old with no comment. What needs to happen to
get this bug fixed?
--
___
Python tracker
<http://bugs.python.org/issue9
Neil Muller added the comment:
SVN_Revision.diff replaces the remaining "$Revision$" keywords in 2.7 with the
values from the last SVN checkout I have. This seems the correct minimal fix
for the issues caused by code parsing the revision tag in Python 2. I've left
the various
Neil Muller added the comment:
This patch removes or replaces a number SVN keywords which aren't buried in
comments.
I've removed '__revision__ = "$Id$"' cases - mainly present in distutils - as
no-one appears to using these.
I've replaced values in t
Neil Aspinall added the comment:
Would it be possible for this issue's fix (PyErr_Occurred() returning null when
the thread state is null) to be applied to the 2.7 branch?
--
nosy: +naspinal
___
Python tracker
<http://bugs.python.org/i
New submission from Neil Harkins :
hi. after using deepcopy() on a nested dict/list structure,
i noticed that modifications to the deepcopied structure were
affecting the original. this looks to me like a serious bug:
>>> import copy
>>> foo = { 'a':[1,2,3
Neil Harkins added the comment:
thanks for the quick response.
that was just my working up a simplified repro, but you are
correct: on modification there, it gets a new id() location.
totally not what i would've expected (python flags
it for copying when it changes, to save space?)
ho
Neil Harkins added the comment:
learn something everyday. i have found the bug in my code,
deepcopy() is not to blame. thx for your time!
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/iss
Neil Tallim added the comment:
The differences are small enough that it probably doesn't matter which one of
us makes the extra changes.
It'll take one step less for you to implement them while applying the fixes, so
it's probably easiest if I leave that in your court. Thanks
Neil Tallim added the comment:
I use the wave module a fair bit and never once encountered this issue, so,
yeah, it's probably a pretty low priority for backporting.
It's definitely an edge-case sort of thing, the likes of which anyone affected
has already handled in their applica
New submission from Neil Tallim :
Super-low-priority (it's obvious from context and unlike to confuse anyone who
knows what they're looking at), but the os module's description for getresgid()
is "Return a tuple (rgid, egid, sgid) denoting the current process’s real,
effec
Neil Tallim added the comment:
I agree that it does look like RFC 3548 implicitly denies the use of \r and \n.
A few *very* simple tests also makes it look like ommitting them breaks
nothing, but we'd need to add a test that includes them before applying the
patch.
Other than that, I
New submission from Neil Muller :
with make install (r85564), lib/python3.2/concurrent is created, but the
futures module is not installed there. The attached trivial patch fixes this
here.
--
files: futures-Makefile.diff
keywords: patch
messages: 118858
nosy: Neil Muller
priority
Neil Muller added the comment:
There isn't an entry for anyone in maintainers.rst for concurrent.futures
either. That should probably also be fixed.
--
nosy: +bquinlan
___
Python tracker
<http://bugs.python.org/is
Neil Muller added the comment:
So what still needs to happen to get this in?
Patch still applies to current python 3.2 trunk (r85564).
--
___
Python tracker
<http://bugs.python.org/issue1
Neil Schemenauer added the comment:
I'm late to the party but looks like Mark has a good handle on the issues. I
would recommend not changing behavior in a bugfix release. I'm pretty sure
code "in the wild" would be broken.
--
__
Neil Schemenauer added the comment:
Closing this bug. I don't think it makes sense to change the mhlib module in
bugfix release. My patch is fairly simple but not simple enough to make me
feel comfortable.
--
resolution: -> wont fix
status: open -
New submission from Neil Schemenauer :
I'm trying implement some saner module shutdown procedure (similar to issue
812369). One of the many problems I've run into is that the GC doesn't know
about the m_copy attribute of modules.
I think the attached patch is correct. tp_tr
New submission from Neil Schemenauer :
It looks to me like initstdio leaks a reference to "open". AFAIK,
PyObject_SetAttrString() does not steal a reference.
--
assignee: pitrou
components: Interpreter Core
files: initstdio_refleak.txt
messages: 120008
nosy: nascheme, pitro
Neil Schemenauer added the comment:
Oops, my patch doesn't work since m_base can be shared by more than one module
instance. I guess a different solution would be to cleanup the m_copy
references on interpreter shutdown. Somehow they would have to be found t
Neil Schemenauer added the comment:
The attached patch seems better. The copies of module dicts stored in the
interpreter state are dereferenced when the interpreter shuts down.
--
Added file: http://bugs.python.org/file19509/module_m_copy2.txt
New submission from Neil Schemenauer :
I think it should be safe to remove some backwards compatibility cruft. This
was introduced during the 2.3 development cycle.
--
files: gc_cruft.txt
messages: 120554
nosy: nascheme
priority: low
severity: normal
status: open
title: Remove ancient
Neil Muller added the comment:
See issue6490 , which covers much of the same ground.
--
nosy: +Neil Muller
___
Python tracker
<http://bugs.python.org/issue11
Neil Muller added the comment:
This also affects a number of files under Lib, including some that set their
version using "$Revision$".
Since I stumbled on this issue by encountering some code that checks the
version string in tkinker breaking, this is an issue that can break exis
New submission from Neil Muller :
gzip._PaddedFile.__getattr__ chains out to getattr, but does so incorrectly
(found via running the numpy test suite).
The attached patch fixes this.
--
files: gzip_getattr.diff
keywords: patch
messages: 121607
nosy: Neil Muller
priority: normal
Neil Muller added the comment:
Add a test demonstrating the error.
--
Added file: http://bugs.python.org/file19653/gzip_getattr_test.diff
___
Python tracker
<http://bugs.python.org/issue10
Neil Muller added the comment:
The attached patch grabs the os.popen documentation from python 2.7, throws
away the deprecation notes, and adds a pointer to subprocess.Popen for more
details.
--
keywords: +patch
nosy: +Neil Muller
Added file: http://bugs.python.org/file19674
Changes by Neil Muller :
--
versions: +Python 3.2 -Python 2.7
___
Python tracker
<http://bugs.python.org/issue9637>
___
___
Python-bugs-list mailing list
Unsub
Neil Muller added the comment:
The problem is that the getproxies_environment function converts all
environment variables to lower case before deciding whether to use the name.
This means that whichever ends up last in os.environment will be used.
The attached patch does two things. It
Neil Muller added the comment:
#975556 and #1046092 look like they should also be superseded by this.
--
nosy: +Neil Muller
___
Python tracker
<http://bugs.python.org/issue1486
Neil Muller added the comment:
This should probably be solved as part of #1486713 .
--
nosy: +Neil Muller
___
Python tracker
<http://bugs.python.org/issue975
Neil Muller added the comment:
I think this change is makes the parser far too lenient. Something like the
explicit tolerant mode proposed in #1486713 is a better solution.
--
nosy: +Neil Muller
___
Python tracker
<http://bugs.python.
Changes by Neil Muller :
--
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/issue6490>
___
___
Python-bugs-list mailing list
Unsubscribe:
Neil Schemenauer <[EMAIL PROTECTED]> added the comment:
Looks like this has exposed some ugly code. From setup.py:
# Figure out the location of the source code for extension modules
# (This logic is copied in distutils.test.test_sysconfig,
# so building in a separate directory do
Neil Schemenauer <[EMAIL PROTECTED]> added the comment:
I think my previous patch combined with sysconfig_builddir.patch fixes
this issue. Someone will need to test on other platforms. Note that
the messy code in setup.py and in the tests should still be cleaned up.
BTW, distutils is a
Neil Schemenauer <[EMAIL PROTECTED]> added the comment:
One final patch for today (get_python_inc.patch). The patch combines my
previous two patches and also cleans up some ugly code in setup.py and
test_sysconfig.py. The source of the ugliness was that get_python_inc()
did not wor
Changes by Neil Schemenauer <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file10659/test_ext_src.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Neil Schemenauer <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file10660/sysconfig_builddir.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Neil Muller <[EMAIL PROTECTED]> added the comment:
The attached patch is against recent svn (r64442), and adds samwyse's
refactoring of the class. The test for server responses is made less
restrictive when the request isn't HTTP/1.1.
--
nosy: +Neil Muller
Neil Hodgson <[EMAIL PROTECTED]> added the comment:
The recommended addition includes the 'excluded license' section which
appears unnecessary as Python does not distribute any source code
redistributables, only the .DLL file which is a binary executable.
Including this is l
Neil Schemenauer added the comment:
Looks like the 2.7 patch has a spurious change to /Lib/unittest/runner.py.
--
nosy: +nascheme
___
Python tracker
<http://bugs.python.org/issue7
Neil Schemenauer added the comment:
Here is an updated set of patches that includes the ceval_gil.h file as well as
the documentation changes.
--
Added file: http://bugs.python.org/file15974/gil-2.7.txt
___
Python tracker
<http://bugs.python.
Changes by Neil Schemenauer :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue4698>
___
___
Python-bugs-list
Changes by Neil Schemenauer :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue1220756>
___
___
Python-bugs-
New submission from Neil Schemenauer :
Btrfs does not maintain a link count for directories (MacOS does the same I
think). That confuses mhlib.py because it uses os.stat().st_nlinks as an
optimization.
The attached patch removes the optimization and make test_mhlib pass on Btrfs
(and
Neil Schemenauer added the comment:
On Sat, Jan 23, 2010 at 06:09:33PM +, Antoine Pitrou wrote:
> The documentation mentions that mhlib is deprecated and mailbox
> should be used instead. Is there any point in trying to fix it?
It looks like Btrfs will eventually conform to tradi
Neil Schemenauer added the comment:
On Sun, Jan 24, 2010 at 01:25:18AM +, Antoine Pitrou wrote:
> That wasn't really my question. What I ask is: since mhlib is
> deprecated, why do we need to fix it while people are encouraged to use
> mailbox instead?
Sorry, I don't
New submission from Neil Schemenauer :
The commit for issue #7868 added the following line to test_logging:
print >> open('/tmp/tmp.txt', 'w'), type(logger)
I'm not sure if that was intentional but it should be fixed. For one, that
path does not necessarily e
New submission from Neil Schemenauer :
Lib/test/test_distutils.py crashes if Python was built in a directory other
than the source directory. Using a separate build directory is handy if you
are building Python with different sets of configure options since you only
need one copy of the
Neil Muller added the comment:
It looks like this issue was missed in the recent ElementTree update.
Attached is an updated diff for py3k.
--
nosy: +flox
Added file: http://bugs.python.org/file16646/ElementInclude_py3k.diff
___
Python tracker
Neil Muller added the comment:
Similiarly updated patch against current trunk
--
Added file: http://bugs.python.org/file16647/ElementInclude.diff
___
Python tracker
<http://bugs.python.org/issue6
Neil Muller added the comment:
Poking this issue with updated patches.
Patch against py3k.
--
Added file: http://bugs.python.org/file16650/posixmodule_comb_py3k.patch
___
Python tracker
<http://bugs.python.org/issue2
Changes by Neil Muller :
Added file: http://bugs.python.org/file16651/posixmodule_comb.patch
___
Python tracker
<http://bugs.python.org/issue2768>
___
___
Python-bug
Neil Muller added the comment:
Poking the issue with an updated patch for trunk.
--
Added file: http://bugs.python.org/file16652/BaseHTTPServer_continue_3.patch
___
Python tracker
<http://bugs.python.org/issue1
Neil Muller added the comment:
And a py3k version (although the conversion can be improved).
--
Added file:
http://bugs.python.org/file16653/BaseHTTPServer_continue_3_py3k.patch
___
Python tracker
<http://bugs.python.org/issue1
Neil Muller added the comment:
Fair enough.
Possible doc patch attached.
--
Added file: http://bugs.python.org/file16654/fileno_doc.diff
___
Python tracker
<http://bugs.python.org/issue2
Neil Muller added the comment:
More fleshed out doc patch. Mention caveats about using file descriptors
directly, add note to ftruncate similar to that for other dangerous methods.
--
Added file: http://bugs.python.org/file16655/fileno_doc.diff
Neil Muller added the comment:
With the recent ElementTree changes on trunk, this bug no longer applies,
AFAICS.
--
nosy: +Neil Muller, flox
___
Python tracker
<http://bugs.python.org/issue3
Neil Muller added the comment:
> Is it preferable to specify a URL for the "Source"
> field in a .spec file (rather than just a filename)?
Fedora (see for example http://fedoraproject.org/wiki/Packaging/SourceURL )
encourages using a full url when available, so having some w
New submission from Neil Toronto:
I've attached a patch to accelerate type and instance lookups using a
specialized cache. It includes a benchmarking script (fastattr_test.py)
that tests both successful and failing lookups on list, dict and tuple,
and a simple, deep hierarchy. Benchmark re
Neil Toronto added the comment:
Attribute access that happens only once or very infrequently probably
shouldn't go through the cache machinery - it'll only slow things down.
(Updating slots for example.) Maybe _PyType_Lookup should remain the
same, with _PyType_CachingLookup added for
Neil Toronto added the comment:
I've attached the microbenchmarks I was using for my own version of
attribute caching. For list, tuple, dict, and a deep hierarchy, it tests
accessing type attributes (cls.__class__), class attributes
(cls.__init__), class attributes via instance (inst.__cl
New submission from Neil Toronto:
This is a half-port of the patches in #1685986 and #1700288 to Python
3.0. Speedups are about the same as in those patches applied to their
respective Python versions for minibenchmarks (included in the patch as
fastattr_test_py3k.py): 5%-30% or more depending
Neil Toronto added the comment:
This patch adds the ability to invalidate all of a subclasses' cache
entries upon setattr rather than updating just one cache entry. It's not
clear which of these is the Right Thing To Do, so I've made it an #ifdef
for now. It defaults to updati
Neil Schemenauer added the comment:
On Sat, Dec 08, 2007 at 05:14:45AM -, Alexandre Vassalotti wrote:
> The PEP has been deferred and the patch is out of date. So, is this
> change still wanted?
I still think it would make things easier for people using Unicode
with Python 2.x. H
Neil Toronto added the comment:
Yes, as well #1700288 (Armin's attribute lookup caching patch ported to
2.6) or #1685986 (Armin's original for 2.4), or whatever Raymond finds
most convenient.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.p
Neil Toronto added the comment:
Sorry - I'll be more clear. I'd love to see 2.6 get attribute lookup
caching, and Kevin's port (#1700288) of Armin's original 2.4 patch
(#1685986) does that for 2.6. #1685986 (2.4) should be closed and
#1700288 (2.6) should remain open. But R
New submission from Neil Cerutti:
Passing an interable to the __init__ method of an existing deque
appends those elements, rather than reinitializing the deque with the
items. This is contrary to how list.__init__ works.
test_deque.py verifies the (possibly) incorrect behavior
Neil Toronto added the comment:
Well horse pucky. I plum forgot about deletes.
I've attached an update that properly clears the cache entry for the
deleted attribute for all non-shadowing subclasses. (It was a small
change.) Undef'ing ATTRCACHE_SETATTR_INVALIDATES should wor
Neil Toronto added the comment:
There's nothing it tests that standard unit tests don't, so it shouldn't
stick around as a unit test. I used it to time different types of
attribute lookups and left it in as an optimization aid.
The main test groups are '.' access, su
New submission from Neil Roques:
Python's raw strings are supposed to prevent characters being
interpreted as special. However entering the raw string r'\' into an
interactive session will result in:
Traceback ( File "", line 1
r'\'
^
SyntaxErro
New submission from Neil Roques:
http://docs.python.org/ref/node33.html (also packaged in the Python
documentation which comes with Python) links to:
http://www.python.org/doc/newstyle.html for information on new style classes
However, this link has moved, as should now read:
http
Changes by Neil Schemenauer <[EMAIL PROTECTED]>:
--
status: open -> closed
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue628842>
___
Pyt
Neil Schemenauer <[EMAIL PROTECTED]> added the comment:
On Sun, Mar 23, 2008 at 04:17:12PM +, Antoine Pitrou wrote:
> Armin, if you still care about the compiler package, could you (or some
> other pypy coder) take a look at #2459? As part of the patch, it
> rewrites the f
Neil Schemenauer <[EMAIL PROTECTED]> added the comment:
On Thu, Mar 20, 2008 at 08:49:32PM +, Sean Reifschneider wrote:
> Is a straightforward patch, but I'd like NAS to comment on the change in
> behavior. Probably would also need a documentation change, are you up
> f
Neil Schemenauer <[EMAIL PROTECTED]> added the comment:
The original code is pretty icky. I'm attaching a patch that improves
it, IMO. Before the elapsed time was only shown if garbage was found.
I think it should always be shown if DEBUG_STATS is set.
--
nosy: +nas
Added
Neil Schemenauer <[EMAIL PROTECTED]> added the comment:
On Tue, Mar 25, 2008 at 09:18:38AM +, Armin Rigo wrote:
> The situation is that by now PyPy has found many many more bugs in
> trying to use the compiler package to run the whole stdlib and
> real-world applications. Wha
Neil Muller <[EMAIL PROTECTED]> added the comment:
The documentation says:
For *host* and *port*, by passing either an empty string or ``None``,
you can pass ``NULL`` to the C API, so the documentation says it should
work.
This doesn't work because PyString_AsString retruns an e
Neil Muller <[EMAIL PROTECTED]> added the comment:
The attached patch changes most functions in posixmodule which require a
filedescriptor to use PyObjectAsDescriptor
There are a few cases, where I'm not certain of the usefulness of
changing the functions to support objects with
Neil Muller <[EMAIL PROTECTED]> added the comment:
Patches to test_posix.py to also test using file objects in os.fstat and
such.
Added file: http://bugs.python.org/file10243/test_posix.diff
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Neil Muller <[EMAIL PROTECTED]> added the comment:
Update stdtypes.rst to note that %x, %X, %o can take signed values.
Note that %u is consider obsolete (referring to PEP 237)
Add a note on the length modifier description to clarify the meaning.
--
keywords: +patch
nosy: +Neil
New submission from Neil Muller <[EMAIL PROTECTED]>:
split with no sep specified will not return an empty string, whereas
split with sep specified will.
The attached patch updates the docstring to reflect this for str.split
and unicode.split.
--
files: split_docstring.diff
ke
Changes by Neil Muller <[EMAIL PROTECTED]>:
--
assignee: -> georg.brandl
components: +Documentation
nosy: +georg.brandl
versions: +Python 2.6
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.py
Neil Muller <[EMAIL PROTECTED]> added the comment:
datetime has fromtimestamp already, so using totimestamp keeps naming
consistency (see toordinal and fromordinal).
--
nosy: +Neil Muller
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Neil Muller <[EMAIL PROTECTED]> added the comment:
This patch combines the two earlier patches, and also updates the
docstrings and os.rst to reflect the changed behaviour.
Added file: http://bugs.python.org/file10281/posixmodule_2.patch
__
Tracker &
New submission from Neil Schemenauer <[EMAIL PROTECTED]>:
Building in a separate directory got broken at some point. The code is
hairy but it looks like the source of the problem was a lame
sysconfig.get_python_inc() function. The attached patches fix things
and hopefully do not introdu
1 - 100 of 674 matches
Mail list logo