| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Here's my suggested replacement for gzip.py for 1.5.1. I've
re-implemeted methods readline and readlines, added an _unread, and
tweaked read and _read.
I tried a more complicated buffer scheme for unread (using a list of
strings and string.join), but it was more complicated and slower.
This version is a lot faster than the current version and is still
pretty simple.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed problems when unpickling in restricted execution environments.
These methods try to assign to an instance's __class__ attribute, or
access the instances __dict__, which are prohibited in REE. For the
first two methods, I re-implemented the old behavior when assignment
to value.__class__ fails.
For the load_build() I also re-implemented the old behavior when
inst.__dict__.update() fails but this means that unpickling in REE is
semantically different than unpickling in unrestricted mode.
|
|
|
|
|
| |
a copy of the defaults dictionary and merges the section's dictionary
into it so that sections can override the defaults.
|
|
|
|
|
|
| |
- added docstrings
- support option to specify a different purported directory name
- reindented with 4 spaces
|
| |
|
|
|
|
| |
would set the transfer to text mode instead of the specified mode.
|
| |
|
|
|
|
|
|
| |
HTTP/1.x 200
instead of
HTTP/1.x 200 OK
|
|
|
|
|
|
| |
- fix type_to_name(); it never worked
- add path_to_selector()
add path_to_datatype_name()
|
|
|
|
|
|
|
| |
Added an optional third parameter giving the purported filename for
error messages from the module.
Append a newline to the code string if needed.
|
| |
|
| |
|
| |
|
|
|
|
| |
sys.prefix is no longer empty on any platform that I know of.
|
|
|
|
|
|
|
| |
(1) maxsplit was ignored in split().
(2) groups() would return a string instead of a singleton tuple when
there was only one group.
|
| |
|
|
|
|
|
| |
Added _test() that behaves (a bit) like gzip.
Fix a comment (*sequential* access is okay -- *random* access it out!)
|
| |
|
| |
|
| |
|
|
|
|
| |
patches provided by Greg (am I glad I sent him my latest version!).
|
|
|
|
|
|
| |
input. When an EOF is read, break out of the loop instead of (by
default) writing an empty line (which doesn't do much good). Don't
close self when falling through the loop.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The invoke methods of the three Tkinter widgets Button,
Checkbutton and Radiobutton should return the value returned by
the callback, (like the Menu widget does):
def invoke(self):
return self.tk.call(self._w, 'invoke')
* The select_from method of the Canvas widget should use 'from', not
'set':
def select_from(self, tagOrId, index):
self.tk.call(self._w, 'select', 'from', tagOrId, index)
Currently, if you use select_from, you get the error message:
'TclError: bad select option "set": must be adjust, clear, from, item, or to'
* The 'entrycget' and 'type' methods of the Tk menu widget are
missing from Tkinter.
* There is a bug in grid_columnconfigure and grid_rowconfigure. For
example, this should return the current value of the 'minsize'
option for column 0:
f.grid_columnconfigure(0, 'minsize')
Instead it returns the same as:
f.grid_columnconfigure(0)
I suggest that the hint given in the comment in the
Tkinter.Misc.configure method should be followed - "ought to
generalize this so tag_config etc. can use it". Repeating the
same configure code several times in Tkinter is inviting errors.
[I did not follow this advice --G]
* The grid_slaves method should handle options. Currently, to pass
options to the grid_slaves method, you have to do something like:
grid_slaves('-row', 1)
|
| |
|
|
|
|
| |
and a little editing my me).
|
|
|
|
|
|
|
|
|
|
| |
retrieving files from the same host and directory, you had to close
the previous instance before opening a new one; and retrieving a
non-existent file would return an empty file. (The latter fix relies
on maybe an undocumented property of NLST -- NLST of a file returns
just that file, while NLST of a non-existent file returns nothing. A
side effect, unfortunately, seems to be that now ftp-retrieving an
*empty* directory may fail. Ah well.)
|
|
|
|
| |
is near or beyond the edge of the screen. Patch by Skip Montanaro.
|
| |
|
|
|
|
| |
optional timeout. Also moved some imports around.
|
| |
|
|
|
|
|
| |
the Demos/cwilib directory). Converted comments to doc strings and
used default arguments instead of *args. Updated the example.
|
|
|
|
| |
the temporary file name. Also some minor formatting of Jim F's code.
|
| |
|
| |
|
|
|
|
| |
Guido, please take a look at this.
|
| |
|
| |
|
| |
|
|
|
|
| |
Prevent the test from failing there.
|
| |
|
| |
|
|
|
|
| |
the option name (prepend '-', strip trailing '_').
|
| |
|
|
|
|
|
| |
bind_class() and bind_all() are destroyed when the widget to which
they were passed is destroyed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The attached patch adds the following behavior to the handling
of REDUCE codes:
- A user-defined type may have a __reduce__ method that returns
a string rather than a tuple, in which case the object is
saved as a global object with a name given by the string returned
by reduce.
This was a feature added to cPickle a long time ago.
- User-defined types can now support unpickling without
executing a constructor.
The second value returned from '__reduce__' can now be None,
rather than an argument tuple. On unpickling, if the
second value returned from '__reduce__' during pickling was
None, then rather than calling the first value returned from
'__reduce__', directly, the '__basicnew__' method of the
first value returned from '__reduce__' is called without
arguments.
I also got rid of a few of Chris' extra ()s, which he used
to make python ifs look like C ifs.
|
|
|
|
|
|
| |
__builtins__ for all calls to eval(). This still allows someone to
write string.atof("[1]*1000000") (which Jim Fulton worries about) but
effectively disables access to system modules and functions.
|
|
|
|
|
|
|
|
|
| |
have been configured, string.atof() should not fail when "import re"
fails (usually because pcre is not there).
This opens up a tiny security hole: *if* an attacker can make "import
re" fail, they can also make string.atof(arbitrary_string) evaluate
the arbitrary string. Nothing to keep me awake at night...
|
|
|
|
|
|
| |
mode. The pickler always uses base 10 so the default base should be
fine. (The base gets us in trouble when there's no strop module, as
the atoi() in string.py only supports base 10. This is for JPython.)
|
| |
|
|
|
|
| |
Untabified and minor tweaks by me.
|