[issue9093] Tools/README is out of date

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Non-existing tools removed by Mark in r82515. There are still tools (see '-' lines above that need a README entry.) -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.

[issue9093] Tools/README is out of date

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Also I believe 2to3 deserves to be mentioned in README. -- ___ Python tracker <http://bugs.python.org/issue9093> ___ ___

[issue9093] Tools/README is out of date

2010-07-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +georg.brandl ___ Python tracker <http://bugs.python.org/issue9093> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9151] Demo/classes/Dates.py does not work in 3.x

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r82517. -- ___ Python tracker <http://bugs.python.org/issue9151> ___ ___ Python-bugs-list mailing list Unsub

[issue9151] Demo/classes/Dates.py does not work in 3.x

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed some minor "modernization" changes in r82521. Given that datetime.py is in the works (see issue7989), I don't think there is any reason to polish this demo further. -- resolution: -> accepted stat

[issue9152] Dead code in datetime module

2010-07-03 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Apparently introduced by a wholesale elimination of PyString_ in r57374, the else clause in the following snippet from call_tzname is redundant: if (!PyUnicode_Check(result)) { PyErr_Format(PyExc_TypeError, "tzinfo.tzname()

[issue9152] Dead code in datetime module

2010-07-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: +patch nosy: +mark.dickinson resolution: -> accepted stage: -> commit review Added file: http://bugs.python.org/file17851/issue9152.diff ___ Python tracker <http://bugs.python.org/

[issue9118] help() on a property descriptor launches interactive help

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Yes, I realized that 2+ arguments would be equivalent to none, but was too lazy to handle that case. (Falling into interactive help may actually be better than an error message for some users.) Terry's solution is certainly better. Atta

[issue960821] Add an updating load function in pickle

2010-07-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On the second reading, OP's request has nothing to do with pickle.load(). In fact, there is no coherent request here. -- status: pending -> closed ___ Python tracker <http://bugs.python.org/

[issue9012] Separate compilation of time and datetime modules

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: _time.c is not supposed to be compiled into an extension. It is similar to _math.c - if you add a line _math _math.c to Setup, you get a similar compile error. What needs to be done, however, is to add _time.c to time and datetime lines. See

[issue9152] Dead code in datetime module

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r82533. -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue9152> ___ ___ Python-

[issue9152] Dead code in datetime module

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Merged in 3.1 in r82536. -- stage: commit review -> committed/rejected versions: +Python 3.1 ___ Python tracker <http://bugs.python.org/iss

[issue9118] help() on a property descriptor launches interactive help

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r82547. I am leaving it open to decide whether this is a 3.1-backport candidate. Also I am not sure this is NEWS-worthy. Jack, Does this address your issue? Note that >>> help(X.foo.fset) will still not return help on X.fo

[issue9153] Run tests and demos as part of the test suite

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Many demos already include a self-test: $ grep '^def test(' Demo/*/*.py Demo/classes/Complex.py:def test(): Demo/classes/Dates.py:def test(firstyear, lastyear): Demo/classes/Range.py:def test(): Demo/classes/Vec.py:def test(): D

[issue7962] Demo and Tools need to be tested and pruned

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I fixed Dates.py. See issue9151. I also committed a minimal fix for Complex.py in r82524. -- dependencies: +Demo/classes/Dates.py does not work in 3.x nosy: +belopolsky ___ Python tracker <h

[issue7962] Demo and Tools need to be tested and pruned

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I fixed Rev.py in r82550, but I don't think it is worth keeping in the current form. Maybe it can be replaced with a pure python reimplementation of builtins.reversed. Note that slicing does not work for Rev: >>> r = Rev([1,2,3]) >

[issue7962] Demo and Tools need to be tested and pruned

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Fixed Range.py in r82551. -- ___ Python tracker <http://bugs.python.org/issue7962> ___ ___ Python-bugs-list mailin

[issue9155] Reserve COMPARE_OP for rich comparisons

2010-07-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue9155> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching a rough patch which removes timedelta -> int minutes -> timedelta round trips from utcoffset handling code. I think the result is an improvement, but needs more polishing. Mark, Do you think this is worth pursuing? I am not int

[issue4727] pickle/copyreg doesn't support keyword only arguments in __new__

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Please keep this open. This issue is separate from pickling partial objects. -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue4

[issue4727] pickle/copyreg doesn't support keyword only arguments in __new__

2010-07-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: -> needs patch versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.org/iss

[issue4679] Fork + shelve causes shelve corruption and backtrace

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The wikisource file in the report is no longer available, but with latest wikisource and python 2.7, $ curl http://download.wikimedia.org/enwikisource/latest/enwikisource-latest-pages-articles.xml.bz2| bzip2 -cd | ./python.exe convert.py /tmp 8388608

[issue9136] RuntimeError when profiling Decimal

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: +try: +dc = DefaultContext +except NameError: +pass + +self.prec = dc.prec if prec is None else prec I don't quite understand the point of catching NameError here, but it looks like if it is caugh

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: +patch Added file: http://bugs.python.org/file17864/issue5288.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17857/issue5288.diff ___ Python tracker <http://bugs.python.org/issue5288> ___ ___ Python-bug

[issue4679] Fork + shelve causes shelve corruption and backtrace

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Sorry, but I don't understand the point that you are trying to make. sq_dict is indeed considered for inclusion in python: see issue 3783. For this issue, we need a confirmation that the problem is present in the current ve

[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-07-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Hmm, it looks like patchcheck does not fix trailing whitespace in c files: $ grep ' $' Modules/datetimemodule.c| cat -ve $ GET_TD_DAYS(offset1) * 86400 - $ Py_DECREF(offset);$

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17865/issue5288.diff ___ Python tracker <http://bugs.python.org/issue5288> ___ ___ Python-bug

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17864/issue5288.diff ___ Python tracker <http://bugs.python.org/issue5288> ___ ___ Python-bug

[issue9005] Year range in timetuple

2010-07-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Reopening to consider removing a special case in days_before_year(..). After r82128, year cannot be <= 0. -- stage: committed/rejected -> commit review status: closed -> open Added file: http://bugs.python.org/file17869/issue9

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-05 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Prior to r82454, python implementation of timedelta had the following comment: class timedelta: def __new__(cls, days=0, seconds=0, microseconds=0, # XXX The following should only be used as keyword args

[issue9005] Year range in timetuple

2010-07-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Similarly, it appears that if (*m < 1 || *m > 12) { --*m; normalize_pair(y, m, 12); ++*m; /* |y| can't be bigger

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Jul 5, 2010 at 1:39 PM, Antoine Pitrou wrote: .. > -1 from me. Deprecating correct code should be done for serious > reasons, not aesthetical (i.e. gratuitous) ones. I would think that deprecating error-prone constructs is well within

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching a test coverage file for the patched datetimemodule.c. -- Added file: http://bugs.python.org/file17874/datetimemodule.c.gcov ___ Python tracker <http://bugs.python.org/issue5

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like I attached coverage for the original file. See new-datetimemodule.c.gcov for coverage after the change. -- Added file: http://bugs.python.org/file17875/new-datetimemodule.c.gcov ___ Python

[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2010-07-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue9004> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4679] Fork + shelve causes shelve corruption and backtrace

2010-07-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue4679> ___ ___ Python-bugs-list mailing list Un

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-07-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is a bit strange. timedelta is accepting int subclass instances: >>> class I(int): ...pass ... >>> timedelta(days = I(36)) datetime.timedelta(36) but not numpy.unt_: >>> timedelta(days = int_(36)) Traceback (mos

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- priority: normal -> low resolution: -> rejected status: open -> pending ___ Python tracker <http://bugs.python.o

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > As a matter of good style, though, I'd still like to see all uses of > timedelta in the standard library and documentation use the keywords > explicitly ... It is a bit of a shame, but there are exactly 3 places using timedelta in

[issue9000] Provide parseable repr to datetime.timezone

2010-07-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching a python prototype. I am following the convention in place for the other datetime classes of prepending the repr with 'datetime.'. This may not be ideal, but better than to introduce an inconsistency. The only question

[issue9094] Make python-m pickletools do something useful

2010-07-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On the second thought, this is clearly not a bug fix. Not a backport candidate. -- status: pending -> closed ___ Python tracker <http://bugs.python.org/iss

[issue9183] Intern UTC timezone

2010-07-06 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Attached patch makes timezone(timedelta(0)) always return the same instance as timezone.utc. See issue9051 for pure python implementation. With this patch, manipulation of aware datetime objects will be as efficient as that of naive datetime objects

[issue9000] Provide parseable repr to datetime.timezone

2010-07-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attaching a C patch. -- resolution: -> accepted stage: unit test needed -> commit review Added file: http://bugs.python.org/file17887/issue9000.diff ___ Python tracker <http://bugs.python.org/

[issue9000] Provide parseable repr to datetime.timezone

2010-07-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Replacing the patch. The previously attached patch reverted issue9051 a bit too aggressively. -- Added file: http://bugs.python.org/file17888/issue9000.diff ___ Python tracker <http://bugs.python.

[issue9000] Provide parseable repr to datetime.timezone

2010-07-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17887/issue9000.diff ___ Python tracker <http://bugs.python.org/issue9000> ___ ___ Python-bug

[issue9000] Provide parseable repr to datetime.timezone

2010-07-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r82617. Python version committed to sandbox in r82616. -- stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue9183] Intern UTC timezone

2010-07-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Python implementation of UTC interning can be done better than the one in issue9051. See attached issue9183-proto.diff. -- Added file: http://bugs.python.org/file17889/issue9183-proto.diff ___ Python tracker

[issue9063] TZ examples in datetime.rst are incorrect

2010-07-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: There is nothing we can do about misreporting of UTC offset. Unlike time tuples, datetime objects do not store the DST flag and thus have no means to disambiguate between standard and DST during the hour after the clock is set back for DST to standard

[issue5907] repr of time.struct_time type does not eval

2010-07-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +String interpolation doesn't work with sys.version_info ___ Python tracker <http://bugs.python.org/i

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is definitely the right way to do it. I expect that I will have only minor nit-picks as I go through the patch. 1. You can probably just do #define PyStructSequence_SET_ITEM PyTuple_SET_ITEM #define PyStructSequence_GET_ITEM PyTuple_GET_ITEM

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Jul 7, 2010 at 4:19 PM, Benjamin Peterson wrote: >>  - PyStructSequence_New does not fill ob_item array with NULLs. > > I'm not sure it really matters, since the fields should always be > filled in, but I suppose it can'

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Looks great. I love the patches where few '+'s are drowning in a sea of '-'s! A gratuitous nitpick (feel free to ignore). In +val = PyStructSequence_GET_ITEM(obj, i); if (cname == NULL || val == NULL) { The null

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Uploaded issue5288.diff to Rietveld: http://codereview.appspot.com/1698050 -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue5

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue5288a.diff addressed comments from Rietveld. -- stage: unit test needed -> commit review Added file: http://bugs.python.org/file17897/issue5288a.diff ___ Python tracker <http://bugs.python.org/iss

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: C code changes eliminating round-trips between timdelta and int offsets committed in r82642 and Python code changes committed to sandbox in r82641. Now the requested behavior change is easy and I am about +0.5 on relaxing the offset checks to allow

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > A side effect of this change is that it kills the ability to have a > PyStructSequence which has a smaller visible size than the total > number of items. Hmm. I was looking for this precise issue when I was reviewing the code and it appea

[issue9206] os.stat() is broken

2010-07-08 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Most likely the same underlying problem as in issue 9202, but can be seen on a non-windows platform. >>> from os import * >>> stat('/') Traceback (most recent call last): File "", line 1, in SystemError: NULL

[issue9206] os.stat() is broken

2010-07-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: +patch Added file: http://bugs.python.org/file17906/issue9206.diff ___ Python tracker <http://bugs.python.org/issue9

[issue9206] os.stat() is broken

2010-07-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +benjamin.peterson, brian.curtin, eric.smith Added file: http://bugs.python.org/file17907/issue9206.diff ___ Python tracker <http://bugs.python.org/issue9

[issue9206] os.stat() is broken

2010-07-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17907/issue9206.diff ___ Python tracker <http://bugs.python.org/issue9206> ___ ___ Python-bug

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Jul 8, 2010 at 4:30 PM, Ronald Oussoren wrote: .. > Note that explicitly setting the effective uid and gid of processes is > somewhat frowned upon by Apple, they'd prefer if all daemon processes where > started using launchd and u

[issue9206] repr(os.stat(..)) is broken by the structseq change

2010-07-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch, issue9206a.diff seems to fix the os.stat() issue. Brian, can you check if it fixes issue 9202 as well? I planned to finish some other stuff tonight, so I am reassigning this to Benjamin. -- assignee: belopolsky

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This whole thing is a mess. Great analysis, by the way. I started a similar experiment some time ago, but gave up when I discovered that a member of the admin group can read any file regardless of permissions settings. Your solution is probably the

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: s/2.7/2.7.1/ -- ___ Python tracker <http://bugs.python.org/issue7900> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue7989a.diff is a partial success implementing Nick Coghlan's testing idea. Unfortunately, datetime implementation with it's circular dependency on _strftime is not very robust with respect to import trickery. I am calling this a parti

[issue6478] time.tzset does not reset _strptime's locale time cache

2010-07-12 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky ___ Python tracker <http://bugs.python.org/issue6478> ___ ___ Python-bugs-list mailing list Un

[issue6478] time.tzset does not reset _strptime's locale time cache

2010-07-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Thank you for the bug report and a patch. This does look like a bug and proposed patch seems to be the simplest way to fix it. It is unfortunate that the entire TimeRE cache needs to be recalculated when only 'Z' entry is invalidated by

[issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others.

2010-07-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Composed before reading Nick's comment: """ This issue is broader in scope than just the time module example that is given, so I am not taking this over. With respect to datetime and time modules, there are several related issues I

[issue9079] Make gettimeofday available in time module

2010-07-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Jul 12, 2010 at 12:07 PM, Antoine Pitrou wrote: .. > Instead of being defined in _time.h, perhaps the new API function should be > provided by core Python? This is an interesting idea, but proposed Py_gettimeofday inherits float_time lo

[issue9079] Make gettimeofday available in time module

2010-07-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Jul 12, 2010 at 1:06 PM, Antoine Pitrou wrote: .. > Indeed, the GIL code would probably still use its own code paths. > However, other less sensitive code could rely on the new API. For > example, it is not critical for lock timeouts t

[issue3196] Option in pydoc to show docs from private methods

2010-07-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This option would be more useful if it became an optional argument to the help() function. For someone working at the python command line prompt, having to switch to pydoc to see private method documentation may be inconvenient. It is more natural to

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue9206b.diff fixes test_datetime in issue9206a.diff by restoring sys.modules in-place in tearDown method. Based on python-dev discussion, I am marking this as accepted and uploading the patch to Rietveld for commit review. Please comment on the

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-12 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17977/issue9206b.diff ___ Python tracker <http://bugs.python.org/issue7989> ___ ___ Python-bug

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-12 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17977/issue9206b.diff ___ Python tracker <http://bugs.python.org/issue7989> ___ ___ Python-bug

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-12 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17976/issue9206b.diff ___ Python tracker <http://bugs.python.org/issue7989> ___ ___ Python-bug

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-12 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17978/issue9206b.diff ___ Python tracker <http://bugs.python.org/issue7989> ___ ___ Python-bug

[issue4236] Crash when importing builtin module during interpreter shutdown

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The bug is still present in 2.7, and 3.2. -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue4

[issue2919] Merge profile/cProfile in 3.0

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Is this a case of pure python implementation with a C speedup? Can you upload the patch to Rietveld? I'll take a look once it is there. -- nosy: +belopolsky ___ Python tracker <http://bugs.py

[issue1581183] pickle protocol 2 failure on int subclass

2010-07-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- components: +Documentation ___ Python tracker <http://bugs.python.org/issue1581183> ___ ___ Python-bugs-list mailin

[issue9252] PyImport_Import calls __import__ with dummy fromlist

2010-07-13 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : I have discovered this issue while working on the unit tests for issue 7989. In the first version of the setUp/tearDown overrides, I made a mistake when restoring sys.modules after the test run. The fix was to do sys.modules.__init__

[issue9254] __import__ docstring should recommend importlib.import_module()

2010-07-13 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : On Tue, Jul 13, 2010 at 4:52 PM, Brett Cannon wrote [1]: .. > I say this every time I give an import talk and it has been brought up here > before but obviously not everyone catches it (which is understandable as I > think when it came up on p

[issue9254] __import__ docstring should recommend importlib.import_module()

2010-07-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> d...@python components: +Documentation nosy: +d...@python stage: -> needs patch type: -> feature request ___ Python tracker <http://bugs.python.o

[issue9255] document that the 'test' package is for core developers only

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It would be nice if at the same time the facilities available in test.support and test.regrtest were reviewed and some promoted to user facing unittest package. They can even be placed in unittest.support and unittest.regrtest modules for easy

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue9169> ___ ___ Python-bugs-list mailing list Un

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Adding issue 7989 as a dependency because having pure python implementation in the CPython tree will make it much easier to experiment with new datetime features. I am still -1 on adding specialized formatting methods to the datetime class. I think

[issue9255] document that the 'test' package is for core developers only

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Issue 8273 is in some sense the opposite of this - it calls for blessing of everything in in test.support while this issue calls for wholesale "unblessing". I don't think either approach is right. While users should definitely nev

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: In issue7989c.diff, I reverted to lazy import of _strptime, added cleanup of _xyz helper functions, and made test_datetime more robust by restoring sys.modules more thoroughly. Unfortunately I've encountered an issue with Rietveld that prevents me

[issue9256] plistlib should create non-naïve datetime objects

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Yes, parsing elements ending with 'Z' into aware datetime objects makes perfect sense, but this should be done carefully because doing so will break any code that mixes the result with naive datetimes. There is a lengthy RFC 3339 discussio

[issue1574217] isinstance swallows exceptions

2010-07-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't see it being applied. Tres Seaver above reports that issue1574217_dont_mask_errors.txt applies cleanly to 2.6 branch, which means that it has not been applied yet. Someone needs to check if the patch is current for 2.7 and py3k branch

[issue9012] Separate compilation of time and datetime modules

2010-07-14 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +tim.golden ___ Python tracker <http://bugs.python.org/issue9012> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9079] Make gettimeofday available in time module

2010-07-14 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +tim.golden ___ Python tracker <http://bugs.python.org/issue9079> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9260] A finer grained import lock

2010-07-14 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue9260> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1574217] isinstance swallows exceptions

2010-07-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This looks like a borderline case between a bug and a feature request. If this is deemed to be a feature, it is not appropriate for 2.x or 3.1. In any case, I think the first step should be to consider this for py3k branch

[issue1574217] isinstance swallows exceptions

2010-07-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have verified that the issue is present in py3k. The unit test portion of the patch applies cleanly in py3k an the added tests fail. The code portion applies with patch -l and fixes the issue. I'll upload a patch with fixed white

[issue1574217] isinstance swallows exceptions

2010-07-14 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18002/issue1574217.diff ___ Python tracker <http://bugs.python.org/issue1574217> ___ ___ Pytho

[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Responding to Antoine question, I don't understand how you would use a union here. Certainly you cannot define Py_dicthashcache_t as a union of long and Py_ssize_t because it will not be able to easily assign long or Py_ssize_t values to it. I

[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On the second thought, this comment: - /* Cached hash code of me_key. Note that hash codes are C longs. -* We have to use Py_ssize_t instead because dict_popitem() abuses -* me_hash to hold a search finger. -*/ suggests

[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Please ignore my comment about set type. Sets don't have this issue. -- ___ Python tracker <http://bugs.python.org/issu

[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Yet it looks like set has a bigger problem whenever sizeof(Py_ssize_t) > sizeof(long). setentry.hash is defined as long, but set_pop() stores a Py_ssize_t index in it. -- ___ Python tracker &l

<    23   24   25   26   27   28   29   30   31   32   >