| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
invalid filenames on Windows when building without specifying a
version number in the setup script.
See also
http://mail.python.org/pipermail/distutils-sig/2001-November/002656.html
Bugfix candidate.
|
|
|
|
| |
properly set. This fixes that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
initialized, this will be None, but the functions will still work (there will
simply be a bogus parent on the screen). Allowing the parent to be None
is useful when testing the functions from an interactive interpreter.
Add an optional keyword paramter "show" to the _QueryString class; when given
it is used to set the -show option to the entry widget. This allows passing
show="*" or the like to askstring(), making it useful for requesting
passwords/passphrases from the user.
This closes SF bug #438517.
Changed a docstring to be less font-lock-hostile.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Big Hammer to implement -Qnew as PEP 238 says it should work (a global
option affecting all instances of "/").
pydebug.h, main.c, pythonrun.c: define a private _Py_QnewFlag flag, true
iff -Qnew is passed on the command line. This should go away (as the
comments say) when true division becomes The Rule. This is
deliberately not exposed to runtime inspection or modification: it's
a one-way one-shot switch to pretend you're using Python 3.
ceval.c: when _Py_QnewFlag is set, treat BINARY_DIVIDE as
BINARY_TRUE_DIVIDE.
test_{descr, generators, zipfile}.py: fiddle so these pass under
-Qnew too. This was just a matter of s!/!//! in test_generators and
test_zipfile. test_descr was trickier, as testbinop() is passed
assumptions that "/" is the same as calling a "__div__" method; put
a temporary hack there to call "__truediv__" instead when the method
name is "__div__" and 1/2 evaluates to 0.5.
Three standard tests still fail under -Qnew (on Windows; somebody
please try the Linux tests with -Qnew too! Linux runs a whole bunch
of tests Windows doesn't):
test_augassign
test_class
test_coercion
I can't stay awake longer to stare at this (be my guest). Offhand
cures weren't obvious, nor was it even obvious that cures are possible
without major hackery.
Question: when -Qnew is in effect, should calls to __div__ magically
change into calls to __truediv__? See "major hackery" at tail end of
last paragraph <wink>.
|
|
|
|
|
| |
the node being added is a fragment node.
This closes SF bug #487929.
|
|
|
|
| |
This should probably go into NEWS (who's responsible for that?).
|
|
|
|
|
|
| |
It was easier than I thought, assuming that no other things contribute
to the instance size besides slots -- a pretty good bet. With a test
suite, no less!
|
|
|
|
|
| |
method.
This closes SF patch #486079.
|
| |
|
|
|
|
|
|
|
|
|
| |
happy if one could delete the __dict__ attribute of an instance. I
love to make Jim happy, so here goes...
- New-style objects now support deleting their __dict__. This is for
all intents and purposes equivalent to assigning a brand new empty
dictionary, but saves space if the object is not used further.
|
|
|
|
|
| |
pertains to the script is now in the if __name__ == "__main__" block.
This is in response to a commenton python-dev from Neal Norwitz.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
int_mul(): new and vastly simpler overflow checking. Whether it's
faster or slower will likely vary across platforms, favoring boxes
with fast floating point. OTOH, we no longer have to worry about
people shipping broken LONG_BIT definitions <0.9 wink>.
|
|
|
|
|
| |
By default, save sys.stdout in self.file when a Hook instance is created
(e.g. when cgitb.enable() is called).
|
|
|
|
| |
$BROWSER should be split on os.pathsep, not on ":".
|
|
|
|
|
|
|
| |
There's now a new structmember code, T_OBJECT_EX, which is used for
all __slot__ variables (except __weakref__, which has special behavior
anyway). This new code raises AttributeError when the variable is
NULL rather than converting NULL to None.
|
|
|
|
|
| |
Armin Rigo (SF bug #488477). Added a testcase to test_unpack_iter()
in test_iter.py.
|
|
|
|
|
| |
#486375, but not the rest of it, since that changes the documented
semantics of encode().
|
|
|
|
|
|
| |
In goahead(), use a bound version of rawdata.startswith() since we use the
same method all the time and never change the value of rawdata. This can
save a lot of bound method creation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than tweaking the inheritance of type object slots (which turns
out to be too messy to try), this fix adds a __hash__ to the list and
dict types (the only mutable types I'm aware of) that explicitly
raises an error. This has the advantage that list.__hash__([]) also
raises an error (previously, this would invoke object.__hash__([]),
returning the argument's address); ditto for dict.__hash__.
The disadvantage for this fix is that 3rd party mutable types aren't
automatically fixed. This should be added to the rules for creating
subclassable extension types: if you don't want your object to be
hashable, add a tp_hash function that raises an exception.
Also, it's possible that I've forgotten about other mutable types for
which this should be done.
|
|
|
|
|
|
| |
1.24 wouldn't have occurred in the first place.
Remove a debug print command accidentally inserted by Martin in 1.23.
|
|
|
|
| |
all in MacPython. (why did noone ever notice this?)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SF patch #480716 by Greg Chapman fixes the problem that super's
__get__ method always returns an instance of super, even when the
instance whose __get__ method is called is an instance of a subclass
of super.
Other issues fixed:
- super(C, C()).__class__ would return the __class__ attribute of C()
rather than the __class__ attribute of the super object. This is
confusing. To fix this, I decided to change the semantics of super
so that it only applies to code attributes, not to data attributes.
After all, overriding data attributes is not supported anyway.
- While super(C, x) carefully checked that x is an instance of C,
super(C).__get__(x) made no such check, allowing for a loophole.
This is now fixed.
|
|
|
|
| |
on keybinding configuration
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
more similar.
|
|
|
|
| |
changes from start of branch upto r22b2 were already merged, of course).
|
|
|
|
|
| |
fixes the problem reported in SF bug #477023 (Jonathan Mark): "pdb:
unexpected path confuses Emacs".
|
|
|
|
|
|
| |
ZipFile.__del__(): call ZipFile.close(), like its docstring says it does.
ZipFile.close(): allow calling more than once (as all file-like objects
in Python should support).
|
| |
|
|
|
|
|
|
|
|
| |
output.
Patch includes additional test case test_basic_line_wrap().
This patch is a candidate for Python 2.1.2.
|
| |
|
|
|
|
|
|
|
|
| |
More changes to the formatdate epoch test: the Mac epoch is in
localtime, so east of GMT it falls in 1903:-( Changed the test to
obtain the epoch in both local time and GMT, and do the right
thing in the comparisons. As a sanity measure also check that
day/month is Jan 1.
|
|
|
|
|
|
| |
_verify(): Pass in the values of globals insted of eval()ing their
names. The use of eval() was obscure and unnecessary, and the patch
claimed random.py couldn't be used in Jython applets because of it.
|
|
|
|
|
| |
Expose Tix.ResizeHandle.{detach_widget,hide,show}.
Update Tix demos.
|
| |
|
|
|
|
|
|
| |
- Add tests for the recent fixes to copy_reg.py:
__getstate__/__setstate__ and mixed inheritance from new+classic
classes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix for SF bug #482752: __getstate__ & __setstate__ ignored (by Anon.)
In fact, only __getstate__ isn't recognized. This fixes that.
- Separately, the test for base.__flags__ & _HEAPTYPE raised an
AttributeError exception when a classic class was amongst the
bases. Fixed this with a hasattr() bandaid (classic classes never
qualify as the "hard" base class anyway, which is what the code is
trying to find).
|
| |
|