-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangeLog
1850 lines (1335 loc) · 60.6 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2009-08-29 Paul Pogonyshev <[email protected]>
* HACKING (Weak References): New section.
* notify/signal.py (CleanSignal.__init__, CleanSignal.orphan)
(CleanSignal.__orphan, CleanSignal.do_connect)
(CleanSignal.disconnect, CleanSignal.disconnect_all)
(CleanSignal.collect_garbage)
(CleanSignal._additional_description): Fix accordingly.
(CleanSignal.parent): New property.
(_NONE_REFERENCE): New internal constant.
2008-12-11 Paul Pogonyshev <[email protected]>
* notify/gc.py (SlowGCProtector.num_protected_objects): New
property, as in `RaisingGCProtector'.
* notify/utils.py (_PYTHON_IMPLEMENTATION): Rename from
`PYTHON_IMPLEMENTATION' and don't export in `__all__'.
* test/__common.py (NotifyTestCase.ALL_OBJECTS_ARE_WEAKLY_REFERABLE):
New constant.
(NotifyTestCase.note_skipped_tests): Rewrite to allow for
different test skipping reasons.
* test/bind.py
(BindingTestCase.test_unreferable_object_method_failure): Rename
from `test_unreferencable_object_method_failure'. Don't define if
all objects are weakly referable to begin with (e.g. on Jython).
* test/_gc.py (_GCProtectorTestCase._do_test_protection): Test
get_num_object_protections() and `num_protected_objects' for all
protectors but `FastGCProtector'.
(_GCProtectorTestCase._do_test_double_protection): Likewise.
(FastGCProtectorTestCase, RaisingGCProtectorTestCase)
(DebugGCProtectorTestCase): Use
NotifyTestCase.note_skipped_tests() to inform about test skipping,
don't just silently omit them for non-CPython.
2008-12-10 Paul Pogonyshev <[email protected]>
* notify/utils.py (PYTHON_IMPLEMENTATION): New constant, take
`sys.subversion[0]' (e.g. `CPython', `Jython'...) if possible,
else try to guess.
* notify/gc.py: Decide based on `PYTHON_IMPLEMENTATION' whether to
import `notify._gc' and set new `StandardGCProtector' and
`HAVE_FAST_IMPLEMENTATIONS' accordingly.
(SlowGCProtector): New class.
(_default): Make an instance of new `StandardGCProtector'.
* notify/base.py
(AbstractValueObject._generate_derived_type_dictionary): Use new
_type_has_dictionary().
(_type_has_dictionary): New function.
* test/__common.py (NotifyTestCase.HAVE_CONTROLLABLE_GC): New
constant, based on whether Python implementation is CPython.
(NotifyTestCase.setUp): Disable additional tests if
`HAVE_CONTROLLABLE_GC' is false.
(NotifyTestCase.tearDown): Likewise.
(NotifyTestCase.collect_garbage): A different half-hearted
implementation GC.
* test/all.py (AllTestCase.test_gc): Test new
`StandardGCProtector' and `SlowGCProtector'. Test relevant
classes only if `HAVE_FAST_IMPLEMENTATIONS' is true.
* test/_gc.py (AbstractGCProtectorTestCase.test_default_property):
Use `StandardGCProtector' instead of `FastGCProtector'.
(AbstractGCProtectorTestCase.test_default_property_illegals):
Likewise.
(SlowGCProtectorTestCase): New test case.
(FastGCProtectorTestCase, RaisingGCProtectorTestCase)
(DebugGCProtectorTestCase): Only define if
`HAVE_FAST_IMPLEMENTATIONS' is true.
2008-10-06 Paul Pogonyshev <[email protected]>
* notify/gc.py (AbstractGCProtector): Declare without `__slots__'.
* notify/_gc.c (gc_module_initialize_state): Test and rely that
`AbstractGCProtector' class is defined without `__slots__',
i.e. gets `__dict__' and `__weakref__'.
* test/all.py (AllTestCase.assert_is_class): Add
`should_have_slots' argument and branch accordingly.
(AllTestCase.assert_is_class_tuple): New method.
(AllTestCase.test_bind): Use it for `BindingCompatibleTypes'.
(AllTestCase.test_gc): Assert that classes have `__dict__'. Also
test `RaisingGCProtector'.
(AllTestCase.test_util): Add tests for forgotten execute(),
`frozendict', `ClassTypes' and `StringType'.
* test/_gc.py
(AbstractGCProtectorTestCase.test_default_property_illegals):
Bug-fix: don't rely on two 42's being the same object.
2008-10-02 Paul Pogonyshev <[email protected]>
* notify/gc.py: New file. Move basic functionality of `gc.c'
here.
* notify/_gc.c: Rename from `gc.c'.
(Compatibility_Fix_TypeType, Compatibility_String_FromString):
Remove now unneeded macros.
(Compatibility_Type_Type): New macro.
(MODULE_DOC): Move old documentation to `gc.py', replace with a
stub.
(UNPROTECTION_ERROR_DOC, GC_PROTECTOR_META_DOC)
(GC_PROTECTOR_META_DEFAULT_DOC, ABSTRACT_GC_PROTECTOR_DOC)
(ABSTRACT_GC_PROTECTOR_PROTECT_DOC)
(ABSTRACT_GC_PROTECTOR_UNPROTECT_DOC)
(ABSTRACT_GC_PROTECTOR_SET_DEFAULT_DOC): Move to `gc.py'.
(GCProtectorMeta_properties, GCProtectorMeta_Type)
(AbstractGCProtector_methods, AbstractGCProtector_Type): Remove,
now these types are declared in `gc.py'.
(GCProtectorMeta_setattro, GCProtectorMeta_get_default)
(GCProtectorMeta_set_default, AbstractGCProtector_dealloc)
(AbstractGCProtector_protect, AbstractGCProtector_unprotect)
(AbstractGCProtector_set_default, FastGCProtector_new): Remove
functions.
(gc_module_initialize_state): Adjust for the changes.
(gc_module_traverse): Adjust for changed `GCModuleState' layout
changes.
(REGISTER_TYPE): Treat `meta_type' as `PyTypeObject*', not
`PyTypeObject'.
(Compatibility_MODINIT_FUNC_NAME (_gc)): Rename for new module
name. Adjust for changes.
* generate-reference.py: Don't document internal `notify._gc'.
* NEWS: Update.
2008-09-28 Paul Pogonyshev <[email protected]>
* version: Post-release version bump.
--- Released 0.3.1 ---
* NEWS: Update.
* INSTALL: Update.
* TODO: Update.
2008-09-27 Paul Pogonyshev <[email protected]>
* test/bind.py (Dummy.keyword_dict_function)
(Dummy.static_keyword_dict): New helper methods.
(BindingTestCase.test_invocation_keywords)
(BindingTestCase.test_creation_with_keywords)
(BindingTestCase.test_equality_5)
(BindingWrapTestCase.test_wrap_with_keywords_1): New tests.
* test/__common.py (NotifyTestObject.simple_keywords_handler): New
helper method.
* test/signal.py (SimpleSignalTestCase.test_connect_with_keywords)
(SimpleSignalTestCase.test_mixed_argument_passing): New tests.
2008-09-23 Paul Pogonyshev <[email protected]>
* version: Adopt new policy: bump version after release, so that
installing SVN development doesn't overwrite last released version
install. So, bumped to 0.3.1 now. Insert release marks into the
ChangeLog.
* NEWS: Merge in news about 0.2.1 from 0.2 branch. Add release
dates to all news.
2008-09-21 Paul Pogonyshev <[email protected]>
* notify/gc.c (MODULE_DOC): Update:
`AbstractGCProtector.set_default' was deprecated a while ago.
* notify/base.py:
* notify/bind.py:
* notify/mediator.py: Documentation formatting and grammar fixes.
2008-09-02 Paul Pogonyshev <[email protected]>
* notify/gc.c (Compatibility_TPFLAGS_HAVE_VERSION_TAG): New macro.
Equal to `Py_TPFLAGS_HAVE_VERSION_TAG' if that is defined.
(GCProtectorMeta_Type, AbstractGCProtector_Type)
(FastGCProtector_Type, RaisingGCProtector_Type)
(DebugGCProtector_Type): Use it.
2008-08-30 Paul Pogonyshev <[email protected]>
* notify/gc.c (Compatibility_String_AsString): Remove macro.
(GCProtectorMeta_set_default): Rewrite exception message
formatting: strings are too difficult from C level in Py3k.
(gc_module_initialize_state): Add reference to
`raise_not_implemented_exception'.
(Compatibility_MODINIT_FUNC_NAME (gc)): Zero module
state (workaround apparent bug in Py3k).
2008-08-10 Paul Pogonyshev <[email protected]>
* notify/base.py (AbstractValueObject.store)
(AbstractValueObject.store_safe)
(AbstractValueObject.with_changes_frozen): Add keyword support.
* notify/mediator.py (FunctionalMediator.__init__)
(FunctionalMediator.forward_value)
(FunctionalMediator.back_value, FunctionalMediator.reverse)
(FunctionalMediator.__eq__, FunctionalMediator.__hash__): Add
keyword support.
(_identity): Ignore keyword arguments too.
* notify/signal.py (AbstractSignal.is_connected)
(AbstractSignal.is_blocked, AbstractSignal.connect)
(AbstractSignal.connect_safe, AbstractSignal._wrap_handler)
(AbstractSignal.disconnect, AbstractSignal.disconnect_all)
(AbstractSignal.block, AbstractSignal.unblock)
(AbstractSignal.emit, AbstractSignal.__call__)
(Signal.is_connected, Signal.is_blocked, Signal.disconnect)
(Signal.disconnect_all, Signal.block, Signal.unblock, Signal.emit)
(CleanSignal.disconnect, CleanSignal.disconnect_all)
(CleanSignal._wrap_handler): Add keyword support.
* notify/_2_5/base.py (storing, storing_safely): Add keyword
support.
* notify/_2_5/signal.py (connecting, connecting_safely)
(blocking): Add keyword support.
2008-08-08 Paul Pogonyshev <[email protected]>
* notify/bind.py (Binding.__init__, Binding.wrap)
(Binding.__call__, Binding.__eq__, Binding.__hash__)
(Binding.__to_string, WeakBinding.__init__, WeakBinding)
(WeakBinding.__call__): Add keyword support.
(Binding._get_keywords): New method.
(Binding.im_kwds): New property.
* notify/utils.py (frozendict): New class.
2008-08-06 Paul Pogonyshev <[email protected]>
* notify/gc.c (GCProtectorMeta_set_default): Don't decref
`default_protector' when `state' is inconsistent (similar to
Py_CLEAR).
2008-08-05 Paul Pogonyshev <[email protected]>
* notify/gc.c (Compatibility_VISIT, Compatibility_ModuleState)
(Compatibility_ModuleStateFromDef)
(Compatibility_2_x_MODULE_STATE): New macros.
(GCModuleState): New structure.
(GC_MODULE_STATE, GC_MODULE_STATE_FROM_DEF): New macros.
(raise_not_implemented_exception, unprotection_error_type)
(default_protector, default_attribute_name): Combine into a
structure; static on 2.x, dynamically bound to module object on
3000.
(GCProtectorMeta_setattro, GCProtectorMeta_get_default)
(GCProtectorMeta_set_default, AbstractGCProtector_protect)
(AbstractGCProtector_unprotect, RaisingGCProtector_unprotect): Use
corresponding structure fields.
(gc_module_initialize_state): New function, broken out of
`Compatibility_MODINIT_FUNC_NAME (gc)' function.
(gc_module_traverse, gc_module_clear): New functions.
2008-08-03 Paul Pogonyshev <[email protected]>
* notify/gc.c (Compatibility_ModuleDef)
(Compatibility_ModuleDef_HEAD_INIT)
(Compatibility_MODINIT_FUNC_NAME, Compatibility_ModuleCreate)
(Compatibility_ModulePostCreate, Compatibility_ModuleReturn): New
macros (Compatibility_ModuleDef is a typedef for 2.x).
(gc_module): New constant structure.
(initgc): Use `Compatibility_MODINIT_FUNC_NAME' to construct name.
Use other new compatibility macros.
(GCProtectorMeta_properties, GCProtectorMeta_Type)
(AbstractGCProtector_methods, AbstractGCProtector_Type)
(FastGCProtector_methods, FastGCProtector_properties)
(FastGCProtector_Type, RaisingGCProtector_methods)
(RaisingGCProtector_properties, RaisingGCProtector_Type)
(DebugGCProtector_methods, DebugGCProtector_Type): Make static.
2008-05-06 Paul Pogonyshev <[email protected]>
--- Released 0.2.0 ---
* version: Release 0.2.0.
* NEWS: Update.
2008-04-25 Paul Pogonyshev <[email protected]>
* run-tests.py (_TestModuleImporter.__getattribute__): First try
if super method works (otherwise Py3k's unittest fails, it tries
to get `__call__' attribute).
2008-03-10 Paul Pogonyshev <[email protected]>
* run-tests.py (TestProgram.runTests): Emphasize heavy
gc.collect() usage.
* test/__common.py (NotifyTestCase.setUp): Remember number of
garbage-collectable objects before test.
(NotifyTestCase.tearDown): Check that the number doesn't change.
(NotifyTestCase.collect_garbage): Remove the only
argument (unused). Return number of garbage-collectable objects.
2008-03-03 Paul Pogonyshev <[email protected]>
--- Released 0.1.15 ---
* version: Release 0.1.15.
* NEWS: Update.
* test/_gc.py (AbstractGCProtectorTestCase.test_default_property):
Don't use deprecated set_default().
(AbstractGCProtectorTestCase.test_default_property_illegals): New
test.
* test/condition.py (GarbageCollectionConditionTestCase): Remove
explicit number of GC runs in several tests, rely on automatic
algorithm added in collect_garbage().
* test/__common.py (NotifyTestCase.tearDown): New method, collect
garbage after each test and check that number of active GC
protections doesn't change compared to before the test.
(NotifyTestCase.collect_garbage): Add a way to 'collect while
collects' to avoid specifying hardwired number of runs.
(NotifyTestCase.__count_garbage_collectable_objects): New
function.
* notify/signal.py (CleanSignal.orphan): Fix order of setting
`__parent' to None and call to unprotect().
(CleanSignal.collect_garbage): Fix: don't call unprotect() if we
are orphaned already.
2008-03-02 Paul Pogonyshev <[email protected]>
* test/__common.py (NotifyTestObject): New class, break out of
`NotifyTestCase'.
* test/base.py:
* test/condition.py:
* test/signal.py:
* test/variable.py:
* test/_2_5/base.py:
* test/_2_5/signal.py: Update tests so they don't leak
signals/conditions/variables using new machinery in `__common.py'.
* notify/gc.c: Enhance documentation a bit.
(Compatibility_String_AsString): New macro.
(GCProtectorMeta_set_default): Refuse to set a different protector
if it is not an instance of `AbstractGCProtector', or the current
one has non-zero `num_active_protections' property.
2008-03-01 Paul Pogonyshev <[email protected]>
* notify/gc.c: Many changes because of
http://bugs.python.org/issue1878. In short, introduce a meta-type
for GC protectors that handles `default' property of
types (i.e. not of objects).
* run-tests.py: Tweak so that it is possible to do sth. like
`./run-tests.py condition.LogicConditionTestCase'.
2008-01-20 Paul Pogonyshev <[email protected]>
* docs/tutorial.txt: Add document information. Add copyright
notice and a simple license taken from
http://pygtk.org/pygtk2tutorial/ch-Copyright.html. Make all
examples directly copyable to Python interpreter. Some stylistic
changes and a few little expansions.
* docs/reST.css: Add custom rules for `docinfo' class.
2008-01-19 Paul Pogonyshev <[email protected]>
* (Globally): Update copyright notices.
* NEWS: Add P.S. to 0.1.13 entry about fixed Py3k.
2008-01-06 Paul Pogonyshev <[email protected]>
* INSTALL: Remove notice about failing test: Py3k is fixed.
2007-12-28 Paul Pogonyshev <[email protected]>
--- Released 0.1.14 ---
* version: Release 0.1.14.
* NEWS: Update.
* run-tests.py (_build_extensions): New function, break out of
TestProgram.runTests().
(_import_module_tests): Call it from here too.
* benchmark.py: Similar changes.
2007-12-26 Paul Pogonyshev <[email protected]>
* run-tests.py: Rewrite to lazy-load only necessary modules and
build extension only if we actually get to testing anything.
* benchmark.py: Likewise.
* benchmark/benchmarking.py (load_benchmarks): Call any function
first.
2007-12-22 Paul Pogonyshev <[email protected]>
* TODO: One more item, some comments.
* benchmark/benchmarking.py: Remove never used `TypeType'.
* docs/tutorial.txt: A few grammar, style and factual fixes.
* INSTALL (System Requirements): Note about Python 3000.
(Installing With EasyInstall): New section.
2007-12-21 Paul Pogonyshev <[email protected]>
* generate-reference.py: Also exclude internal `notify._2_x'.
* notify/gc.c: Add documentation to several symbols.
(unprotection_error_type): Rename from
`unprotection_exception_type'.
(RaisingGCProtector_protect, RaisingGCProtector_unprotect): Change
types from `int' to `long int' where appropriate.
(initgc): Actually add UNPROTECTION_ERROR_DOC to the type.
* notify/gc.c (PyInt_AsLong, PyInt_FromLong): Define for Py3k
using their PyLong_*() analogues.
(AbstractGCProtector_Type): Remove explicit base, as it is
supplied by Python anyway and can break builds (#10560).
2007-12-09 Paul Pogonyshev <[email protected]>
* notify/bind.py (Binding.__init__, Binding.__eq__)
(WeakBinding.wrap): Py3k only: account for renamed `im_*'
properties.
(Binding): Py3k only: rename own `im_*' properties as done in the
language.
* test/bind.py (BindingTestCase.test_equality_2): Effectively
disable on Py3k: unbound methods are gone, so this code cannot
work anymore.
(BindingWrapTestCase.test_wrap_6): Account for renamed properties.
* notify/utils.py (DummyReference): Declare `ClassTypes' for the
same reason as `StringTypes'.
* notify/variable.py
(AbstractValueTrackingVariable._generate_derived_type_dictionary):
Use it.
* benchmark/benchmarking.py (load_benchmarks): Use it.
* test/all.py (AllTestCase.assert_is_class): Use it.
* notify/base.py (AbstractValueObject._is_mutable): Use a
different implementation on Py3k to workaround changes.
(AbstractValueObject.desynchronize)
(AbstractValueObject.desynchronize_fully): Don't use `NoneType'
removed in Py3k.
2007-11-17 Paul Pogonyshev <[email protected]>
--- Released 0.1.13 ---
* version: Release 0.1.13.
* NEWS: Update.
2007-11-08 Paul Pogonyshev <[email protected]>
* notify/bind.py (WeakBinding.__hash__): Typo fix.
* benchmark/configobj.py: Many changes to compile and work under
SVN Python 3000:
- define `StringTypes' to just (str,) under Py3k;
- don't use unhashable bytes as dictionary keys;
- ditch compatibility with 2.2;
- update old-style `raise Type, message' statements;
- don't use construct `except Type, var' removed in Py3k.
* benchmark/benchmarking.py:
* benchmark/emission.py:
* benchmark/logical.py: Changes to compile and work under SVN
Python 3000:
- don't use relative imports;
- define xrange() as range() under Py3k.
2007-11-07 Paul Pogonyshev <[email protected]>
* benchmark.py:
* benchmark/benchmarking.py:
* examples/conditions_pygtk.py:
* generate-reference.py:
* notify/base.py:
* notify/bind.py:
* notify/condition.py:
* notify/signal.py:
* notify/utils.py:
* notify/variable.py:
* run-tests.py:
* setup.py:
* test/variable.py: Many changes to compile and work under SVN
Python 3000:
- define `StringType' as `basestring' or `str';
- use print() as a function, not as an operator;
- don't use construct `except Type, var' removed in Py3k;
- define new function execute() to cope with `exec' changes;
- use dict.items() instead of dict.iteritems();
- rename __nonzero__() to __bool__() under Py3k.
* notify/_2_x.py: New module, define execute() for Python 2.x.
* notify/gc.c: Changes to compile and work under SVN Python 3000:
- cope with `ob_type' only present in `PyObject' structure.
(Compatibility_VarObject_HEAD_INIT, Compatibility_TypeType)
(Compatibility_Fix_TypeType, Compatibility_MODINIT_FUNC): New
macros.
(Compatibility_CLEAR): Rename from `Py_CLEAR'.
2007-11-06 Paul Pogonyshev <[email protected]>
* notify/variable.py
(AbstractValueTrackingVariable._generate_derived_type_dictionary):
Fix typo with mispaced paren.
* test/variable.py (VariableDerivationTestCase.test_derivation_11)
(VariableDerivationTestCase.test_derivation_12): New tests.
* test/utils.py (UtilsTestCase.test_is_valid_identifier): Test
some keywords too.
* notify/utils.py (is_valid_identifier): Also test `identifier'
with `keyword.iskeyword'.
2007-10-12 Paul Pogonyshev <[email protected]>
* notify/base.py:
* notify/bind.py:
* notify/condition.py:
* notify/mediator.py:
* notify/signal.py:
* notify/utils.py:
* notify/variable.py: Don't use `as_string'. Apparently it is
almost never needed, doh X-(
2007-08-25 Paul Pogonyshev <[email protected]>
--- Released 0.1.12 ---
* version: Release 0.1.12.
* NEWS: Update.
2007-08-19 Paul Pogonyshev <[email protected]>
* test/base.py (BaseDerivationTestCase.test_derivation_module):
New test.
* notify/base.py (AbstractValueObject.derive_type): Use metaclass
to create new type, do not hardcode to `type'. Get caller's
module name from call stack and set `__module__' attribute on new
type to it, if possible.
2007-08-11 Paul Pogonyshev <[email protected]>
* test/base.py (BaseInternalsTestCase): New test case.
2007-08-10 Paul Pogonyshev <[email protected]>
* docs/tutorial.txt: Miscellaneous grammar, style and content
fixes.
* notify/base.py (AbstractValueObject._value_changed): Simplify.
2007-08-07 Paul Pogonyshev <[email protected]>
* notify/condition.py (_Binary.__init__): Connect to terms after
evaluating `_term_state', since creating bindings can, in
principle, invoke arbitrary code.
* notify/base.py (AbstractValueObject): Rename and change meaning
of `__freeze_flag' slot to `__flags'. Adjust many methods. Also
incorporate whether `__signal' is set and whether it is an
`AbstractSignal' or a reference to it to `__flags' (speed
optimization.)
* notify/_2_5/base.py (changes_frozen): Adjust accordingly.
* test/condition.py (BaseConditionTestCase.test_set): New test.
* notify/gc.c (Py_CLEAR): Define unless already defined (in newer
Python versions.)
(RaisingGCProtector_init): Use it.
(RaisingGCProtector_dealloc): Likewise.
2007-08-05 Paul Pogonyshev <[email protected]>
* test/_gc.py (_GCProtectorTestCase._do_test_protection): Test
various statistics, especially on RaisingGCProtector instances.
(_GCProtectorTestCase._do_test_double_protection): Likewise.
(RaisingGCProtectorTestCase.test_protection_3): New test.
* notify/gc.c (AbstractGCProtector_set_default): Throw exceptions
where appropriate (e.g. if out of memory.)
(RaisingGCProtector_init): Likewise.
(RaisingGCProtector_protect): Likewise.
(RaisingGCProtector_unprotect): Likewise.
(RaisingGCProtector_get_num_object_protections): Likewise.
(initgc): Likewise.
2007-08-02 Paul Pogonyshev <[email protected]>
* notify/signal.py (Signal.emit): Fix to never reset
`might_have_garbage' once it is true.
2007-07-31 Paul Pogonyshev <[email protected]>
* test/variable.py (BaseVariableTestCase.test_predicate_1): Rename
from `test_predicate'.
(BaseVariableTestCase.test_predicate_2)
(BaseVariableTestCase.test_transformation_1)
(BaseVariableTestCase.test_transformation_2): New tests.
* notify/variable.py (AbstractVariable.transform): New method.
(_VariableTransformation): New internal class.
2007-07-30 Paul Pogonyshev <[email protected]>
* notify/base.py
(AbstractValueObject._generate_derived_type_dictionary): Fix
initializer for derived classes.
* test/variable.py
(VariableDerivationTestCase.test_derivation_10): New test.
2007-07-22 Paul Pogonyshev <[email protected]>
--- Released 0.1.11 ---
* version: Release 0.1.11.
* NEWS: Update.
* notify/base.py: Improve documentation.
* notify/utils.py: Likewise.
* test/signal.py (HandlerGarbageCollectionTestCase): New test
case.
* notify/signal.py (Signal.emit): Gross speed optimization: only
call collect_garbage() if there might be garbage. Actually, this
is only a heuristic, because a handler can be GC-collected just
after we find it is not a garbage, but such optimization is well
worth it.
* notify/bind.py (Binding.__hash__): Don't use id(), not
recommended.
* notify/mediator.py (_Function.__hash__): Likewise.
(__hash__): Remove altogether, not needed.
2007-07-21 Paul Pogonyshev <[email protected]>
* test/bind.py (BindingTestCase.test_creation_with_arguments)
(BindingWrapTestCase.test_wrap_with_arguments_1): New tests.
* notify/signal.py (Signal.emit): Small speed optimization.
(Signal.collect_garbage): Likewise.
* notify/condition.py (AbstractStateTrackingCondition._set):
Reimplement in a little more efficient way.
(_Not): Derive directly from `AbstractCondition' for efficiency;
adjust implementation as necessary.
(_Binary.__init__): Don't create equal but not identical bound
method objects.
(_IfElse.__init__): Likewise.
2007-07-16 Paul Pogonyshev <[email protected]>
* notify/base.py
(AbstractValueObject._generate_derived_type_dictionary): Never use
`options' as locals or globals for evaluation.
* notify/condition.py
(AbstractStateTrackingCondition._generate_derived_type_dictionary):
Likewise.
* notify/variable.py
(AbstractValueTrackingVariable._generate_derived_type_dictionary):
Likewise.
* notify/base.py (AbstractValueObject._filter_options): New
method.
2007-07-12 Paul Pogonyshev <[email protected]>
* notify/condition.py
(WatcherCondition._generate_derived_type_dictionary): Fix
exception message.
2007-07-11 Paul Pogonyshev <[email protected]>
* notify/base.py
(AbstractValueObject._generate_derived_type_dictionary): Don't
hide `object' attribute of new class, unless its name is to be
`private' by Python rules. Add `property' option.
* test/variable.py
(VariableDerivationTestCase.test_object_derivation_1)
(VariableDerivationTestCase.test_object_derivation_2): New tests.
* test/utils.py (UtilsTestCase.test_mangle_identifier): New test.
* test/all.py (AllTestCase.test_util): Test mangle_identifier()
presence.
* notify/utils.py (mangle_identifier): New function.
2007-07-09 Paul Pogonyshev <[email protected]>
* notify/base.py
(AbstractValueObject._generate_derived_type_dictionary): Add and
implement `dict' option.
* test/base.py (BaseDerivationTestCase.test_derivation_dict_1)
(BaseDerivationTestCase.test_derivation_dict_2)
(BaseDerivationTestCase.test_derivation_dict_3)
(BaseDerivationTestCase.test_derivation_dict_4): New tests.
2007-07-08 Paul Pogonyshev <[email protected]>
* notify/base.py (AbstractValueObject.derive_type): Revamp derived
type slot calculation algorithm, so that types are not create with
dictionary unless specifically requested.
* test/base.py (BaseDerivationTestCase): New test case.
* test/condition.py
(ConditionDerivationTestCase.test_derivation_slots): New test.
* test/variable.py
(VariableDerivationTestCase.test_derivation_slots): New test.
* test/__common.py (NotifyTestCase.non_existing_attribute_setter):
New method.
* test/all.py (AllTestCase.assert_is_class): Use it.
* test/utils.py (UtilsTestCase.test_as_string)
(UtilsTestCase.test_as_string_attributes): New tests.
* test/all.py (AllTestCase.test_util): Test `as_string' presence.
* notify/utils.py (_AsString): New helper class.
(as_string): New constant object of the class above.
* notify/base.py: Use it.
* notify/bind.py: Likewise.
* notify/condition.py: Likewise.
* notify/mediator.py: Likewise.
* notify/signal.py: Likewise.
* notify/variable.py: Likewise.
2007-07-07 Paul Pogonyshev <[email protected]>
* MANIFEST.in: Include `generate-tutorial.py' in distribution.
* test/utils.py (UtilsTestCase.test_is_callable): New test case.
(UtilsTestCase.test_dummy_reference): Use new is_callable().
* test/all.py (AllTestCase.assert_is_function): Allow functions to
be built-in.
(AllTestCase.test_util): Also test new is_callable().
* notify/utils.py (is_callable): New function.
* notify/base.py: Use it instead of built-in callable(), since
latter is deprecated in 2.6 and will be removed in Python 3000.
* notify/bind.py: Likewise.
* notify/condition.py: Likewise.
* notify/mediator.py: Likewise.
* notify/signal.py: Likewise.
* notify/variable.py: Likewise.
2007-07-01 Paul Pogonyshev <[email protected]>
* setup.py: Fix reST in package long description.
--- Released 0.1.10 ---
* version: Release 0.1.10.
* NEWS: Update.
* docs/tutorial.txt: Add one section.
* test/_2_5/base.py
(BaseChangesFrozenContextManagerTestCase.test_derived_variable_changes_frozen_1):
New test.
* test/base.py
(BaseWithChangesFrozenTestCase.test_with_derived_variable_changes_frozen_1):
New test.
* notify/base.py (AbstractValueObject._value_changed): Don't
change `__freeze_flag' anymore.
(AbstractValueObject.with_changes_frozen): Don't check
`__freeze_flag', always decide whether to emit by comparing new
and original values.
* notify/_2_5/base.py (changes_frozen): Likewise.
2007-06-29 Paul Pogonyshev <[email protected]>
* docs/tutorial.txt: Add one section.
* notify/base.py: Improve documentation.
* notify/signal.py: Likewise.
* notify/_2_5/base.py: Likewise.
* notify/_2_5/signal.py: Likewise.
* notify/base.py (AbstractValueObject): One more, cleaner
reimplementation of importing of 2.5 features.
* notify/signal.py (AbstractSignal): Likewise.
2007-06-26 Paul Pogonyshev <[email protected]>
* test/base.py (BaseWithChangesFrozenTestCase): New test case.
* notify/_2_5/base.py (changes_frozen): New function.
* notify/base.py (AbstractValueObject.__init__): Initialize new
`__freeze_flag' field to None.
(AbstractValueObject._value_changed): Use `emit' method instead of
just calling the signal (this is faster.) Don't reference
`__signal' field three times, fetch it to a local variable. Check
new `__freeze_flag' before emitting.
(AbstractValueObject.is_frozen)
(AbstractValueObject.with_changes_frozen): New methods.
2007-06-24 Paul Pogonyshev <[email protected]>
* generate-reference.py: Get rid of `import *'.
* generate-tutorial.py: Likewise.
* setup.py: Likewise.
* benchmark/benchmarking.py: Likewise.
* benchmark/emission.py: Likewise.
* benchmark/logical.py: Likewise.
* test/_gc.py: Likewise.
* test/base.py: Likewise.
* test/condition.py: Likewise.
* test/mediator.py: Likewise.
* test/signal.py: Likewise.
* test/utils.py: Likewise.
* test/variable.py: Likewise.
* test/_2_5/signal.py: Likewise.
* test/_2_5/base.py: Likewise.
* test/_2_5: New directory.
* test/_2_5/__init__.py: New file.
* test/_2_5/base.py: Rename from `test/_base_2_5.py'
* test/_2_5/signal.py: Rename from `test/_signal_2_5.py'
* generate-tutorial.py: If importing docutils fails, print a
helpful message.
* notify/_2_5/base.py: Improve documentation.
* notify/_2_5/signal.py: Likewise.
* notify/signal.py (AbstractSignal): Reimplement importing from
2.5 support modules to trick Epydoc into not noticing it.
* notify/base.py (AbstractValueObject): Likewise.
* generate-reference.py: Don't document new `notify._2_5' package.
* setup.py: Also install new `notify._2_5' package. Take care to
not byte-compile 2.5-dependent files on earlier Python versions.
* notify/_2_5: New directory.
* notify/_2_5/__init__.py: New file.
* notify/_2_5/base.py: Rename from `notify/_base_2_5.py'
* notify/_2_5/signal.py: Rename from `notify/_signal_2_5.py'
2007-06-23 Paul Pogonyshev <[email protected]>
* notify/signal.py (Signal.disconnect): Remove first equal handler
from the end of the list, not from the beginning.
* test/signal.py (SimpleSignalTestCase.test_connect_disconnect):
New test.
* test/__common.py (NotifyTestCase.simple_handler_100)
(NotifyTestCase.simple_handler_200): Move here from
`RecursiveEmissionSignalTestCase'.
* docs/tutorial.txt: Add one section. Reorganize a little.
* notify/base.py (AbstractValueObject): Import methods from new
_base_2_5 module if Python features allow.
* notify/_base_2_5.py: New file.
* notify/signal.py (AbstractSignal): Import methods from new
_signal_2_5 module if Python features allow.
* notify/_signal_2_5.py: New file.
* test/base.py: New file
* test/_base_2_5.py: New file.
* test/signal.py: Import test cases from new _signal_2_5 module if
Python features allow.
* test/_signal_2_5.py: New file.
* test/__common.py (NotifyTestCase.note_skipped_tests): New
method.
(ignoring_exceptions): New class/function.
* benchmark.py: Run `build' target, not just `build_ext'.
* run-tests.py: Likewise.
* setup.py (build_ext.build_extension): Don't symlink unless there
is a link pointing to our target, not just any link.
2007-06-22 Paul Pogonyshev <[email protected]>
--- Released 0.1.9 ---
* version: Release 0.1.9.
* NEWS: Update.
* setup.py: Add ``long'' package description
(configure): Rewrite to not overwrite `__init__.py' unless needed.
(build_ext.build_extension): Likewise don't symlink unless needed.
* setup.py: Bug-fix: used to fail if run as `python setup.py ...',
not just `./setup.py ...'.
2007-06-19 Paul Pogonyshev <[email protected]>
* notify/signal.py: Improve documentation.
* test/signal.py (SimpleSignalTestCase.test_emission_level_1)
(SimpleSignalTestCase.test_emission_level_2)
(RecursiveEmissionSignalTestCase.test_unblock_in_recursive_emission_1)
(RecursiveEmissionSignalTestCase.test_unblock_in_recursive_emission_2):
New tests.
* test/all.py (AllTestCase.assert_is_class): Assert that all
non-exception classes are new-style classes.
* notify/gc.c (RaisingGCProtector_unprotect): Fix compilation
warnings.
2007-06-16 Paul Pogonyshev <[email protected]>
* test/_gc.py (RaisingGCProtectorTestCase): New test case.
* notify/gc.c (RaisingGCProtector_init): Rename from
DebugGCProtector_init().
(RaisingGCProtector_dealloc): Rename likewise.
(RaisingGCProtector_protect): Rename likewise.
(RaisingGCProtector_unprotect): Rename likewise. Create an
exception of new `UnprotectionError' type and raise it instead.
(RaisingGCProtector_get_num_object_protections): Rename likewise.
(RaisingGCProtector_get_num_protected_objects): Rename likewise.
(RaisingGCProtector_get_num_active_protections): Rename likewise.
(DebugGCProtector_unprotect): New function.
(initgc): Register new `RaisingGCProtector' type and new
`UnprotectionError' exception type.
* README (About Py-notify): Style and grammar fixes.
2007-06-13 Paul Pogonyshev <[email protected]>
--- Released 0.1.8 ---
* version: Release 0.1.8.
* NEWS: Update.
* test/bind.py (BindingTestCase.test_equality_1): Test all
standard binding types at once. Also don't let dummy objects be
garbage-collected before binding comparison.
(BindingTestCase.test_equality_2): Likewise for all types.
(BindingTestCase.test_equality_3): Likewise.
(BindingTestCase.test_equality_4): Likewise.
* test/__common.py (NotifyTestCase.assert_equal_thoroughly): Also
test that if both values are hashable, then hashes are equal.
* notify/bind.py (Binding.__hash__): New method.
(WeakBinding.__init__): Reset new `__hash' slot.
(WeakBinding.__hash__): New method.
* notify/mediator.py (AbstractMediator.__hash__)
(BooleanMediator.__hash__, FunctionalMediator.__hash__)
(_ReverseMediator.__hash__, _Function.__hash__): New methods.
2007-06-12 Paul Pogonyshev <[email protected]>
* notify/bind.py (Binding.__repr__, Binding.__str__)
(Binding.__to_string): New methods.
* notify/signal.py (AbstractSignal._additional_description): New