ÿØÿà JFIF    ÿÛ „  ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ     ÿÄ H    !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ." ¤‡ú*õ'VŽ|¼´Úgllº¼klz[Æüï÷Aób‡Eÿ dÑ»Xx9ÃÜ£ÁT/`¼¸vI±Ýµ·Ë‚“G³þ*Ÿû´r|*}<¨îºœ @¦mÄ’M¹”.œ«Y–|6ÏU¤jç¥ÕÞqO ˜kDÆÁ¨5ÿ š;ÐЦ¦€GÙk \ –Þ=â¼=SͧµªS°ÚÍpÜãQűÀõ¬?ÃÁ1Ñ•õZà?hóœ€ L¦l{Y*K˜Ù›zc˜–ˆâ ø+¾ ­-Ök¥%ùEÜA'}ˆ><ÊIè“bpÍ/qÞâvoX€w,\úªò6Z[XdÒæ­@Ö—€$òJí#é>'°Ú ôª˜<)4ryÙ£|óAÅn5žêŸyÒäMÝ2{"}‰–¤l÷ûWX\l¾Á¸góÉOÔ /óñB¤f¸çñ[.P˜ZsÊË*ßT܈§QN¢’¡¨§V¼(Üù*eÕ“”5T¨‹Âê¥FŒã½Dü[8'Ò¥a…Ú¶k7a *•›¼'Ò·\8¨ª\@\õ¢¦íq+DÙrmÎ…_ªæ»ŠÓœ¡¯’Ré9MÅ×D™lælffc+ŒÑ,ý™ÿ ¯þǤ=Å’Á7µ÷ÚÛ/“Ü€ñýã¼àí¾ÕÑ+ƒ,uµMâÀÄbm:ÒÎPæ{˜Gz[ƒ¯«® KHà`ߨŠéí¯P8Aq.C‰ à€kòpj´kN¶qô€…Õ,ÜNŠª-­{Zö’æû44‰sŽè‰îVíRœÕm" 6?³D9¡ÇTíÅꋇ`4«¸ÝÁô ï’ýorqКÇZ«x4Žâéþuïf¹µö[P ,Q£éaX±`PÉÍZ ¸äYúg üAx ’6Lê‚xÝÓ*äQ  Ï’¨hÍ =²,6ï#rÃ<¯–£»ƒ‹,–ê•€ aÛsñ'%Æ"®ÛüìBᝠHÚ3ß°©$“XnœÖ’î2ËTeûìxîß ¦å¿çÉ ðK§þ{‘t‚Ϋ¬jéîZ[ ”š7L¥4VÚCE×]m¤Øy”ä4-dz£œ§¸x.*ãÊÊ b÷•h:©‡¦s`BTÁRû¾g⻩‹jø sF¢àJøFl‘È•Xᓁà~*j¯ +(ÚÕ6-£¯÷GŠØy‚<Ç’.F‹Hœw(+)ÜÜâÈzÄäT§FߘãÏ;DmVœ3Àu@mÚüXÝü•3B¨òÌÁÛ<·ÃÜ z,Ì@õÅ·d2]ü8s÷IôÞ¯^Ç9¢u„~ëAŸï4«M? K]­ÅàPl@s_ p:°¬ZR”´›JC[CS.h‹ƒïËœ«Æ]–÷ó‚wR×k7X‰k›‘´ù¦=¡«‰¨¨Â')—71ó’c‡Ðúµ `é.{§p¹ój\Ž{1h{o±Ý=áUÊïGÖŒõ–-BÄm+AZX¶¡ ïHðæ¥JmÙ;…䡟ˆ¦ ° äšiÉg«$üMk5¤L“’çÊvïâï ,=f“"íἊ5ô¬x6{ɏžID0e¸vçmi'︧ºð9$ò¹÷*£’9ÿ ²TÔ…×>JV¥}Œ}$p[bÔ®*[jzS*8 ”·T›Í–ñUîƒwo$áè=LT™ç—~ô·¤ÈÚ$榍q‰„+´kFm)ž‹©i–ËqÞŠ‰à¶ü( ‚•§ •°ò·‡#5ª•µÊ﯅¡X¨šÁ*F#TXJÊ ušJVÍ&=iÄs1‚3•'fý§5Ñ<=[íÞ­ PÚ;ѱÌ_~Ä££8rÞ ²w;’hDT°>ÈG¬8Á²ÚzŽ®ò®qZcqJêäÞ-ö[ܘbň±çb“ж31²n×iƒðÕ;1¶þÉ ªX‰,ßqÏ$>•î íZ¥Z 1{ç൵+ƒÕµ¥°T$§K]á»Ûï*·¤tMI’ÂZbŽÕiÒ˜}bÓ0£ª5›¨ [5Ž^ÝœWøÂÝh° ¢OWun£¤5 a2Z.G2³YL]jåtì”ä ÁÓ‘%"©<Ôúʰsº UZvä‡ÄiÆÒM .÷V·™ø#kèýiíÌ–ª)µT[)BˆõÑ xB¾B€ÖT¨.¥~ð@VĶr#¸ü*åZNDŽH;âi ],©£öØpù(šºãö¼T.uCê•4@ÿ GÕÛ)Cx›®0ø#:ÏðFÒbR\(€€Ä®fã4Þ‰Fä¯HXƒÅ,†öEÑÔÜ]Öv²?tLÃvBY£ú6Êu5ÅAQ³1‘’¬x–HŒÐ‡ ^ ¸KwJôÖŽ5×CÚ¨vÜ«/B0$×k°=ðbÇ(Ï)w±A†Á† 11Í=èQšµ626ŒÜ/`G«µ<}—-Ö7KEHÈÉðóȤmݱû±·ø«Snmá=“䫚mݱŸ¡¶~ó·“äUóJæúòB|E LêŽy´jDÔ$G¢þÐñ7óR8ýÒ…Ç› WVe#·Ÿ p·Fx~•ݤF÷0Èÿ K¯æS<6’¡WШ; ´ÿ ¥Êø\Òuî†åÝ–VNœkÒ7oòX¨Á­Ø÷FÎÑä±g÷ÿ M~Çî=p,X´ ÝÌÚÅ‹’ÃjÖ.ØöÏñ qïQ¤ÓZE†° =6·]܈ s¸>v•Ž^Ý\wq9r‰Î\¸¡kURÒ$­*‹Nq?Þª*!sŠÆ:TU_u±T+øX¡ ®¹¡,ÄâÃBTsÜ$Ø›4m椴zÜK]’’›Pƒ @€#â˜`é¹=I‡fiV•Ôî“nRm+µFPOhÍ0B£ €+¬5c v•:P'ÒyÎ ‰V~‚Ó†ÖuókDoh$å\*ö%Ю=£«…aȼ½÷Û.-½VŒŠ¼'lyî±1¬3ó#ÞE¿ÔS¤gV£m›=§\û"—WU¤ÚǼÿ ÂnÁGŒÃ ‚õN D³õNÚíŒÕ;HôyÄÈ©P¹Ä{:?R‘Ô¨âF÷ø£bÅó® JS|‚R÷ivýáâ€Æé¡è³´IئÑT!§˜•ت‚¬â@q€wnïCWÄ@JU€ê¯m6]Ï:£âx'+ÒðXvÓ¦Úm=–´7œ $ì“B£~p%ÕŸUþ« N@¼üï~w˜ñø5®—'Ôe»¤5ã//€ž~‰Tþ›Å7•#¤× Íö pÄ$ùeåì*«ÓŠEØWEÈsßg ¦ûvžSsLpºÊW–âµEWöˬH; ™!CYõZ ÃÄf æ#1W. \uWâ\,\Çf j’<qTbên›Î[vxx£ë 'ö¨1›˜ÀM¼Pÿ H)ƒêêŒA7s,|F“ 꺸k³9Ìö*ç®;Ö!Ö$Eiž•¹ÒÚ†ýóéÝû¾ÕS®ó$’NÝäŸz¤5r¦ãÄÃD÷Üø!°ø‡Ô&@m™Ì^Ãä­d q5Lnÿ N;.6½·N|#ä"1Nƒx“ã<3('&ñßt  ~ªu”1Tb㫨9ê–›–bìd$ߣ=#ÕãÒmU¯eí$EFù5ýYô櫨æì™Ç—±ssM]·á¿0ÕåJRÓªîiƒ+O58ÖñªŠÒx" \µâá¨i’¤i —Ö ” M+M¤ë9‚‰A¦°Qõ¾ßøK~¼Ã‘g…Ö´~÷Ï[3GUœÒ½#…kàÔ®Ò”‰³·dWV‰IP‰Ú8u¹”E ÖqLj¾êÕCBš{A^Âß;–¨`¯¬ìö ˼ ×tìø.tƐm*n¨y4o&Àx¥n¦×î‡aupáÛj8¿m›è¶ã!o½;ß0y^ý×^EÑ¿ÒjzŒ­)vÚÑnÄL …^ªô× ‡—‚3k Îý­hï]içå–îÏ*÷ñþ»Ô CÒjøjÍznˆ´ ¹#b'Fô‹ ‰v¥'’à'T´ƒHýÍ%M‰ ƒ&ÆÇŒï1 ‘ –Þ ‰i¬s žR-Ÿ kЬá¬7:þ 0ŒÅÒÕ/aÙ¬ÃÝ#Úøœ ©aiVc‰. ¹¦ãµ” ›Yg¦›ÆÎýº°f³7ƒhá·¸­}&D9¡ÂsÉÙÞèŠõØàC™¨ñbFC|´Ü(ŸƒÚÒ-%»'a Ì¿)ËÇn¿úÿ ÞŽX…4ÊÅH^ôΑí@ù¹Eh¶“L8Çjù ¼ÎåVªóR©Ï5uà V4lZß®=€xÖŸ–ÑÈ ÷”¨°¾__yM1tÉ?uÆþIkÄgæ@þ[¢†°XÃJ£j·:nkÅ¢u ‘}âGzö­/IµèЬ¼48q¦F°ŽR¼=ûì{´¯RýicS ÕÛ íNtÍÙï£,w4rêì®»~x(©Uñ§#Ñ&œÕ¤>ÎåÍÓ9’Ö{9eV­[Öjâ²ãu]˜å2›qÑšÕJç0€sÄ|Êëè0튔bÁ>“{×_F`Ø©ºê:µä,v¤ðfc1±"«ÔÍän1#=· Âøv~H½ÐßA¾¿Ü€Óš]Õ; I¾÷ç‚Qi†î¹9ywÔKG˜áñ zQY—§ÃÕZ07§X‚ Áh;ÁM)iÌCH-¯T‘ë|A0{Ò½LÚ–TâÖkÜ’dÀ“rmm»”جPF³ÖcbE§T€ÒxKºû’Ó®7±²(\4ŽÃ¸Uu@j™yĵ;³µ!Á¢b.W¤=mõ´êµK k ¸K^ÜÛ#p*Ü14qkZç5ïë †°5Ï%ÍÛ<Õ¤×Ô¥ê†C Õ´¼ú$ƒÖ“”]Ù¬qÞÚ[4©ý!ûÏ—Áb쳐XµA¬â~`›Çr¸8ìùÝ䫦<>ä÷«?xs´ÇÑ /á;¹øüÊÈÙà{"@Žïzâ¬[âß‚ U_<ÇŸ½4èN˜ú61®qŠu ¦þF£»äJ_ˆÙÎ~ ÞAã–݄ϗrŠD;xTž‘ô`É«…suãO`?³à™ô Lý#Íc5öoæØ‚y´´÷«ZR§<&JÇ+éâô´€i!Àˆ0æAoàðLèÖ-2ŸõW.’t^–(KÁmHµV@xÜÇy®Ñø­â^:Ú3w· 7½¹°ñ¸â¹®:',«Mœ—n­Á+Ãbš LÈ‘ÄnRÓÅœ%¦²‰¨ùQ:¤f‚ "PÕtô¸…cæl…&˜Ú˜Ôkv‹ž+vŠ,=¢v­6—Xy*¥t£«<™:“aîϲ=¦6rO]XI¿Œ÷¤zÚ­›¶ 6÷”w\d ü~v®ˆÌk«^m<ÿ ¢‰Õ\)ùºŽ;… lîÙÅEŠ®cѾ@vnMÏ,¼“ñ•ŽBxðÃzãÇç%3ˆ"}Ù•Åî> BÉú;Ò]V+P˜F_´ßé> Øše|ï‡ÄOmFæÇ ãqÞ$/xÐx­z`ï9"œÜij‚!7.\Td…9M‡•iŽ‹¾‘50ÞŽn¥ß4ÉôO ¹*í^QêËÜÇÌ8=ާs‰'ÂëÙ«á%Pú[O †ÅP¯Vsް.‰,kc¶ ¬A9n˜XÎ-ÞšN["¹QÕ‰ƒMýÁߺXJæÍaLj¾×Ãmã¾ãÚ uñÒþåQô¦¥ /ÄUx:‚ÍÜ’ Đ©ØÝ3V¨‰ÕnÐ6ó*óúK­«…c ¯U òhsý­jóÔj#,ímŒRµ«lbïUTŒÑ8†Ä0œÏr`ð¡¬É Ї ë"À² ™ 6¥ f¶ ¢ÚoܱԷ-<Àî)†a¶ž'Ú»¨TXqØæ¶÷YÄHy˜9ÈIW­YÀuMFë ºÏ’AqÌ4·/Ú †ô'i$øä­=Ä Ý|öK×40è|È6p‘0§)o¥ctî§H+CA-“ xØ|ÐXАç l8íºð3Ø:³¤¬KX¯UÿÙ U &]^@@svdZddlmZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z zZddl m Z mZmZmZmZmZmZmZmZmZmZmZeeeeeeeeefZWnek rYnXddlmZeZze ZWne!k rYnXGdddeZ"Gdd d eZ#Gd d d eZ$Gd d d e%Z&e'dddiej(Z)e'dZ*e'dZ+e'dZ,e'dZ-e'dej(Z.e'dej(Z/e'dej(Z0e'dej(Z1e'dej(Z2e'dZ3e'dZ4e'dZ5e'dej(Z6e'dej(Z7e'dZ8e'd Z9e'd!ej(Z:e'd"ej(Z;e'd#ej(Ze'd&Z?Gd'd(d(e%Z@d)d*ZAd.d,d-ZBdS)/a Facilities for reading and writing Debian changelogs The aim of this module is to provide programmatic access to Debian changelogs to query and manipulate them. The format for the changelog is defined in `deb-changelog(5) `_ Stability: The API is not marked as stable but hasn't changed incompatibly since 2007. Potential users of these classes are asked to work with the `python-debian` maintainers to improve, extend and stabilise this API. Overview ======== Create a changelog object using the constuctor. Pass it the contents of the file if there are some entries, or ``None`` to create an empty changelog:: >>> import debian.changelog >>> ch = debian.changelog.Changelog() >>> ch.new_block( ... package='example', ... version='0.1', ... distributions='unstable', ... urgency='low', ... author="%s <%s>" % debian.changelog.get_maintainer(), ... date=debian.changelog.format_date() ... ) >>> ch.add_change('') >>> print(ch) example (0.1) unstable; urgency=low -- Stuart Prescott Sun, 08 Apr 2018 13:03:01 +1000 If you have the full contents of a changelog, but are only interested in the most recent versions you can pass the ``max_blocks`` keyword parameter to the constuctor to limit the number of blocks of the changelog that will be parsed. If you are only interested in the most recent version of the package then pass ``max_blocks=1``:: >>> import gzip >>> from debian.changelog import Changelog >>> with gzip.open('/usr/share/doc/dpkg/changelog.Debian.gz') as fh: ... ch = Changelog(fh, max_blocks=1) >>> print(''' ... Package: %s ... Version: %s ... Urgency: %s''' % (ch.package, ch.version, ch.urgency)) Package: dpkg Version: 1.18.24 Urgency: medium See `/usr/share/doc/python-debian/examples/changelog/` or the `git repository `_ for examples of usage. The :class:`Changelog` class is the key class within this module. Changelog Classes ----------------- )absolute_importN) AnyDictIterableIteratorIOListOptionalPatternUnionTextTupleTypeVar)Versioncs,eZdZdZdZfddZddZZS)ChangelogParseErrorz0Indicates that the changelog could not be parsedTcs||_tt|dSN)_linesuperr__init__selfline __class__2/usr/lib/python3/dist-packages/debian/changelog.pyrszChangelogParseError.__init__cCs d|jS)NzCould not parse changelog: )rrrrr__str__szChangelogParseError.__str____name__ __module__ __qualname____doc__Z is_user_errorrr __classcell__rrrrrs rc@seZdZdZdS)ChangelogCreateErrorz`Indicates that changelog could not be created, as all the information required was not givenN)rr r!r"rrrrr$sr$cs,eZdZdZdZfddZddZZS) VersionErrorzBIndicates that the version does not conform to the required formatTcs||_tt|dSr)_versionrr%rrversionrrrrszVersionError.__init__cCs d|jS)NzCould not parse version: )r&rrrrrszVersionError.__str__rrrrrr%s r%c @seZdZdZd!ddZddZdd Zeeed d Zd d Z ddZ ddZ ddZ ddZ eddZeddZddZejdkreZddZn eZdd ZdS)" ChangeBlocka!Holds all the information about one block from the changelog. See `deb-changelog(5) `_ for more details about the format of the changelog block and the necessary data. :param package: str, name of the package :param version: str or Version, version of the package :param distributions: str, distributions to which the package is released :param urgency: str, urgency of the upload :param urgency_comment: str, comment about the urgency setting :param changes: list of str, individual changelog entries for this block :param author: str, name and email address of the changelog author :param date: str, date of the changelog in RFC822 (`date -R`) format :param other_pairs: dict, key=value pairs from the header of the changelog, other than the urgency value that is specified separately :param encoding: specify the encoding to be used; note that Debian Policy mandates the use of UTF-8. Nutf-8c Csld|_||||_||_|p"d|_|p,d|_|p6g|_||_||_g|_ | pRi|_ | |_ d|_ d|_ dS)NunknownF ) _raw_version _set_versionpackage distributionsurgencyurgency_comment_changesauthordate _trailing other_pairs _encoding _no_trailer_trailer_separator) rr0r(r1r2r3changesr5r6r8encodingrrrrs      zChangeBlock.__init__cCs|dk rt||_dSr)strr.r'rrrr/szChangeBlock._set_versioncCs|jdkrdSt|jSr)r.rrrrr _get_versions zChangeBlock._get_versionz/The package version that this block pertains todoccCsZi}|jD]F\}}|d|dd}t|}|dkrLd|}|||<q|S)z: Obtain a dict from the block header (other than urgency) rNzXS-%s)r8itemsupperlowerxbcs_rematch)rZ norm_dictkeyvaluemrrrother_keys_normaliseds  z!ChangeBlock.other_keys_normalisedcCs|jS)z; Get the changelog entries for this block as a list of str )r4rrrrr<szChangeBlock.changescCs|j|dS)z, Add a sign-off (trailer) line to the block N)r7appendrrrradd_trailing_lineszChangeBlock.add_trailing_linecCsz|js|g|_nf|j}|d}t|D].\}}t|}|dkr*|||d}qZq*||sp||||_dS)z$ Append a change entry to the block FNT)r4reverse enumerate blanklinerGinsertrL)rchanger<ZaddediZch_entryrJrrr add_changes    zChangeBlock.add_changecCsZtd|j}g}||D]4}|d}td|D]}|t|dq:q |S)N rz\d+) sixujoinr4finditergrouprerLint)rZtype_rer<ZbugsrGZ closes_listZbugmatchrrr_get_bugs_closed_generics z$ChangeBlock._get_bugs_closed_genericcCs |tS)z+ List of (Debian) bugs closed by the block )r]closesrrrr bugs_closed'szChangeBlock.bugs_closedcCs |tS)z, List of Launchpad bugs closed by the block )r]closeslprrrrlp_bugs_closed-szChangeBlock.lp_bugs_closedcCsTd}|jdkrtd||jd7}|jdkr6td|d|jd7}|jdkrZtd||jd7}|jdkrztd |d |j|j7}|jD]\}}|d ||f7}q|d 7}|dkrtd |D]}||d 7}q|j s6|j dkrtd|j dkrtd|d|j |j |j d 7}|j D]}||d 7}q<|S)Nr,zPackage not specifiedrUzVersion not specified(z) zDistribution not specifiedz; zUrgency not specifiedzurgency=z, %s=%s zChanges not specifiedzAuthor not specifiedzDate not specifiedz -- )r0r$r.r1r2r3r8rCr<r:r5r6r;r7)rblockrHrIrRrrrr_format3sB         zChangeBlock._format3cCst||jSrr>encoder9rrrr __bytes__XszChangeBlock.__bytes__cCst||jSrZunicoderhr9rrrrr]szChangeBlock.__str__) NNNNNNNNNr*)rr r!r"rr/r?propertyr(rKr<rMrTr]r_raresysrri __unicode__rrrrr)sD     "  r)z?^(\w%(name_chars)s*) \(([^\(\) \t]+)\)((\s+%(name_chars)s+)+)\;Z name_charsz [-+0-9a-z.]z^\s*$z ^\s\s+.*$z[^ -- (.*) <(.*)>( ?)((\w+\,\s*)?\d{1,2}\s+\w+\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4}\s*)$z`^ --(?: (.*) <(.*)>( ?)((\w+\,\s*)?\d{1,2}\s+\w+\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4}))?\s*$z^([-0-9a-z]+)=\s*(.*\S)$z^([-0-9a-z]+)((\s+.*)?)$z ^X[BCS]+-z^(;;\s*)?Local variables:z^vim:z ^\$\w+:.*\$z^\# z ^/\*.*\*/z5closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*zlp:\s+\#\d+(?:,\s*\#\d+)*zW^(\w+\s+\w+\s+\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}\s+[\w\s]*\d{4})\s+(.*)\s+(<|\()(.*)(\)|>)z:^(\w+\s+\w+\s+\d{1,2},?\s*\d{4})\s+(.*)\s+(<|\()(.*)(\)|>)z&^(\w[-+0-9a-z.]*) \(([^\(\) \t]+)\)\;?z"^([\w.+-]+)(-| )(\S+) Debian (\S+)z#^Changes from version (.*) to (.*):z$^Changes for [\w.+-]+-[\w.+-]+:?\s*$z^Old Changelog:\s*$z^(?:\d+:)?\w[\w.+~-]*:?\s*$c @seZdZdZdIddZeddZdJd d Zd d ZddZ e ee ddZ e ddddZ e ddddZ e ddddZe ddddZe ddddZddZddZe eed dZd!d"Ze ed#dZd$d%Zd&d'Zej d(kreZd)d*Zn eZd+d,Zd-d.Zd/d0Zd1d2Zd3d4Ze d5ded6dZ d7d8Z!e d9de!d:dZ"d;d<Z#d=d>Z$e d?de$d@dZ%dAdBZ&e dCde&dDdZ'dKdEdFZ(dGdHZ)dS)L ChangelogaL Represents a debian/changelog file. To get the properly formatted changelog back out of the object merely call `str()` on it. The returned string should be a properly formatted changelog. :param file: str, list of str, or file-like. The contents of the changelog, either as a ``str``, ``unicode`` object, or an iterator of lines such as a filehandle, (each line is either a ``str`` or ``unicode``) :param max_blocks: int, optional (Default: ``None``, no limit) The maximum number of blocks to parse from the input. :param allow_empty_author: bool, optional (Default: `False`), Whether to allow an empty author in the trailer line of a change block. :param strict: bool, optional (Default: ``False``, use a warning) Whether to raise an exception if there are errors. :param encoding: str, If the input is a str or iterator of str, the encoding to use when interpreting the input. There are a number of errors that may be thrown by the module: - :class:`ChangelogParseError`: Indicates that the changelog could not be parsed, i.e. there is a line that does not conform to the requirements, or a line was found out of its normal position. May be thrown when using the method `parse_changelog`. The constructor will not throw this exception. - :class:`ChangelogCreateError`: Some information required to create the changelog was not available. This can be thrown when `str()` is used on the object, and will occur if a required value is `None`. - :class:`VersionError`: The string used to create a Version object cannot be parsed as it doesn't conform to the specification of a version number. Can be thrown when creating a Changelog object from an existing changelog, or instantiating a Version object directly to assign to the version attribute of a Changelog object. If you have a changelog that may have no author information yet as it is still a work in progress, i.e. the author line is just:: -- rather than:: -- Author Thu, 12 Dec 2006 12:23:34 +0000 then you can pass ``allow_empty_author=True`` to the Changelog constructor. If you do this then the ``author`` and ``date`` attributes may be ``None``. NFr*cCs0||_g|_g|_|dk r,|j||||ddS)N) max_blocksallow_empty_authorstrict)r9_blocksinitial_blank_linesparse_changelog)rfilerorprqr=rrrrszChangelog.__init__cCs|rt|n t|dSr)rwarningswarn)messagerqrrr _parse_errors zChangelog._parse_errorTc#Cs:d}d}d}d} d} |p|j}|dkr6|d|dSg|_g|_t|d} g} |} d}t|trl||}t|tj r| s|d|dS| }|D]L}t|tj s||}| d }| ||fkrt|}t|}|dk rD|dk rt|j|krdS|d | _|d | _|d | _|d d d }i}i}|dD]}| }t|}|dkr|d||qX|d }|d }||kr|d|||||<|dkr*t|}|dkr|d||n&|d | _|d }|dk r2|| _n|||<qX|| _|} q|dk rz| |krf|j|n|jd|qt |}t!|}t"|}t#|}t$|}|dk s|dk r| |kr|jd|| }| } q|dk s|dk s|dk r,| |kr|j|q|jd|qt%|dk st&|dk st'|dk st(|dk st)|dk st*|dk st+|dk st,|dk r| |kr|jd|| }| } q|d| |f|| |kr|j|n|jd|q| || fkrt-|} t.|}!t/|}"t|}| dk r`| || } q|!dk r|!d dkr|d|||!d | _0d|!d |!d f| _1|!d| _2| | _3|j| g} t|d} |} n|"dk r*|s|d||q| | _3|j| g} t|d} |} n||dk r@| |nft"|}t#|}t$|}|dk s||dk s||dk r| |q|d| |f|| |q| | kr||kr|jd|n | |qdst4d| q| || fks| | kr6||kr6|d| || | _3d| _5|j| dS)ag Read and parse a changelog file If you create an Changelog object without specifying a changelog file, you can parse a changelog file with this method. If the changelog doesn't parse cleanly, a :class:`ChangelogParseError` exception is thrown. The constructor will parse the changelog on a best effort basis. z first headingznext heading of EOFzstart of change datazmore change data or trailerz slurp to endNzEmpty changelog file.)r=rcrB;,z$Invalid key-value pair after ';': %szRepeated key-value: %sr2z!Badly formatted urgency value: %sz(Unexpected line while looking for %s: %sr-z Badly formatted trailer line: %sz%s <%s>FzUnknown state: %szFound eof where expected %sT)6r9ryrrrsr) isinstancebytesdecoderV string_typesstrip splitlines text_typerstriptoplinerGrPlenrZr0r.lstripr1splitkeyvaluerEvalue_rer2r3r8rLrMemacs_variables vim_variables cvs_keywordcomments more_commentsold_format_re1old_format_re2old_format_re3old_format_re4old_format_re5old_format_re6old_format_re7old_format_re8changereendlineendline_nodetailsr;r5r6r4AssertionErrorr:)#rrurorprqr=Z first_headingZnext_heading_or_eofZstart_of_change_dataZmore_changes_or_trailerZ slurp_to_endZ current_blockr<stateZ old_staterZ top_matchZ blank_matchZpairsZall_keysr8ZpairZkv_matchrHrIZ val_matchZcommentZ emacs_matchZ vim_matchZ cvs_matchZcomments_matchZmore_comments_matchZ change_matchZ end_matchZend_no_details_matchrrrrts                                                                      zChangelog.parse_changelogcCs |jdjS)z,Return a Version object for the last versionr)rrr(rrrr get_versionszChangelog.get_versioncCst||jd_dS)zwSet the version of the last changelog block version can be a full version string, or a Version object rN)rrrr(r'rrr set_versionszChangelog.set_versionzhVersion object for latest changelog block. (Property that can both get and set the version.)r@cCs|jjSr)r( full_versionrrrrzChangelog.z+The full version number of the last versioncCs|jjSr)r(epochrrrrrrzFThe epoch number of the last revision, or `None` if no epoch was used.cCs|jjSrr(debian_revisionrrrrrrz:The debian part of the version number of the last version.cCs|jjSrrrrrrrrcCs|jjSr)r(upstream_versionrrrrrrzsz*Changelog.get_versions..rrrrrr get_versionsszChangelog.get_versionszA list of :class:`debian.debian_support.Version` objects that the package went through. These version objects provide all version attributes such as `epoch`, `debian_revision`, `upstream_version`. These attributes cannot be assigned to.cCsdd|jDS)NcSsg|] }|jqSr)r.rrrrrsz+Changelog._raw_versions..rrrrr _raw_versionsszChangelog._raw_versionscCsHg}|td|j|jD]}|t|q"td|S)Nrcr,)rLrVrWrXrsrrr)rpiecesrdrrrres  zChangelog._formatrfcCst||jSrrgrrrrriszChangelog.__bytes__cCst||jSrrjrrrrr szChangelog.__str__cCs t|jSr)iterrrrrrr__iter__szChangelog.__iter__cCs>t|tr|j|St|tjr,|t|S|j|j|S)z select a changelog entry by number, version string, or Version :param n: integer or str representing a version or Version object )rr\rrrVrrversionsindex)rnrrr __getitem__s     zChangelog.__getitem__cCs t|jSr)rrrrrrr__len__szChangelog.__len__cCs||jd_dSNrrrr1)rr1rrrset_distributions#szChangelog.set_distributionscCs |jdjSrrrrrrr(rzfA string indicating the distributions that the package will be uploaded to in the most recent version.cCs||jd_dSrrrr2)rr2rrr set_urgency.szChangelog.set_urgencycCs |jdjSrrrrrrr3rzTA string indicating the urgency with which the most recent version will be uploaded.cCs|jd|dS)a and a new dot point to a changelog entry Adds a change entry to the most recent version. The change entry should conform to the required format of the changelog (i.e. start with two spaces). No line wrapping or anything will be performed, so it is advisable to do this yourself if it is a long entry. The change will be appended to the current changes, no support is provided for per-maintainer changes. rN)rrrT)rrRrrrrT9s zChangelog.add_changecCs||jd_dS)z+ set the author of the top changelog entry rNrrr5)rr5rrr set_authorFszChangelog.set_authorcCs |jdjSrrrrrrrLrzj The author of the most recent change. This should be a properly formatted name/email pair.cCs||jd_dS)z set the date of the top changelog entry :param date: str a properly formatted date string (`date -R` format; see Policy) rNrrr6)rr6rrrset_dateRszChangelog.set_datecCs |jdjSrrrrrrr\rz The date associated with the current entry. Should be a properly formatted string with the date and timezone. See the :func:`format_date()` function.c Cs@| p|j} t||||||||| | } | d|jd| dS)a Add a new changelog block to the changelog Start a new :class:`ChangeBlock` entry representing a new version of the package. The arguments (all optional) are passed directly to the :class:`ChangeBlock` constructor; they specify the values that can be provided to the `set_*` methods of this class. If they are omitted the associated attributes *must* be assigned to before the changelog is formatted as a str or written to a file. r,rN)r9r)rMrrrQ) rr0r(r1r2r3r<r5r6r8r=rdrrr new_blockcs  zChangelog.new_blockcCs||dS)z Write the changelog entry to a filehandle Write the changelog out to the filehandle passed. The file argument must be an open file object. N)writer)rZ filehandlerrrwrite_to_open_fileszChangelog.write_to_open_file)NNFFr*)NFTN) NNNNNNNNNN)*rr r!r"r staticmethodryrtrrrkr(rrZdebian_versionrrrrr0rrrrerlrrirmrrrrr1rr2rTrr5rr6rrrrrrrns9   K        rnc Cstj}td}d|krN||d}|rNd|kr@|d|d<|d|d<d|ks^d|krd|kr||d}|rd|kr|d|d<|d|d<d}d|kr|d}nJd|kr|d}n8ztd d tt j }Wnt t fk rYnXd}d|kr|d}nd|kr(|d}n|d}tj d r^td }z|}W5|X|slt}|rtt j}|sd}n d ||f}|r|}||fS) aGet the maintainer information in the same manner as dch. This function gets the information about the current user for the maintainer field using environment variables of gecos informations as approriate. It uses the same methods as dch to get the information, namely DEBEMAIL, DEBFULLNAME, EMAIL, NAME, /etc/mailname and gecos. :returns: a tuple of the full name, email pair as strings. Either of the pair may be None if that value couldn't be determined. z^(.*)\s+<(.*)>$ZDEBEMAILZ DEBFULLNAMErBrzZEMAILNNAMEz,.*r,z /etc/mailnamez%s@%s)osenvironr[compilerGrZsubpwdgetpwuidgetuidZpw_gecosKeyErrorAttributeErrorpathexistsopenclosereadlinersocketZgetfqdnZpw_name)envZregexZ match_objZ maintainerZ email_addressZaddrfuserrrrget_maintainersZ         rTcCstj||S)a format a datestamp in the required format for the changelog :param timestamp: float, optional. The timestamp (seconds since epoch) for which the date string should be created. If not specified, the current time is used. :param localtime: bool, optional (default True). Use the local timezone in the date string. :returns: str, date stamp formatted according to the changelog specification (i.e. RFC822). )emailZutilsZ formatdate)Z timestamp localtimerrr format_dates r)NT)Cr"Z __future__rZ email.utilsrrrr[rrvrlrVtypingrrrrrrr r r r r rrZIterableDataSource ImportErrorZdebian.debian_supportr ExceptionZ_base_exception_classZ StandardError NameErrorrr$r%objectr)r IGNORECASErrPrrrrrrFrrrrrr^r`rrrrrrrrrnrrrrrrsX 8 8      xK