Skip to content

Commit d215192

Browse files
authored
CONTRIBUTING: Drop Python 2 requirement (#4713)
Since 246ad3f ("Drop six library (first batch)") scapy doesn't support Python 2 anymore. Drop the requirement in CONTRIBUTING.md.
1 parent 9363bfd commit d215192

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

CONTRIBUTING.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -136,22 +136,6 @@ make sure logging in Scapy remains helpful.
136136
- If you are working on Scapy's core, you may use: `scapy.error.log_loading`
137137
only while Scapy is loading, to display import errors for instance.
138138

139-
140-
### Python 2 and 3 compatibility
141-
142-
The project aims to provide code that works both on Python 2 and Python 3. Therefore, some rules need to be applied to achieve compatibility:
143-
144-
- byte-string must be defined as `b"\x00\x01\x02"`
145-
- exceptions must comply with the new Python 3 format: `except SomeError as e:`
146-
- lambdas must be written using a single argument when using tuples: use `lambda x, y: x + f(y)` instead of `lambda (x, y): x + f(y)`.
147-
- use int instead of long
148-
- use list comprehension instead of map() and filter()
149-
- `__bool__ = __nonzero__` must be used when declaring `__nonzero__` methods
150-
- `__next__ = next` must be used when declaring `next` methods in iterators
151-
- `StopIteration` must NOT be used in generators (but it can still be used in iterators)
152-
- `io.BytesIO` must be used instead of `StringIO` when using bytes
153-
- `__cmp__` must not be used.
154-
155139
### Code review
156140

157141
Maintainers tend to be picky, and you might feel frustrated that your

0 commit comments

Comments
 (0)