faif / python-patterns

A collection of design patterns/idioms in Python
40.45k stars 6.94k forks source link

Separate version specific scripts #287

Closed gyermolenko closed 5 years ago

gyermolenko commented 5 years ago

@faif This PR is related to our discussion in #208

https://github.com/faif/python-patterns/issues/208#issuecomment-463381182

maybe it's better to split those files to Python 2/3 versions until the Python 2 EOL

There are 4 scripts with metaclasses (chain_of_responsibility, registry, blackboard, flyweight). I modified 2/4 here to get your feedback. If you are ok with these changes - please let me know. I'll finish work in this or separate PR.

codecov-io commented 5 years ago

Codecov Report

Merging #287 into master will decrease coverage by 3.35%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #287      +/-   ##
==========================================
- Coverage   70.21%   66.85%   -3.36%     
==========================================
  Files          56       58       +2     
  Lines        2058     2091      +33     
==========================================
- Hits         1445     1398      -47     
- Misses        613      693      +80
Impacted Files Coverage Δ
tests/test_outputs.py 100% <ø> (ø) :arrow_up:
...atterns/behavioral/chain_of_responsibility__py2.py 0% <0%> (ø)
patterns/behavioral/registry__py2.py 0% <0%> (ø)
...atterns/behavioral/chain_of_responsibility__py3.py 0% <0%> (ø)
patterns/behavioral/registry__py3.py 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4292a34...02b653a. Read the comment docs.