0
  5   	ˆl–Ü4ý( ©¤ýÔâ�jãb¸)‹Fÿ�þB gð[�·äóÈƒh¹ÇÆÅ      	1
  X   ˆl–Ãa¾”Ê:”Ê‚ÀµpL©‹Fÿ�þ^l«7(£v1 O6@?ÉƒZÈ_ŠI|¥�+Wé3ž¯a–Ü4ý( ©¤ýÔâ�jãlÜjbÑ¿È ^    # SPDX-License-Identifier: BSD-2-Clause
#
# This file is part of pyosmium. (https://osmcode.org/pyosmium/)
#
# Copyright (C) 2023 Sarah Hoffmann <lonvia@denofr.de> and others.
# For a full list of authors see the git log.

from osmium.osm.mutable import create_mutable_node, create_mutable_way, create_mutable_relation

from osmium.osm.types import (OSMObject as OSMObject,
                              Node as Node,
                              Way as Way,
                              Relation as Relation,
                              Area as Area,
                              Changeset as Changeset,
                              Tag as Tag,
                              TagList as TagList,
                              NodeRef as NodeRef,
                              NodeRefList as NodeRefList,
                              WayNodeList as WayNodeList,
                              OuterRing as OuterRing,
                              InnerRing as InnerRing,
                              RelationMember as RelationMember,
                              RelationMemberList as RelationMemberList)

from osmium.osm._osm import (Location as Location,
                             Box as Box,
                             osm_entity_bits as osm_entity_bits,
                             NOTHING as NOTHING,
                             NODE as NODE,
                             WAY as WAY,
                             RELATION as RELATION,
                             AREA as AREA,
                             OBJECT as OBJECT,
                             CHANGESET as CHANGESET,
                             ALL as ALL)

setattr(Location, '__repr__',
        lambda l: f'osmium.osm.Location(x={l.x!r}, y={l.y!r})'
                      if l.valid() else 'osmium.osm.Location()')
setattr(Location, '__str__',
        lambda l: f'{l.lon_without_check():.7f}/{l.lat_without_check():.7f}'
                      if l.valid() else 'invalid')

setattr(Box, '__repr__', lambda b: f"osmium.osm.Box(bottom_left={b.bottom_left!r}, top_right={b.top_right!r})")
setattr(Box, '__str__', lambda b: f'({b.bottom_left!s} {b.top_right!s})')

     ˆÆÅÊ523Ã¾È     ‹      Õ•QoÚ0Çßû)<?ì.�Ž©ÔñÔ¤¡Q@”iš¦irbC¬&6²Œ}ú9$V•­Ó6­{òùò÷Ýý.‰�<‹Ç½Ù‡I½™]ÑäÝëá ‡pà}»ÏâêÁy3ú#ŒpæÜ²°Ùlš›vS›Ì¦�¹"?ëŒL]“;Žé)}ô‘L0îWDœt¹ ÅÅ¤çôÊYÉ…?·µÀÅZ¦Â–¶¢Ðf[/a»Jsì÷`WI%$PEõy NDÍ·eþð�çò!w ,Ù¥,MC‰ËÐšår¡"ìôS"‹²&�0ÈT+IÎÔms!ç±ÜEøã 7þäuà²ò4%eFÌ#üª�.ÇQŒéˆ‚ {Xsí5W˜™u¨Ð\Î¥à'Å7•øF~=0®4±°©‘K'µ:HÁ#£¦:·KæY_x‚Ì«*	ÿY7Xú]3&WÓþh¦UKxâPÝï¼9L'ÌåP,�H�÷ÕXUŽç*±ËËýÕE¹È¦5ÐƒÊ_ �ëœsÌzŠrÏ…éÞ:®ô^i­ Õi„a#¼@áËnÐAèi0¹fÇP[O…a¥n•Þ¨cÿAÿâ3[ùPF'âŽæàzV+DA§Û
Nbùõí?Àº‡ô¿â¬ÄÚÿÖ˜Vëßxäõõ` °Aªø™wQˆe    7   ˆl–äY>”JeJe@†à¸Û*bÑ¿�þDYZY¹BáYI#MùÌ„€ ËÀ¿É .ô    # lock.py - simple advisory locking scheme for mercurial
#
# Copyright 2005, 2006 Olivia Mackall <olivia@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.


import contextlib
import errno
import os
import signal
import socket
import time
import warnings

from .i18n import _
from .pycompat import getattr

from . import (
    encoding,
    error,
    pycompat,
    util,
)

from .utils import procutil


def _getlockprefix():
    """Return a string which is used to differentiate pid namespaces

    It's useful to detect "dead" processes and remove stale locks with
    confidence. Typically it's just hostname. On modern linux, we include an
    extra Linux-specific pid namespace identifier.
    """
    result = encoding.strtolocal(socket.gethostname())
    if pycompat.sysplatform.startswith(b'linux'):
        try:
            result += b'/%x' % os.stat(b'/proc/self/ns/pid').st_ino
        except (FileNotFoundError, PermissionError, NotADirectoryError):
            pass
    return result


@contextlib.contextmanager
def _delayedinterrup