Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

macaddress

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

macaddress - npm Package Compare versions

Comparing version
1.1.3
to
1.2.0
+7
-5
macaddress.egg-info/PKG-INFO
Metadata-Version: 1.1
Name: macaddress
Version: 1.1.3
Version: 1.2.0
Summary: Like ``ipaddress``, but for hardware identifiers such as MAC addresses.

@@ -225,9 +225,11 @@ Home-page: https://github.com/mentalisttraceur/python-macaddress

>>> mac = macaddress.MAC('01-02-03-04-05-06')
>>> mac = macaddress.MAC('01-02-03-0A-0B-0C')
>>> str(mac)
'01-02-03-04-05-06'
'01-02-03-0A-0B-0C'
>>> str(mac).replace('-', ':')
'01:02:03:04:05:06'
'01:02:03:0A:0B:0C'
>>> str(mac).replace('-', '')
'010203040506'
'0102030A0B0C'
>>> str(mac).lower()
'01-02-03-0a-0b-0c'

@@ -234,0 +236,0 @@

@@ -14,3 +14,3 @@ # SPDX-License-Identifier: 0BSD

)
__version__ = '1.1.3'
__version__ = '1.2.0'

@@ -138,6 +138,7 @@

They are equal if they are instances of the same class
(including one being a subclass of the other), if they
have the same size, and if their addresses are equal.
They are equal if they are instances of the same class,
have the same size, and their addresses are equal.
"""
if not isinstance(other, HWAddress):
return NotImplemented
if not isinstance(other, type(self)) or self.size != other.size:

@@ -149,2 +150,4 @@ return False

"""Check if this hardware address is not equal to another."""
if not isinstance(other, HWAddress):
return NotImplemented
if not isinstance(other, type(self)) or self.size != other.size:

@@ -193,3 +196,7 @@ return True

def __hash__(self):
"""Get the hash of this hardware address."""
return hash((type(self), self._address))
def _aligned_address_integers(address1, address2):

@@ -321,3 +328,3 @@ size1 = address1.size

This lets you can just write
This lets you just write

@@ -324,0 +331,0 @@ address = hwaddress.parse(user_input, EUI64, EUI48, ...)

Metadata-Version: 1.1
Name: macaddress
Version: 1.1.3
Version: 1.2.0
Summary: Like ``ipaddress``, but for hardware identifiers such as MAC addresses.

@@ -225,9 +225,11 @@ Home-page: https://github.com/mentalisttraceur/python-macaddress

>>> mac = macaddress.MAC('01-02-03-04-05-06')
>>> mac = macaddress.MAC('01-02-03-0A-0B-0C')
>>> str(mac)
'01-02-03-04-05-06'
'01-02-03-0A-0B-0C'
>>> str(mac).replace('-', ':')
'01:02:03:04:05:06'
'01:02:03:0A:0B:0C'
>>> str(mac).replace('-', '')
'010203040506'
'0102030A0B0C'
>>> str(mac).lower()
'01-02-03-0a-0b-0c'

@@ -234,0 +236,0 @@

@@ -217,9 +217,11 @@ macaddress

>>> mac = macaddress.MAC('01-02-03-04-05-06')
>>> mac = macaddress.MAC('01-02-03-0A-0B-0C')
>>> str(mac)
'01-02-03-04-05-06'
'01-02-03-0A-0B-0C'
>>> str(mac).replace('-', ':')
'01:02:03:04:05:06'
'01:02:03:0A:0B:0C'
>>> str(mac).replace('-', '')
'010203040506'
'0102030A0B0C'
>>> str(mac).lower()
'01-02-03-0a-0b-0c'

@@ -226,0 +228,0 @@