Fred Drake
22c0706a58
fix decoding in _stringify to not depend on the default encoding
...
(closes SF bug #1115989 )
2005-02-11 17:59:08 +00:00
Brett Cannon
64d904b715
Remove set conversion optimization test (backed out of Python/compile.c in rev.
...
2.344).
2005-02-10 20:40:29 +00:00
Fred Drake
ba613c3410
accept datetime.datetime instances when marshalling;
...
dateTime.iso8601 elements still unmarshal into xmlrpclib.DateTime objects
2005-02-10 18:33:30 +00:00
Andrew M. Kuchling
bfd7d6a0ea
Fix typo
2005-02-10 13:24:50 +00:00
Peter Astrand
d38ddf4ca2
Patch from Leandro Lucarella: replaced:
...
var == None and var != None
with
var is None and var is not None
and type(var) == int
with
instanceof(var, int)
...as recomended in PEP 8 [1].
2005-02-10 08:32:50 +00:00
Raymond Hettinger
508e81eda0
Convert splitlines to for-loop (handles case where input does not have a trailing newline).
2005-02-08 15:39:11 +00:00
Walter Dörwald
a9620d1e2b
Fix stupid typo: Don't read from a writer.
2005-02-08 10:10:01 +00:00
Raymond Hettinger
bb5fbc4af9
Wholistic code cleanup / modernization:
...
* Use +=
* Replace loop logic with str.splitlines equivalent
* Don't use variable names that shadow tuple, list, and str
* Use dict.get instead of equivalent try/except
* Minor loop logic simplications
2005-02-08 08:05:13 +00:00
Raymond Hettinger
7fcb7869ba
Adopt Skip's idea to optimize lists of constants in the context
...
of a "in" or "not in" test.
2005-02-07 19:32:38 +00:00
Raymond Hettinger
fe59dc1bd8
Revert previous checkin.
2005-02-07 15:28:45 +00:00
Raymond Hettinger
f715366f23
Reduce the usage of the types module.
2005-02-07 14:16:21 +00:00
Raymond Hettinger
a164574937
Transform "x in (1,2,3)" to "x in frozenset([1,2,3])".
...
Inspired by Skip's idea to recognize the throw-away nature of sequences
in this context and to transform their type to one with better performance.
2005-02-06 22:05:42 +00:00
Raymond Hettinger
dbecd93b72
Replace list of constants with tuples of constants.
2005-02-06 06:57:08 +00:00
Raymond Hettinger
f7bf02ded5
SF patch #1028908
...
(John J Lee)
Minor code clarification and simplification.
2005-02-05 14:37:06 +00:00
Raymond Hettinger
bab4143348
SF patch #1116583 : NameError in cookielib domain check
2005-02-05 01:31:19 +00:00
Walter Dörwald
1f1d252f51
Add a test for UTF-16 reading where the byte sequence doesn't start with
...
a BOM.
2005-02-04 14:15:34 +00:00
Thomas Heller
07561b3b8e
Recompiled after source changes.
2005-02-03 20:48:26 +00:00
Fred Drake
e4772f3ada
fix XMLFilterBase.resolveEntity() so the caller gets the result
...
(PyXML bug #1112052 )
2005-02-03 17:31:39 +00:00
Guido van Rossum
d064142579
Security fix PSF-2005-001 for SimpleXMLRPCServer.py.
2005-02-03 15:01:24 +00:00
Kurt B. Kaiser
0676dfdce0
Add config-main.def option to make the 'history' feature non-cyclic.
...
Default remains cyclic. Python Patch 914546 Noam Raphael.
M IdleHistory.py
M NEWS.txt
M config-main.def
2005-02-03 01:37:14 +00:00
Steve Holden
69b8caa23a
Simplify string comparison using startswith()
2005-02-02 18:47:18 +00:00
Kurt B. Kaiser
acdef858a5
Removed ability to configure tabs indent from Options dialog. This 'feature'
...
has never worked and no one has complained. It is still possible to set a
default tabs (v. spaces) indent 'manually' via config-main.def (or to turn on
tabs for the current EditorWindow via the Format menu) but IDLE will encourage
indentation via spaces.
Enable setting the indentation width using the Options dialog.
Bug # 783877
Remove some commented out old code from configDialog.py (related to old
methods for invoking the HelpBrowser).
M EditorWindow.py
M NEWS.txt
M configHandler.py
2005-01-31 03:34:26 +00:00
Martin v. Löwis
1d11de6dbd
Revert os.py 1.75, and directly implement update.
...
Fixes #1110478 and #1100235 .
2005-01-29 13:29:23 +00:00
Kurt B. Kaiser
3069dbb8ec
Add keybindings for del-word-left and del-word-right.
...
M EditorWindow.py
M NEWS.txt
M config-keys.def
M configHandler.py
2005-01-28 00:16:16 +00:00
Brett Cannon
90cece7f89
Fixed typo in verbose output.
...
Closes bug #1110998 . Thanks Matthew Bogosian.
2005-01-27 22:48:30 +00:00
Raymond Hettinger
9feb267caf
Do not fold a constant if a large sequence will result.
...
Saves space in the presence of code like: (None,)*10000
2005-01-26 12:50:05 +00:00
Johannes Gijsbers
926d45bb4e
shutil.copytree: move copystat call for the directory after the loop
...
copying files inside the directory, as that loop changes the atime and
mtime.
2005-01-23 12:20:15 +00:00
Martin v. Löwis
4d394dfebb
Truncate st_?time before comparing it with ST_?TIME in the tests.
2005-01-23 09:19:22 +00:00
Walter Dörwald
1083c248df
Add a slice test with high < low.
2005-01-21 21:16:51 +00:00
Thomas Heller
1d1eac3ce8
Fix [ 1103844 ] fix distutils.install.dump_dirs() with negated options.
...
Will backport myself.
2005-01-20 19:14:17 +00:00
Kurt B. Kaiser
6af4498602
1. Polish tabbing code.
...
2. Restore use of set_indentation_params(), was dead code since
Autoindent.py was merged into EditorWindow.py.
3. Make usetabs, indentwidth, tabwidth, context_use_ps1 instance vars
and set in EditorWindow.__init__()
4. In PyShell.__init__() set usetabs, indentwidth and context_use_ps1
explicitly (config() is eliminated).
5. Add Tabnanny check when Module is Run/F5, not just when Checked.
6. Discourage using an indent width other than 8 when using tabs to
indent Python code.
M EditorWindow.py
M NEWS.txt
M PyShell.py
M ScriptBinding.py
2005-01-19 00:22:59 +00:00
Kurt B. Kaiser
b00e89faab
If an extension can't be loaded, print warning and skip it instead of
...
erroring out.
2005-01-18 00:54:58 +00:00
Skip Montanaro
891a1ba3b2
allow triple-quoted string output from reconvert.quote()
2005-01-16 19:31:40 +00:00
Johannes Gijsbers
5954623bc0
Patch #1100140 : improved smtp connect debugging
...
Don't print the same (host, port) tuple thrice when debugging, but first print
(host, port), then (ip, port) and then the error message.
2005-01-16 13:04:30 +00:00
Martin v. Löwis
22b457e03b
Added SEEK_* constants. Fixes #711830 .
2005-01-16 08:40:58 +00:00
Guido van Rossum
5a8a03784e
Use descriptors.
2005-01-16 00:25:31 +00:00
Guido van Rossum
fee7b93c60
Use decorators.
2005-01-16 00:21:28 +00:00
Guido van Rossum
75b64e65f1
Use decorators.
2005-01-16 00:16:11 +00:00
Tim Peters
608c2fff69
Whitespace normalization.
2005-01-13 17:37:38 +00:00
Vinay Sajip
a1974c1459
Improved SysLogHandler error recovery (patch by Erik Forsberg)
2005-01-13 08:23:56 +00:00
Skip Montanaro
0af3ade6aa
Add strptime() constructor to datetime class. Thanks to Josh Spoerri for
...
the changes.
2005-01-13 04:12:31 +00:00
Andrew McNamara
7f2053eff3
Add counting of source iterator lines to the reader object - handy for
...
user error messages (otherwise difficult to do without instrumenting
the source).
2005-01-12 11:17:16 +00:00
Andrew McNamara
0f0599ddc1
When quoting=QUOTE_NONNUMERIC, the reader now casts unquoted fields
...
to floats.
2005-01-12 09:45:18 +00:00
Andrew McNamara
5d45a8dc22
Fix logic problem in quoting=csv.QUOTE_ALL, quotechar=None check, add test.
2005-01-12 08:16:17 +00:00
Andrew McNamara
c89f284df8
When using QUOTE_NONNUMERIC, we now test for "numericness" with
...
PyNumber_Check, rather than trying to convert to a float. Reimplemented
writer - now raises exceptions when it sees a quotechar but neither
doublequote or escapechar are set. Doublequote results are now more
consistent (eg, single quote should generate """", rather than "",
which is ambiguous).
2005-01-12 07:44:42 +00:00
Andrew McNamara
31d8896ee2
Rename csv.set_field_limit to csv.field_size_limit (since it both sets and
...
gets).
2005-01-12 03:45:10 +00:00
Andrew McNamara
af1e312b3b
Improve test coverage fractionally.
2005-01-12 01:55:21 +00:00
Kurt B. Kaiser
1b6f398c98
Improve error handling when .idlerc can't be created.
2005-01-11 19:29:39 +00:00
Raymond Hettinger
faa10ebdd0
SF bug #1099516 : tempfile files not types.FileType
...
Clarified that the returned object is file-like rather than an actual file.
2005-01-11 15:33:03 +00:00
Andrew McNamara
e4d05c4f93
Set an upper limit on the size of the field buffer, raise an exception
...
when this limit is reached. Limit defaults to 128k, and is changed
by module set_field_limit() method. Previously, an unmatched quote
character could result in the entire file being read into the field
buffer, potentially exhausting virtual memory.
2005-01-11 07:32:02 +00:00