Jukka Laurila [EMAIL PROTECTED] added the comment:
Brett, the ability to define the allocator dynamically at runtime could
be a compile time option, turned on by default only on small memory
platforms. On most platforms you can live with plain old malloc and may
want to avoid the indirection. If
Raymond Hettinger [EMAIL PROTECTED] added the comment:
Applied in r64835.
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3287
___
New submission from Carl Johnson [EMAIL PROTECTED]:
Compare the following behaviors:
Python 3.0a5 (r30a5:62856, May 10 2008, 10:34:28)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type help, copyright, credits or license for more
information.
def f(x):
... if x 5:
Nick Coghlan [EMAIL PROTECTED] added the comment:
Given where we are in the release cycle, I've bumped the target releases
to 2.7/3.1. So Symbian are probably going to have to do something
port-specific anyway in order to get 2.6/3.0 up and running.
And in terms of hooking into this kind of
Nick Coghlan [EMAIL PROTECTED] added the comment:
A better option may be to append _tmp to the passed in token:
#define Py_CLEAR(op)\
do {\
if (op) { \
PyObject
Raymond Hettinger [EMAIL PROTECTED] added the comment:
I think it is reasonable to get a macro definition change into 2.6.
The OP's request is essential for his application (running Python
on Nokia phones) and it would be a loss to wait two years for this.
Also, his request for a macro will
Daniel Stutzbach [EMAIL PROTECTED] added the comment:
Appending _tmp is a good idea, but it won't work when the parameter
isn't a simple symbol. For example, there's a line in cPickle.c like
this: Py_CLEAR(*p).
___
Python tracker [EMAIL PROTECTED]
Changes by Raymond Hettinger [EMAIL PROTECTED]:
--
assignee: rhettinger -
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1700288
___
___
Changes by Raymond Hettinger [EMAIL PROTECTED]:
--
assignee: rhettinger -
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1568
___
___
Python-bugs-list
New submission from Jens Diemer [EMAIL PROTECTED]:
The doctest doesn't work good, if a function returns a dict.
Here a simple example:
def test(d):
This works:
test({A:1, B:2, C:3})
{'A': 1, 'C': 3, 'B': 2}
This failed, because of different dict sort:
test({A:1,
Raymond Hettinger [EMAIL PROTECTED] added the comment:
Fixed in 64845.
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3301
___
Tarek Ziadé [EMAIL PROTECTED] added the comment:
This is not a bug: dict do not guarantee the ordering of the keys, so it
may change on every run.
A good practice is to test a sorted .items() output of your dict in your
doctest.
--
nosy: +tarek
___
Raymond Hettinger [EMAIL PROTECTED] added the comment:
Closing as not a bug.
FWIW, here's the relevant text from the docs:
-
23.2.3.6 Warnings
doctest is serious about requiring exact matches in expected output. If
even a single character doesn't
Raymond Hettinger [EMAIL PROTECTED] added the comment:
Adopted the solution used by functions in the math module. Functions
that accept floats also accept integral inputs. This improves
usability in face of mixed float/int data or decimal/int data.
See r64846.
--
resolution: -
Changes by Raymond Hettinger [EMAIL PROTECTED]:
--
nosy: rhettinger
priority: high
severity: normal
status: open
title: Need -3 warning for exec statement becoming a function
versions: Python 2.6
___
Python tracker [EMAIL PROTECTED]
Matt Giuca [EMAIL PROTECTED] added the comment:
I was able to duplicate this, but it's an issue with Firefox, not
Python. webbrowser.open(url) just passes url as a command line argument
to the web browser; it doesn't do any manipulation.
Note that you get the exact same behaviour if you run
Matt Giuca [EMAIL PROTECTED] added the comment:
You seem to be suggesting that a StopIteration raised in the body of a
for-loop should cause the loop to break. That isn't (as far as I know)
the point of StopIteration. StopIteration is only used to break the
for-loop when raised by the iterator,
Matt Giuca [EMAIL PROTECTED] added the comment:
Setting Version back to Python 3.0. Is there a reason it was set to
Python 3.1? This proposal will certainly break a lot of code. It's *far*
better to do it in the big backwards-incompatible Python 3.0 release
than a later release.
--
Guido van Rossum [EMAIL PROTECTED] added the comment:
IMO the generator expression is wrong in interpreting the StopIteration
as a break. It should fail just like the list comprehension fails.
--
nosy: +gvanrossum
___
Python tracker [EMAIL PROTECTED]
New submission from Christian Theune [EMAIL PROTECTED]:
I got this output from 2to3:
(This is from setuptools egg_info.py)
-import bdist_egg; bdist_egg.write_safety_flag(cmd.egg_info, safe)
+from . import bdist_egg; bdist_egg.write_safety_flag(cmd.egg_info, safe)
--
assignee:
Adam Olsen [EMAIL PROTECTED] added the comment:
Basically you just want to kick the malloc implementation into doing
some housekeeping, freeing its caches? I'm kinda surprised you don't
add the hook directly to your libc's malloc.
IMO, there's no use-case for this until Py_Finalize can
Jesse Noller [EMAIL PROTECTED] added the comment:
FWIW: the threading tests still hang for me with the latest patch. I'm
confirming that the patch itself fixes the hanging MP tests though
___
Python tracker [EMAIL PROTECTED]
Collin Winter [EMAIL PROTECTED] added the comment:
- You should add tests to test_fixers to ensure that this does what you
expect. This will make it much easier for others to modify this fixer
later. You can probably just reuse the tests Brett initially added.
- There's a better data structure
New submission from Justin Harper [EMAIL PROTECTED]:
When I make the same shell call a second time, a weird error occurs.
It appears that the system is caching the call and then returning the
same object the second time, which causes a problem because the stream
is at EOF and there is no way
Justin Harper [EMAIL PROTECTED] added the comment:
Correction: line two should actually be:
self.output = fout.readlines()
The bug still exists with this change.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3335
Erik Stephens [EMAIL PROTECTED] added the comment:
I'm not sure this is still being considered, so I just wanted to add my
opinion. This seems like such a simple request being made overly
complicated. We just want seconds since epoch since that is used in
many other functions and libraries
New submission from ryanboesch [EMAIL PROTECTED]:
Leap year ignored each century (2100, 2200, 2300, etc.) except 2000 for
the weekday() function. This code reproduces the error:
import datetime
datetime.date(2100,2,29).weekday()
Error message:
ValueError: day is out of range for the month
Tim Peters [EMAIL PROTECTED] added the comment:
The error message is correct. In the Gregorian calendar, years
divisible by 100 are not leap years, unless they're also divisible by
400. So 2000, 2400, 2800, ..., are leap years, but 2100, 2200, 2300,
2500, 2600, 2700, 2900, ... are not leap
Martin v. Löwis [EMAIL PROTECTED] added the comment:
Setting Version back to Python 3.0. Is there a reason it was set to
Python 3.1?
3.0b1 has been released, so no new features can be added to 3.0.
___
Python tracker [EMAIL PROTECTED]
John J Lee [EMAIL PROTECTED] added the comment:
* The patch looks like it will break code that uses .header_items(),
which is not acceptable.
* The patch to the docs seems to muddy the waters even further (than the
current slightly murky state) about whether and why .headers is to be
preferred
Mark Dickinson [EMAIL PROTECTED] added the comment:
Here's a slightly more polished version of the previous patch; no
behaviour changes.
Let me know if there's anything I can do to help get this in before next
week's beta. Anybody want to trade patch reviews?
Added file:
New submission from Benjamin Peterson [EMAIL PROTECTED]:
No, I don't think we do. This is something that 2to3 can handle well,
and also rather pointless because it would be impossible to get rid of
the warning in 2.x because exec isn't a function in 2.x.(short of
removing the exec completely!)
Facundo Batista [EMAIL PROTECTED] added the comment:
John:
You say that it will break code because it changes the capitalization
policy, or because other reason? Do you think that there's a way to fix
this issue and not break the code?
If you really think that this breaks code, please provide
Brett Cannon [EMAIL PROTECTED] added the comment:
What Collin said. =)
I will put robotparser and urlparse into fix_imports myself and continue
to update the docs in 2.x for urllib(2).
Thanks to the both of you for helping with this! It's going to be great
once this fixer is ready to go as it
New submission from Brett Cannon [EMAIL PROTECTED]:
The fixer for dbm to dbm.ndbm fails test_fixers.Test_imports .
--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
messages: 69526
nosy: brett.cannon, collinwinter
priority: critical
severity: normal
status: open
Changes by Brett Cannon [EMAIL PROTECTED]:
--
dependencies: +Fixer for dbm is failing
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2775
___
___
Changes by Brett Cannon [EMAIL PROTECTED]:
--
dependencies: +fix_imports does not handle intra-package renames
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2775
___
Brett Cannon [EMAIL PROTECTED] added the comment:
The failure seems to be from anydbm being mapped directly to dbm:
import anydbm - import dbm - import dbm.ndbm
A separate pass might be needed to handle dbm properly so that an import
is not changed multiple times.
Senthil [EMAIL PROTECTED] added the comment:
John J Lee [EMAIL PROTECTED] added the comment:
* The patch looks like it will break code that uses .header_items(),
which is not acceptable.
Nope, it does not break. If the concern was subclassing dict may have adverse
effect on .copy and
Facundo Batista [EMAIL PROTECTED] added the comment:
If readability is enhanced is questionable, but is rejected on the basis
that cosmetic-only changes are not generally recommended: only
difficults following the code evolution in the repository.
The only change that I see regarding
Facundo Batista [EMAIL PROTECTED] added the comment:
That class is normally used at the end of the testing suite, as is
recommended in the documentation.
In any case, I don't see that like a bug, so we shouldn't be changing
that behaviour, because of compatibility.
What do you think? Maybe the
Brett Cannon [EMAIL PROTECTED] added the comment:
I have a potential solution brewing; running the full test suite to verify.
--
status: open - pending
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3337
New submission from Darryl Dixon [EMAIL PROTECTED]:
In at least Python 2.4, using cPickle.Pickler to try and pickle a nested
chain of objects more than about 2590 objects deep causes the Python
interpreter to segfault. This doesn't seem to happen when using the pure
Python pickle module.
It is
Brett Cannon [EMAIL PROTECTED] added the comment:
r64870 has the fix through fix_imports2.
--
resolution: - fixed
status: pending - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3337
___
44 matches
Mail list logo