Skip to content

Commit

Permalink
Merge pull request #13 from nitmir/dev
Browse files Browse the repository at this point in the history
Update to version 0.3.3

* Add python 3.6 and 3.7 to script compiling wheels for windows
* Fix enumerate_ids for python3
* In Cython 0.28 it is now forbbiden to assign None to a int, so we use 0
  instead for an address port.
  • Loading branch information
nitmir authored Sep 14, 2019
2 parents f68e46c + df70dd0 commit 747388a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions btdht/krcp.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1451,12 +1451,12 @@ cdef class BMessage:
property addr:
def __get__(self):
if six.PY3:
if self.addr_addr_3 and self.addr_port:
if self.addr_addr_3 and self.addr_port > 0:
return (self.addr_addr_3, self.addr_port)
else:
return None
else:
if self.addr_addr_2 and self.addr_port:
if self.addr_addr_2 and self.addr_port > 0:
return (self.addr_addr_2, self.addr_port)
else:
return None
Expand All @@ -1469,7 +1469,7 @@ cdef class BMessage:
self.addr_port = addr[1]
def __del__(self):
self.addr_addr = None
self.addr_port = None
self.addr_port = 0

#: The ``y` key of the message. Possible value are ``"q"`` for a query, `"r"` for a response
#: and ``"e"`` for an error.
Expand Down
8 changes: 8 additions & 0 deletions make_wheel.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ C:/Python35-32/python -m pip install wheel
C:/Python35-32/python setup.py bdist_wheel
C:/Python35/python -m pip install wheel
C:/Python35/python setup.py bdist_wheel
C:/Python36-32/python -m pip install wheel
C:/Python36-32/python setup.py bdist_wheel
C:/Python36/python -m pip install wheel
C:/Python36/python setup.py bdist_wheel
C:/Python37-32/python -m pip install wheel
C:/Python37-32/python setup.py bdist_wheel
C:/Python37/python -m pip install wheel
C:/Python37/python setup.py bdist_wheel
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
except ImportError:
has_cython = False

VERSION = "0.3.2"
VERSION = "0.3.3"

if __name__ == "__main__":
c_extensions = [
Expand Down

0 comments on commit 747388a

Please sign in to comment.