Skip to content

Commit 8fba959

Browse files
authored
Merge pull request faif#308 from gyermolenko/py3only
Updating code to Python 3
2 parents 24c876d + 071c3dd commit 8fba959

22 files changed

Lines changed: 19 additions & 517 deletions

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ sudo: false
55

66
matrix:
77
include:
8-
- python: "2.7"
9-
env: TOXENV=ci27
10-
- python: "3.6"
11-
env: TOXENV=ci36
128
- python: "3.7"
139
env: TOXENV=ci37
1410
- python: "3.8"

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,8 @@ In some cases class-level docstring with doctest would also help (see [adapter.p
107107
but readable OUTPUT section is much better.
108108

109109

110-
##### Python2/3 compatibility
111-
Try to keep it (discussion is held in [issue #208](https://github.com/faif/python-patterns/issues/208))
112-
- use new style classes (inherit from `object`)
113-
- use `from __future__ import print_function`
110+
##### Python2 compatibility
111+
To see Python 2 compatible versions of some patterns please check-out `legacy` tag.
114112

115113
##### Update README
116114
When everything else is done - update corresponding part of README.
File renamed without changes.

patterns/behavioral/chain_of_responsibility__py2.py

Lines changed: 0 additions & 119 deletions
This file was deleted.

patterns/behavioral/registry__py2.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

patterns/creational/pool.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ def __del__(self):
5454

5555

5656
def main():
57-
try:
58-
import queue
59-
except ImportError: # python 2.x compatibility
60-
import Queue as queue
57+
import queue
6158

6259
def test_object(queue):
6360
pool = ObjectPool(queue, True)

patterns/other/blackboard__py2.py

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)