Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend find-slots-inconsistencies #403

Closed
trevorbaca opened this issue Aug 18, 2014 · 2 comments
Closed

Extend find-slots-inconsistencies #403

trevorbaca opened this issue Aug 18, 2014 · 2 comments
Assignees

Comments

@trevorbaca
Copy link
Member

The script is already very useful.

We need to extend it to demand that the following condition hold for all classes systemwide: if a baseclass defines __slots__ then all concrete inheritors need to also implement __slots__.

What happens when this condition fails to hold?

Nothing for months on end. But then when it becomes necessary to implement __getstate__(), __setstate__() or __copy__() then the concrete inheritors almost always fail the parameterized copy and deepcopy tests.

The fix is straightforward: make sure concrete inheritors implement __slots__.

trevorbaca added a commit that referenced this issue Aug 18, 2014
@trevorbaca
Copy link
Member Author

I think this is still valid in June 2017:

16:15 $ find-slots-inconsistencies 

No bad slots relationships found.
56 children without own __slots__ definition found:
	abctools.AbjadObject -> part.PartCantusScoreTemplate
	abctools.AbjadObject -> documentationtools.DocumentationManager
	abctools.AbjadObject -> instrumenttools.Performer
	abctools.AbjadObject -> instrumenttools.WoodwindFingering
	abctools.AbjadObject -> lilypondfiletools.Block
	abctools.AbjadObject -> lilypondnametools.LilyPondNameManager
	abctools.AbjadObject -> lilypondparsertools.GuileProxy
	abctools.AbjadObject -> lilypondparsertools.LilyPondEvent
	abctools.AbjadObject -> lilypondparsertools.LilyPondGrammarGenerator
	abctools.AbjadObject -> lilypondparsertools.LilyPondLexicalDefinition
	abctools.AbjadObject -> lilypondparsertools.LilyPondSyntacticalDefinition
	abctools.AbjadObject -> metertools.MeterManager
	abctools.AbjadObject -> quantizationtools.AttackPointOptimizer
	abctools.AbjadObject -> quantizationtools.Heuristic
	abctools.AbjadObject -> quantizationtools.JobHandler
	abctools.AbjadObject -> quantizationtools.ParallelJobHandlerWorker
	abctools.AbjadObject -> quantizationtools.Quantizer
	abctools.AbjadObject -> systemtools.BenchmarkScoreMaker
	abctools.AbjadObject -> systemtools.IOManager
	abctools.AbjadObject -> systemtools.ImportManager
	abctools.AbjadObject -> systemtools.LilyPondFormatManager
	abctools.AbjadObject -> systemtools.TestManager
	abctools.AbjadObject -> systemtools.UpdateManager
	abctools.AbjadObject -> systemtools.WellformednessManager
	abctools.AbjadObject -> templatetools.GroupedRhythmicStavesScoreTemplate
	abctools.AbjadObject -> templatetools.GroupedStavesScoreTemplate
	abctools.AbjadObject -> templatetools.StringQuartetScoreTemplate
	abctools.AbjadObject -> templatetools.TwoStaffPianoScoreTemplate
	abctools.AbjadValueObject -> pitchtools.RegistrationComponent
	abctools.AbjadValueObject -> rhythmmakertools.GalleryMaker
	abctools.ContextManager -> systemtools.NullContextManager
	abctools.ContextManager -> systemtools.ProgressIndicator
	abctools.ContextManager -> systemtools.RedirectedStreams
	commandlinetools.CommandlineScript -> abjadbooktools.AbjadBookScript
	commandlinetools.CommandlineScript -> commandlinetools.AbjDevScript
	commandlinetools.CommandlineScript -> commandlinetools.BuildApiScript
	commandlinetools.CommandlineScript -> commandlinetools.CheckClassSections
	commandlinetools.CommandlineScript -> commandlinetools.CleanScript
	commandlinetools.CommandlineScript -> commandlinetools.DoctestScript
	commandlinetools.CommandlineScript -> commandlinetools.ReplaceScript
	commandlinetools.CommandlineScript -> commandlinetools.ScorePackageScript
	commandlinetools.CommandlineScript -> commandlinetools.StatsScript
	datastructuretools.TreeContainer -> documentationtools.ReSTDirective
	datastructuretools.TreeContainer -> documentationtools.ReSTDocument
	datastructuretools.TreeNode -> documentationtools.ReSTAutosummaryItem
	datastructuretools.TreeNode -> documentationtools.ReSTHeading
	datastructuretools.TreeNode -> documentationtools.ReSTHorizontalRule
	datastructuretools.TreeNode -> documentationtools.ReSTParagraph
	datastructuretools.TreeNode -> documentationtools.ReSTTOCItem
	lilypondparsertools.Music -> lilypondparsertools.SimultaneousMusic
	pitchtools.Vector -> pitchtools.IntervalClassVector
	pitchtools.Vector -> pitchtools.IntervalVector
	pitchtools.Vector -> pitchtools.PitchClassVector
	pitchtools.Vector -> pitchtools.PitchVector
	quantizationtools.GraceHandler -> quantizationtools.CollapsingGraceHandler
	quantizationtools.GraceHandler -> quantizationtools.DiscardingGraceHandler

Note that it's possible that the secondary output (about 56 child classes without own slots implementation) may be answering the request in this issue. In which case empty __slots__ = () definitions should be added to all 56 classes and this issue can be closed.

trevorbaca added a commit that referenced this issue Jul 4, 2017
This closes #403, open since August 2014.
@trevorbaca
Copy link
Member Author

Done in 2.21.

trevorbaca added a commit that referenced this issue Jul 31, 2017
This closes #403, open since August 2014.
trevorbaca added a commit that referenced this issue Jul 31, 2017
This closes #403, open since August 2014.
trevorbaca added a commit that referenced this issue Jul 31, 2017
This closes #403, open since August 2014.
trevorbaca added a commit that referenced this issue Jul 31, 2017
This closes #403, open since August 2014.
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
trevorbaca added a commit that referenced this issue Jul 31, 2017
(Open since August 2014.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants