ANN: eGenix pyOpenSSL Distribution 0.13.3.1.0.1.6
ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.13.3.1.0.1.6 An easy-to-install and easy-to-use distribution of the pyOpenSSL Python interface for OpenSSL - available for Windows, Mac OS X and Unix platforms This announcement is also available on our web-site for online reading: http://www.egenix.com/company/news/eGenix-pyOpenSSL-Distribution-0.13.3.1.0.1.6.html INTRODUCTION The eGenix.com pyOpenSSL Distribution includes everything you need to get started with SSL in Python. It comes with an easy-to-use installer that includes the most recent OpenSSL library versions in pre-compiled form, making your application independent of OS provided OpenSSL libraries: http://www.egenix.com/products/python/pyOpenSSL/ pyOpenSSL is an open-source Python add-on that allows writing SSL/TLS- aware network applications as well as certificate management tools: https://launchpad.net/pyopenssl/ OpenSSL is an open-source implementation of the SSL/TLS protocol: http://www.openssl.org/ NEWS This new release of the eGenix.com pyOpenSSL Distribution updates the included pyOpenSSL and OpenSSL versions: New in the eGenix pyOpenSSL Distribution * Updated pyOpenSSL to the upstream trunk revision 171 (pyOpenSSL version 0.13.1+). * Added work-around for compiling pyOpenSSL trunk revision 171 on Windows with OpenSSL 1.0.0 and later. * Included support for TLS 1.1 and 1.2 in pyOpenSSL (rev 171). Please see the TLS support section in the documentation for details. http://www.egenix.com/products/python/pyOpenSSL/doc/#TLS_support * Added SSL.OP_NO_COMPRESSION and SSL.OP_SINGLE_ECDH_USE context options to be able to address the CRIME attack and allow for more secure elliptic curve Diffie-Hellman key exchange setups. * Added HTML Sphinx documentation from the pyOpenSSL trunk version to the package. An online version is available from our website: http://www.egenix.com/products/python/pyOpenSSL/doc/pyopenssl.html * Updated the included CA bundles to the latest Mozilla 2014-01-28 version. * Included ca-bundle*.crt files now have the same modification date as the Mozilla certdata.txt file from which they were generated. * Restored compatibility of the ca_bundle module with Python 2.4. * Enhanced the included https_client.py example to show case OpenSSL best practices: - server name parsing (RFC 2818 support will follow in one of the next releases) - SNI (support for TLS extension to support multiple SSL sites on a single host) - setup secure default SSL options - setup secure default SSL cipher suite - use TLS 1.0 - 1.2 only - disable SSL compression negotiation (prevent CRIME attack) New in OpenSSL -- * Updated included OpenSSL libraries from OpenSSL 1.0.1e to 1.0.1f. See http://www.openssl.org/news/news.html and http://www.openssl.org/news/vulnerabilities.html for a complete list of changes, most important: - CVE-2013-4353: A carefully crafted invalid TLS handshake could crash OpenSSL with a NULL pointer exception. A malicious server could use this flaw to crash a connecting client. - CVE-2013-6450: A flaw in DTLS handling can cause an application using OpenSSL and DTLS to crash. - CVE-2013-6449: A flaw in OpenSSL can cause an application using OpenSSL to crash when using TLS version 1.2. As always, we provide binaries that include both pyOpenSSL and the necessary OpenSSL libraries for all supported platforms: Windows x86 and x64, Linux x86 and x64, Mac OS X PPC, x86 and x64. We've also added egg-file distribution versions of our eGenix.com pyOpenSSL Distribution for Windows, Linux and Mac OS X to the available download options. These make setups using e.g. zc.buildout and other egg-file based installers a lot easier. DOWNLOADS The download archives and instructions for installing the package can be found at: http://www.egenix.com/products/python/pyOpenSSL/ UPGRADING Before installing this version of pyOpenSSL, please make sure that you uninstall any previously installed pyOpenSSL version. Otherwise, you could end up not using the included OpenSSL libs. ___ SUPPORT Commercial support for these packages is available from eGenix.com. Please see http://www.egenix.com/services/support/ for details about our support offerings. MORE
PyDev 3.3.3 Released
Hi All, PyDev 3.3.3 has been released Details on PyDev: http://pydev.org Details on its development: http://pydev.blogspot.com LiClipse (PyDev standalone with goodies such as support for Django Templates, Kivy Language, Mako Templates, Html, Javascript, etc): http://brainwy.github.io/liclipse/ What is PyDev? --- PyDev is a plugin that enables users to use Eclipse for Python, Jython and IronPython development -- making Eclipse a first class Python IDE -- It comes with many goodies such as code completion, syntax highlighting, syntax analysis, code analysis, refactor, debug, etc. Release Highlights: --- * **Important**: PyDev requires Eclipse 3.8 or 4.3 onwards and Java 7! For older versions, keep using PyDev 2.x (see LiClipse: http://brainwy.github.io/liclipse for a PyDev standalone with all requirements bundled). * **Code Completion**: - Compiled modules are now indexed and shown in the context-insensitive code-completion. - In an empty file, a code-completion request will show options related to creating modules (press Ctrl+Space twice to show only those templates). * **Performance**: - Building (indexing) of Python files is **much** faster. - Code completion does not get slown down by other analysis done in the background due to shell synchronization. * **Interactive Console**: - The interactive console now has tab-completion (so, tab can be used to show completions such as in IPython). * **Debugger**: - **Locals are now properly changed in the debugger** -- along with set next statement and auto-reloading this can make a debug session much more enjoyable! - Added a way to skip functions on a step-in on functions with **#@DontTrace** comments: - **Makes it possible to skip a lot of boilerplate code on a debug session!** - Can be enabled/disabled in the debugger preferences; - Ctrl+1 in a line with a method shows option to add **#@DontTrace** comment (if enabled in the preferences). - Debugging Stackless is much improved, especially for versions of Stackless released from 2014 onwards (special thanks to Anselm Kruis who improved stackless itself for this integration to work properly). - Reload during a debug session is improved and more stable: - Only updates what it can in-place or adds new attributes; - Shows what's being patched in the console output; - New hooks are provided for clients which may want to extend the reload; - See: Auto Reload in Debugger: http://pydev.org/manual_adv_debugger_auto_reload.html for more details. * **General**: - Compiled modules are now indexed, so, **fix import with Ctrl+1 now works with itertools, PyQt and other 'forced builtins'**. - When diffing a Python file, the PyDev comparison (with proper syntax highlighting) is now the default. - When finding a definition in a .pyd file, if there's a related .pyx in the same location, it's opened. - Running unit-tests will not try to import files that are in folders that don't have an __init__.py file. - Alt+Shift+O can be used to toggle mark occurrences. - Ctrl+3 not bound by default anymore on PyDev so that it does not conflict with the Eclipse Ctrl+3 (Ctrl+/ can be used instead). - Fixed recursion issue when finding file in pydev package explorer. - When configuring the interpreter, links are not followed when resolving entries for the PYTHONPATH. - It's possible to launch a directory containing a __main__.py file executable. - Fixed issues when creating django project without any existing project in the workspace. - Fixed deadlock on code-completion. - __pycache__ folders are hidden by default. * **Organize imports**: - When saving a file, if automatically organizing imports, don't remove unused imports even if that option is checked. - When saving a file, if automatically organizing imports, and nothing changes, don't change the buffer (so, no undo command is created). - @NoMove can be used in an import so that the import organizer doesn't mess with it. * **Refactoring**: - Fixed error when moving resource in PYTHONPATH to a dir out of the PYTHONPATH. - On a search make sure we search only python files, not dlls (which could give OutOfMemory errors and make the search considerably slower). - Multiple fixes on the rename module refactoring. Cheers, -- Fabio Zadrozny -- Software Developer LiClipse http://brainwy.github.io/liclipse PyDev - Python Development Environment for Eclipse http://pydev.org http://pydev.blogspot.com -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
Re: Eclipse IDE printing values automatically
On 29/01/2014 06:26, mick verdu wrote: I am using Pydev 2.8 on Eclipse IDE. It is printing some values that haven't been printed with print command. How to deal with this problem? There are some very smart people on this list, but unless you give them details of what you've tried and precisely what went wrong how can we help? What does your code look like? Are you debugging, running a file via CTRL+F11 and seeing the output on the Pydev console, what? Slight aside, why 2.8, 3.3.3 has just been released? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
ANN: Python Events Calendar - Now with Twitter feed
[Please help spread the word by forwarding to other relevant mailing lists, user groups, etc. world-wide; thanks :-)] ANNOUNCING Python Events Calendars - Now with Twitter feed maintained by the Python Software Foundation (PSF) and a group of volunteers INTRODUCTION As some of you may know, the PSF has put together a team of volunteers who are maintaining a central Python events calendar. We currently have two calendars in place: * Python Events Calendar - meant for conferences and larger gatherings focusing on Python or a related technology (in whole or in part) * Python User Group Calendar - meant for user group events and other smaller local events The calendars are displayed on http://pycon.org/ and in a smaller version in the sidebar of the http://python.org/ website. You can subscribe to the calendars using iCal and RSS feeds and also embed the calendar widgets on your sites. Please see our wiki page for details: https://wiki.python.org/moin/PythonEventsCalendar The calendars are open to the world-wide Python community, so you can have local user group events, as well as regional and international conference events added to the calendars. NEWS We have now created a Twitter feed for the calendars, which you can follow to get updates on all newly added events: https://twitter.com/pythonevents The tweets come with links to the event listings, which you can add to your own Google calendars with a single click. ADDING EVENTS If you want to have entries added to those calendars, please write to eve...@python.org and include the following information: * Name of the event * Type of the event (conference, bar camp, user group, etc) * Focus on Python and approximate size * URL * Location and country * Date and time (if relevant) For recurring events, please also include a description of the recurrence in a way that's compatible and supported by Google calendars. MORE INFORMATION More information on the calendars, the URLs, feed links, IDs, embedding, etc. is available on the wiki: https://wiki.python.org/moin/PythonEventsCalendar Enjoy, -- Marc-Andre Lemburg Director Python Software Foundation http://www.python.org/psf/ -- https://mail.python.org/mailman/listinfo/python-list
Re: Highlighting program variables instead of keywords?
Ned Batchelder n...@nedbatchelder.com writes: On 1/28/14 2:19 AM, wxjmfa...@gmail.com wrote: Different, but a little bit related. The work which is done actually on the possibility (not implemented but alreay realized) to colorize (style) the different graphemes of a glyph is very interesting. Python with its absurd Flexible String Representation just become a no go for the kind of task. (Should not be too complicate to understand.) jmf JMF, seriously, stop it. You've convinced no one because you have no convincing arguments. It's obnoxious to continue to make this claim. Stop it. Please. If you want to try to convince someone, convince me. Write to me offline: n...@nedbatchelder.com -- Ned Batchelder, http://nedbatchelder.com I seriously think jmf has a mental disorder. So these reactions won't do anything useful. Just ignore. -- Piet van Oostrum p...@vanoostrum.org WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list
Re: Eclipse IDE printing values automatically
On Tue, 28 Jan 2014 22:26:56 -0800, mick verdu wrote: I am using Pydev 2.8 on Eclipse IDE. It is printing some values that haven't been printed with print command. How to deal with this problem? There's no print statement in the code you included to demonstrate the problem, which is probably why the data you expect to be printed isn't being printed. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Large Two Dimensional Array
On Tue, 28 Jan 2014 21:25:54 -0800, Ayushi Dalmia wrote: Hello, I am trying to implement IBM Model 1. In that I need to create a matrix of 5*5 with double values. Currently I am using dict of dict but it is unable to support such high dimensions and hence gives memory error. Any help in this regard will be useful. I understand that I cannot store the matrix in the RAM but what is the most efficient way to do this? This looks to me like a table with columns: word1 (varchar 20) | word2 (varchar 20) | connection (double) might be your best solution, but it's going a huge table (2G5 rows) The primary key is going to be the combination of all 3 columns (or possibly the combination of word1 and word2) and you want indexes on word1 and word2, which will slow down populating the table, but speed up searching it, and I assume that searching is going to be a much more frequent operation than populating. Also, creating a database has the additional advantage that next time you want to use the program for a conversion between two languages that you've previously built the data for, the data already exists in the database, so you don't need to build it again. I imagine you would have either one table for each language pair, or one table for each conversion (treating a-b and b-a as two separate conversions). I'm also guessing that varchar 20 is long enough to hold any of your 50,000 words in either language, that value might need adjusting otherwise. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: [python-committers] [RELEASED] Python 3.3.4 release candidate 1
Would you to accept fixes for http://bugs.python.org/issue20434 and http://bugs.python.org/issue20437 before 3.3.4 final? On Mon, Jan 27, 2014 at 9:36 AM, Georg Brandl ge...@python.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm reasonably happy to announce the Python 3.3.4 release candidate 1. Python 3.3.4 includes several security fixes and over 120 bug fixes compared to the Python 3.3.3 release. This release fully supports OS X 10.9 Mavericks. In particular, this release fixes an issue that could cause previous versions of Python to crash when typing in interactive mode on OS X 10.9. Python 3.3 includes a range of improvements of the 3.x series, as well as easier porting between 2.x and 3.x. In total, almost 500 API items are new or improved in Python 3.3. For a more extensive list of changes in the 3.3 series, see http://docs.python.org/3.3/whatsnew/3.3.html and for the detailed changelog of 3.3.4, see http://docs.python.org/3.3/whatsnew/changelog.html To download Python 3.3.4 rc1 visit: http://www.python.org/download/releases/3.3.4/ This is a preview release, please report any bugs to http://bugs.python.org/ The final version is scheduled to be released in two weeks' time, on or about the 10th of February. Enjoy! - -- Georg Brandl, Release Manager georg at python.org (on behalf of the entire python-dev team and 3.3's contributors) -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlLmDI4ACgkQN9GcIYhpnLAr6wCePRbHF80k5goV4RUDBA5FfkwF rLUAnRg0RpL/b6apv+Dt2/sgnUd3hTPA =Z4Ss -END PGP SIGNATURE- ___ python-committers mailing list python-committ...@python.org https://mail.python.org/mailman/listinfo/python-committers -- Thanks, Andrew Svetlov -- https://mail.python.org/mailman/listinfo/python-list
pytz question: GMT vs. UTC
According ato the pytz doc (http://pytz.sourceforge.net/): ‘UTC’ is Universal Time, also known as Greenwich Mean Time or GMT in the United Kingdom. If they are equal, why don't timezone objects created from those two strings compare equal? pytz.timezone(UTC) == pytz.timezone(GMT) False (I'm revealing my complete ignorance of timezone manipulation by asking this question.) Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list
Re: Pyro4 - reading files
- Original Message - Hello there. I am currently working on a project involving the use of Pyro4. I have a scenario. We have the pc named A, and a pc named B. On pc B lies a python script, that includes pyro, and a method for reading files. On pc A, we create an instance to the pyro object on pc B. And we call the method for reading files. I want to read a file that lies on pc B, from pc A using the method of the pyro object i just created. Is it possible? Thank you. Hi, Yes, read http://pythonhosted.org/Pyro4/tutorials.html If you plan to transfer large files between PCS, make sure you read http://pythonhosted.org/Pyro4/tipstricks.html before, as other solutions may be better suited. JM -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- https://mail.python.org/mailman/listinfo/python-list
Re: pytz question: GMT vs. UTC
On Thu, Jan 30, 2014 at 4:29 AM, Skip Montanaro s...@pobox.com wrote: According ato the pytz doc (http://pytz.sourceforge.net/): ‘UTC’ is Universal Time, also known as Greenwich Mean Time or GMT in the United Kingdom. If they are equal, why don't timezone objects created from those two strings compare equal? pytz.timezone(UTC) == pytz.timezone(GMT) False There are some technical differences between UTC and GMT, which almost never come up, and which I very much doubt are significant here (does pytz care about leap seconds?). But what I'm seeing - at least in the version of pytz that I picked up by typing 'sudo pip install pytz' on Debian Wheezy - is that the two are different types. UTC seems to be a special case, while GMT is like the others. That may be why they're not comparing equal, even though all operations might happen to produce the same results. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: pytz question: GMT vs. UTC
Skip Montanaro s...@pobox.com writes: According ato the pytz doc (http://pytz.sourceforge.net/): ‘UTC’ is Universal Time, also known as Greenwich Mean Time or GMT in the United Kingdom. This is inaccurate, and I'd like to see it corrected in the documentation. UTC is neither UT nor GMT. GMT is not precisely defined, which makes it unsuitable for keeping precise time in a computer system. If they are equal, why don't timezone objects created from those two strings compare equal? pytz.timezone(UTC) == pytz.timezone(GMT) False Python is correct, the timezones are not the same. See URL:https://en.wikipedia.org/wiki/Coordinated_Universal_Time and URL:https://en.wikipedia.org/wiki/Greenwich_Mean_Time. From the former: Saying GMT often implies either UTC or UT1 when used within informal or casual contexts. In technical contexts, usage of GMT is avoided; the unambiguous terminology UTC or UT1 is preferred. (I'm revealing my complete ignorance of timezone manipulation by asking this question.) Treat GMT like any other locale-specific timezone, and convert to/from it as late/early as possible (like a locale-specific encoding). Treat UTC as the canonical timezone for keeping all timestamp values in (like Unicode for text). -- \ “Reality must take precedence over public relations, for nature | `\cannot be fooled.” —Richard P. Feynman | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list
Re: pytz question: GMT vs. UTC
On 2014-01-29, Skip Montanaro s...@pobox.com wrote: According ato the pytz doc (http://pytz.sourceforge.net/): UTC is Universal Time, also known as Greenwich Mean Time or GMT in the United Kingdom. If they are equal, The question is _are_ they equal? There is an exact defintion for what UTC is, and there's another exact definition of what UT1 is (more about this later). Civil timezones are defined as offsets from UTC. It seems that GMT no longer has an exact definition (at least from a metrologist's perspective) can be used to mean either UTC or UT1. UTC and UT1 can differ by up to 1 second. Leap seconds are occasionally added to UTC to keep it from drifting more than 1 second from UT1. From a metrology point of view, what was originally called GMT (solar time at 0 degrees longtitude) is now called UT1. So some people rightly claim that GMT means UT1. But nobody actually _uses_ UT1 (except metrologists and astronomers). All civil time is based on UTC: the official time in Greenwich (except during BST) is not UT1, it's UTC. So some other people rightly claim that GMT refers to UTC. In a software libary context, I would say that GMT should mean UTC and they ought to be considered equal and should always produce identical results. In a metrology context, people saying GMT probably ought to be smacked across the knuckes with a 12-inch platinum-iridium ruler and asked to try again until they specify either UTC or UT1 (or some other precisely defined UT-flavor). http://en.wikipedia.org/wiki/Universal_Time -- Grant Edwards grant.b.edwardsYow! A dwarf is passing out at somewhere in Detroit! gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: [RELEASED] Python 3.3.4 release candidate 1
29.01.14 18:55, Andrew Svetlov написав(ла): Would you to accept fixes for http://bugs.python.org/issue20434 and http://bugs.python.org/issue20437 before 3.3.4 final? And http://bugs.python.org/issue20440. -- https://mail.python.org/mailman/listinfo/python-list
Re: Eclipse IDE printing values automatically
Thanks for reply. I am running file via ctrl+F11 and seeing output on pyDev Console. My code has got nested dictionaries, lists and tuples. What you want to see? -- https://mail.python.org/mailman/listinfo/python-list
Re: Eclipse IDE printing values automatically
On 29/01/2014 20:23, mick verdu wrote: Thanks for reply. I am running file via ctrl+F11 and seeing output on pyDev Console. My code has got nested dictionaries, lists and tuples. What you want to see? Two things, code and context. See here for how to go about this http://sscce.org/ -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
UTC timezone causing brain explosions
Following up on my earlier note about UTC v. GMT, I am having some trouble grokking attempts to convert a datetime into UTC. Consider these three values: import pytz UTC = pytz.timezone(UTC) UTC UTC LOCAL_TZ = pytz.timezone(America/Chicago) LOCAL_TZ DstTzInfo 'America/Chicago' CST-1 day, 18:00:00 STD now = datetime.datetime.now() now datetime.datetime(2014, 1, 29, 15, 39, 35, 263666) All well and good, right? The variable now is a naive datetime object. I happen to be sitting in a chair in the city of Chicago, so let's call it what it is, a datetime in the America/Chicago timezone: s = LOCAL_TZ.localize(now) s datetime.datetime(2014, 1, 29, 15, 39, 35, 263666, tzinfo=DstTzInfo 'America/Chicago' CST-1 day, 18:00:00 STD) That looks good to me. Now, let's normalize it to UTC: t = UTC.normalize(s) t datetime.datetime(2014, 1, 29, 15, 39, 35, 263666, tzinfo=UTC) t.hour 15 WTF? Why isn't the t.hour == 21? Okay, let's see what GMT does for us: GMT = pytz.timezone(GMT) u = GMT.normalize(s) u datetime.datetime(2014, 1, 29, 21, 39, 35, 263666, tzinfo=StaticTzInfo 'GMT') u.hour 21 That looks correct, but I don't understand why I don't get hour==21 out of the UTC.normalize call. It's like it's a no-op. Skip -- https://mail.python.org/mailman/listinfo/python-list
Re: UTC timezone causing brain explosions
On 01/29/2014 01:52 PM, Skip Montanaro wrote: Following up on my earlier note about UTC v. GMT, I am having some trouble grokking attempts to convert a datetime into UTC. Okay, let's see what GMT does for us: GMT = pytz.timezone(GMT) u = GMT.normalize(s) u datetime.datetime(2014, 1, 29, 21, 39, 35, 263666, tzinfo=StaticTzInfo 'GMT') u.hour 21 That looks correct, but I don't understand why I don't get hour==21 out of the UTC.normalize call. It's like it's a no-op. Having not examined the code, I can't tell you why UTC is different. I can say that .astimezone seems to work in all cases: -- GMT StaticTzInfo 'GMT' -- UTC UTC -- LOCAL_TZ = pytz.timezone(America/Los_Angeles) -- now = datetime.datetime.now() -- s = LOCAL_TZ.localize(now) -- s datetime.datetime(2014, 1, 29, 14, 9, 56, 494967, tzinfo=DstTzInfo 'America/Los_Angeles' PST-1 day, 16:00:00 STD) -- s.astimezone(UTC) datetime.datetime(2014, 1, 29, 22, 9, 56, 494967, tzinfo=UTC) -- s.astimezone(GMT) datetime.datetime(2014, 1, 29, 22, 9, 56, 494967, tzinfo=StaticTzInfo 'GMT') -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list
Re: UTC timezone causing brain explosions
Skip Montanaro s...@pobox.com writes: Following up on my earlier note about UTC v. GMT, I am having some trouble grokking attempts to convert a datetime into UTC. For what it's worth, you're not alone. Time zones are a hairy beast to manage, made all the more difficult because national politicians continually fiddle with them which means they can't just be a built-in part of the Python standard library. Consider these three values: import pytz UTC = pytz.timezone(UTC) UTC UTC LOCAL_TZ = pytz.timezone(America/Chicago) LOCAL_TZ DstTzInfo 'America/Chicago' CST-1 day, 18:00:00 STD now = datetime.datetime.now() now datetime.datetime(2014, 1, 29, 15, 39, 35, 263666) All well and good, right? Not really :-) You avoid the pain if you never create naive datetime values in the first place. Instead, specify the timezone for the value you're creating:: now = datetime.datetime.now(tz=LOCAL_TZ) now datetime.datetime(2014, 1, 29, 16, 35, 7, 900526, tzinfo=DstTzInfo 'America/Chicago' CST-1 day, 18:00:00 STD) That way the value will respond correctly to requests to convert it to whatever timezone you specify:: MELBOURNE = pytz.timezone(Australia/Melbourne) now.astimezone(MELBOURNE) datetime.datetime(2014, 1, 30, 9, 35, 7, 900526, tzinfo=DstTzInfo 'Australia/Melbourne' EST+11:00:00 DST) now.astimezone(UTC) datetime.datetime(2014, 1, 29, 22, 35, 7, 900526, tzinfo=UTC) now.astimezone(LOCAL_TZ) datetime.datetime(2014, 1, 29, 16, 35, 7, 900526, tzinfo=DstTzInfo 'America/Chicago' CST-1 day, 18:00:00 STD) -- \ “We tend to scoff at the beliefs of the ancients. But we can't | `\scoff at them personally, to their faces, and this is what | _o__) annoys me.” —Jack Handey | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list
Re: UTC timezone causing brain explosions
On Wed, Jan 29, 2014 at 1:52 PM, Skip Montanaro s...@pobox.com wrote: Following up on my earlier note about UTC v. GMT, I am having some trouble grokking attempts to convert a datetime into UTC. Consider these three values: import pytz UTC = pytz.timezone(UTC) LOCAL_TZ = pytz.timezone(America/Chicago) LOCAL_TZ DstTzInfo 'America/Chicago' CST-1 day, 18:00:00 STD now = datetime.datetime.now() now datetime.datetime(2014, 1, 29, 15, 39, 35, 263666) All well and good, right? The variable now is a naive datetime object. I happen to be sitting in a chair in the city of Chicago, so let's call it what it is, a datetime in the America/Chicago timezone: s = LOCAL_TZ.localize(now) s datetime.datetime(2014, 1, 29, 15, 39, 35, 263666, tzinfo=DstTzInfo 'America/Chicago' CST-1 day, 18:00:00 STD) That looks good to me. Now, let's normalize it to UTC: I don't think .normalize() doesn't do what you think it does; it's related to timezones with DST. I believe you want datetime.astimezone() instead. t = UTC.normalize(s) t datetime.datetime(2014, 1, 29, 15, 39, 35, 263666, tzinfo=UTC) t.hour 15 WTF? Why isn't the t.hour == 21? Because you didn't actually perform a proper timezone conversion: t = s.astimezone(UTC) t datetime.datetime(2014, 1, 29, 21, 39, 35, 263666, tzinfo=UTC) t.hour == 21 True snip That looks correct, but I don't understand why I don't get hour==21 out of the UTC.normalize call. It's like it's a no-op. It is indeed a no-op: You can take shortcuts when dealing with the UTC side of timezone conversions. normalize() and localize() are not really necessary when there are no daylight savings time transitions to deal with. -- http://pytz.sourceforge.net Cheers, Chris -- https://mail.python.org/mailman/listinfo/python-list
Python shell wont open IDLE or an exisiting .py files
I am on Windows 8, Python 3.3.4 and 3.3.3 and all previous versions exhibit the same problem on my Windows 8 PC. This problem occurred out of nowhere overnight. It was working fine for months until today. I tried to open a file and nothing happened. If I tried to open a .py file (any .py file) from an existing instance of IDLE, it briefly flashed up a new window and then closed both the new window and the existing window (normally it opens the requested in a new window leaving the existing window untouched). If I launch the Python GUI it opens a Python Shell fine. But as soon as I try to open a file (including a new file), it closes the Shell. I rebooted the machine. Same problem. I repaired the Python installation and rebooted. Same problem. I uninstalled Python. Rebooted. Deleted the Python33 directory entirely. Rebooted. Installed Python. Rebooted. Same problem. Everything else on the system appears to be working just fine. Any ideas what the problem might be or how else I might go about fixing things? Sent from Windows Mail-- https://mail.python.org/mailman/listinfo/python-list
Re: pytz question: GMT vs. UTC
On Thu, Jan 30, 2014 at 11:17 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Wed, 29 Jan 2014 19:02:53 + (UTC), Grant Edwards invalid@invalid.invalid declaimed the following: to be smacked across the knuckes with a 12-inch platinum-iridium ruler Under what temperature/pressure conditions is that ruler? STP, of course. And the smack must be administered in exactly 1G environment, to ensure proper impact. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: pytz question: GMT vs. UTC
On 2014-01-30 01:50, Dennis Lee Bieber wrote: On Thu, 30 Jan 2014 11:28:16 +1100, Chris Angelico ros...@gmail.com declaimed the following: On Thu, Jan 30, 2014 at 11:17 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Wed, 29 Jan 2014 19:02:53 + (UTC), Grant Edwards invalid@invalid.invalid declaimed the following: to be smacked across the knuckes with a 12-inch platinum-iridium ruler Under what temperature/pressure conditions is that ruler? STP, of course. And the smack must be administered in exactly 1G environment, to ensure proper impact. How cruel... I suspect the smack at 0degC is much more painful than one at room temperature G It's the 21st century; you should be making use of Unicode: 0°C. -- https://mail.python.org/mailman/listinfo/python-list
Re: pytz question: GMT vs. UTC
On Thu, Jan 30, 2014 at 1:40 PM, MRAB pyt...@mrabarnett.plus.com wrote: How cruel... I suspect the smack at 0degC is much more painful than one at room temperature G It's the 21st century; you should be making use of Unicode: 0°C. I started to read that and thought you were going to advocate the use of 0°K... ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Python shell wont open IDLE or an exisiting .py files
On 1/29/2014 6:26 PM, shangonich...@sbcglobal.net wrote: I am on Windows 8, Python 3.3.4 and 3.3.3 and all previous versions exhibit the same problem on my Windows 8 PC. This problem occurred out of nowhere overnight. It was working fine for months until today. Try the following, which I believe I said before. 1. Start the normal console interpreter 'Python (command interpreter)' in the Start Menu. 2. In the interpreter, type import idlelib.idle 3. Open a file. If Idle quits, 4. If Idle quits, look in the console for an exception message. 5. If you do not understand it, *copy and paste the entire message* here. 6. If the Python console also closes, report here. I tried to open a file and nothing happened. If I tried to open a .py file (any .py file) from an existing instance of IDLE, it briefly flashed up a new window and then closed both the new window and the existing window (normally it opens the requested in a new window leaving the existing window untouched). This much I understood. If I launch the Python GUI it opens a Python Shell fine. But as soon as I try to open a file (including a new file), it closes the Shell. This I do not. What is 'Python GUI'? What is 'Python Shell'? I rebooted the machine. Same problem. I repaired the Python installation and rebooted. Same problem. I uninstalled Python. Rebooted. Deleted the Python33 directory entirely. Rebooted. Installed Python. Rebooted. Same problem. Everything else on the system appears to be working just fine. Any ideas what the problem might be or how else I might go about fixing things? Sent from Windows Mail -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Re: Python shell wont open IDLE or an exisiting .py files
Terry Reedy tjre...@udel.edu writes: On 1/29/2014 6:26 PM, shangonich...@sbcglobal.net wrote: If I launch the Python GUI it opens a Python Shell fine. But as soon as I try to open a file (including a new file), it closes the Shell. This I do not. What is 'Python GUI'? What is 'Python Shell'? Those are (part of) the names of menu entries created by the Python installer for MS Windows. I am not sure exactly what programs they invoke. -- \ “… whoever claims any right that he is unwilling to accord to | `\ his fellow-men is dishonest and infamous.” —Robert G. | _o__) Ingersoll, _The Liberty of Man, Woman and Child_, 1877 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list
Re: buggy python interpretter or am I missing something here?
Steven D'Aprano wrote: On Mon, 27 Jan 2014 12:22:22 -0800, Rick Johnson wrote: Why do we even need an input function anyway if all it is going to do is read from stdin? That's not all it does. For example, it handles backspacing, so that typing H E L O O BACKSPACE BACKSPACE L O gives HELLO rather than HELOO\x7f\x7fO. No, it doesn't -- that's handled at a lower level. Any other method of reading from stdin, as long as it hasn't been redirected away from the console, has the same behaviour. I typed some backspaces in the input to each of the following experiments, and they didn't end up in the data: import sys x = sys.stdin.readline() HELLO x 'HELLO\n' import os f = os.fdopen(0) y = f.readline() adsxx y 'adsxx\n' So input() really is a pure convenience function. (That doesn't mean it's not worth having, though!) -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: Eclipse IDE printing values automatically
In 583ab407-7831-45d7-b15d-46b30a6cc...@googlegroups.com mick verdu mickve...@gmail.com writes: Thanks for reply. I am running file via ctrl+F11 and seeing output on pyDev Console. My code has got nested dictionaries, lists and tuples. What you want to see? One thing you could try is to track down exactly which line(s) are causing the unwanted output. Add some print statements to your code, say one print every fifty lines or so. Or perhaps just one print statement at the top of each function. Make each message different so you can tell them apart in the output. When the unwanted output appears, take note of which of your print statements appears above and below it. Then you can add more print statements in between those two, until you have narrowed down exactly what line of code is causing the output. Then, if you still can't tell why it is happening, post that line of code here and maybe we can help. Or, if your program is short enough, you can just post the whole thing here. Be sure to give an example of the unwanted output, and tell us exactly how the program is being executed. If the program uses input files, be sure to give us those too. -- John Gordon Imagine what it must be like for a real medical doctor to gor...@panix.comwatch 'House', or a real serial killer to watch 'Dexter'. -- https://mail.python.org/mailman/listinfo/python-list
Try-except-finally paradox
I found something like this in a StackOverflow discussion. def paradox(): ... try: ... raise Exception(Exception raised during try) ... except: ... print Except after try ... return True ... finally: ... print Finally ... return False ... return None ... return_val = paradox() Except after try Finally return_val False I understand most of this. What I don't understand is why this returns False rather than True. Does the finally short-circuit the return in the except block? -- https://mail.python.org/mailman/listinfo/python-list
Re: Try-except-finally paradox
On Jan 29, 2014 11:01 PM, Jessica Ross deathwea...@gmail.com wrote: I found something like this in a StackOverflow discussion. def paradox(): ... try: ... raise Exception(Exception raised during try) ... except: ... print Except after try ... return True ... finally: ... print Finally ... return False ... return None ... return_val = paradox() Except after try Finally return_val False I understand most of this. What I don't understand is why this returns False rather than True. Does the finally short-circuit the return in the except block? The docs don't seem to specify what happens in this case, but this behavior is intuitive to me. If the except suite had raised an exception instead of returning, the return in the finally would suppress that. The generalized rule appears to be that the control flow specification executed later overrides the earlier. -- https://mail.python.org/mailman/listinfo/python-list
Re: Try-except-finally paradox
On 2014.01.29 23:56, Jessica Ross wrote: I found something like this in a StackOverflow discussion. def paradox(): ... try: ... raise Exception(Exception raised during try) ... except: ... print Except after try ... return True ... finally: ... print Finally ... return False ... return None ... return_val = paradox() Except after try Finally return_val False I understand most of this. What I don't understand is why this returns False rather than True. Does the finally short-circuit the return in the except block? My guess would be that the interpreter doesn't let the finally block get skipped under any circumstances, so the return value gets set to True, but then it forces the finally block to be run before returning, which changes the return value to False. -- CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 10.0 -- https://mail.python.org/mailman/listinfo/python-list
Re: pytz question: GMT vs. UTC
Grant Edwards wrote: smacked across the knuckes with a 12-inch platinum-iridium ruler Imperial or Scottish inches? -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: Try-except-finally paradox
Le jeudi 30 janvier 2014 06:56:16 UTC+1, Jessica Ross a écrit : I found something like this in a StackOverflow discussion. def paradox(): ... try: ... raise Exception(Exception raised during try) ... except: ... print Except after try ... return True ... finally: ... print Finally ... return False ... return None ... return_val = paradox() Except after try Finally return_val False I understand most of this. What I don't understand is why this returns False rather than True. Does the finally short-circuit the return in the except block? The paradox is, in my mind, that the fct paradox() is programmed to be paradoxal. Compare with: def noparadox(i): ... try: ... a = 1 / i ... print('Process') ... except ZeroDivisionError: ... print(ZeroDivisionError) ... a = '?' ... except Exception: ... print(Exception) ... a = '?' ... finally: ... print(Finally) ... return a ... noparadox(2) Process Finally 0.5 noparadox(0) ZeroDivisionError Finally '?' noparadox('asdf') Exception Finally '?' jmf -- https://mail.python.org/mailman/listinfo/python-list
[issue20418] socket.getaddrinfo fails for hostname that is all digits 0-9
Ariel Glenn added the comment: Verified that with AF_INET instead of AF_UNSPEC I get the error from my c program. I'll take this to the glibc folks and see what's up. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20418 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20434] Process crashes if not enough memory to import module
New submission from Vladimir Kerimov: In the file _io\fileio.c in function static PyObject * fileio_readall(fileio *self) this code is incorrect and crashes the process of Python: if (_PyBytes_Resize(result, newsize) 0) { if (total == 0) { Py_DECREF(result); return NULL; } PyErr_Clear(); break; } In the call of _PyBytes_Resize there the result variable passed by reference and changes value to NULL-pointer when function fails and return 0. So on the line Py_DECREF(result); the Python process crashes. -- components: Interpreter Core messages: 209624 nosy: asvetlov, qualab priority: normal severity: normal status: open title: Process crashes if not enough memory to import module type: crash versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines
New submission from Serhiy Storchaka: import io, _pyio io.StringIO('a\nb\r\nc\rd', newline=None) _io.StringIO object at 0xb707c734 io.StringIO('a\nb\r\nc\rd', newline=None).getvalue() 'a\nb\nc\nd' _pyio.StringIO('a\nb\r\nc\rd', newline=None).getvalue() 'a\nb\r\nc\rd' s = io.StringIO(newline=None); s.write('a\nb\r\nc\rd'); s.getvalue() 8 'a\nb\nc\nd' s = _pyio.StringIO(newline=None); s.write('a\nb\r\nc\rd'); s.getvalue() 8 'a\nb\r\nc\rd' -- components: IO messages: 209625 nosy: benjamin.peterson, hynek, pitrou, serhiy.storchaka, stutzbach priority: normal severity: normal status: open title: Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines type: behavior versions: Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20435 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20424] _pyio.StringIO doesn't work with lone surrogates
Serhiy Storchaka added the comment: Thanks Victor. -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20424 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20338] Idle: increase max calltip width
Stefan Krah added the comment: Terry J. Reedy rep...@bugs.python.org wrote: and fixed fixed the first-line deletion somewhere in changes to about 30 other files. Ah, so it was a Derby accident. Let's hope things stabilize soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20338 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20424] _pyio.StringIO doesn't work with lone surrogates
Roundup Robot added the comment: New changeset 6ca9ba9eb76b by Serhiy Storchaka in branch '3.3': Issue #20424: Python implementation of io.StringIO now supports lone surrogates. http://hg.python.org/cpython/rev/6ca9ba9eb76b New changeset 483096ef1cf6 by Serhiy Storchaka in branch 'default': Issue #20424: Python implementation of io.StringIO now supports lone surrogates. http://hg.python.org/cpython/rev/483096ef1cf6 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20424 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20424] _pyio.StringIO doesn't work with lone surrogates
Serhiy Storchaka added the comment: The test is backported to 2.7 in 3971e1b07af4. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20424 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20436] test.regrtest is no more importable in 2.7
New submission from Serhiy Storchaka: $ ./python -m test.regrtest /home/serhiy/py/cpython-2.7/python: No module named test.regrtest It worked several days ago. -- components: Tests messages: 209630 nosy: ezio.melotti, michael.foord, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: test.regrtest is no more importable in 2.7 type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20436 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20434] Process crashes if not enough memory to import module
Andrew Svetlov added the comment: Bug can be reproduced if _PyBytes_Resize fails with out-of-memory error than NULL object decrefed. Buggy modules are _io, binascii and zlib. 3.4 hasn't the problem. Patch for 3.3 is attached. Fix goes to mimic 3.4 -- (replace Py_DECREF with Py_CLEAR), while for _PyBytes_Resize that does not make sense, object has been set to NULL inside _PyBytes_Resize on fail. Also 2.7 has the same issue for _PyString_Resize calls. -- components: +Extension Modules -Interpreter Core keywords: +patch versions: +Python 2.7 Added file: http://bugs.python.org/file33791/issue20434.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20434] Process crashes if not enough memory to import module
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- keywords: +needs review stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20434] Process crashes if not enough memory to import module
STINNER Victor added the comment: Ah yes, the bytes object is set to NULL. In fact, you don't need to call Py_CLEAR(retval) in case of error, because retval is already NULL. Could you please update your patch to just do nothing on retval in case of error please? 3.4 hasn't the problem. Yes, I played some weeks with pyfailmalloc, a new tool for Python 3.4 to inject random MemoryError errors. I fixed many other different issues. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18321] Multivolume support in tarfile module
Lars Gustäbel added the comment: I cannot yet go into the details, because I have not tested the patch. The comments, docstrings and quoting are not very consistent with the rest of the module. There are a few spelling mistakes. The open_volume() method is more or less a copy of the open() method which is not optimal. The patch adds a lot of complexity to the tarfile module for a use case that only a few connoisseurs benefit from. It seems to alter some inherent TarFile mechanics that people might rely on, e.g. the members attribute contains only the members stored in the current volume not the overall entirety of members. Does this patch reliably allow random-access? Would it be possible/easier to add the same functionality using a separate class MultiVolumeTarFile instead? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19281] add __objclass__ to the docs
Nick Coghlan added the comment: Huh, I thought we did this back when Ethan was working on enum stuff, but I guess we never figured out exactly where to put it. Considering that question again now, I suggest adding it to the end of the subsection on implementing descriptors, since that's when it is most likely to be relevant: http://docs.python.org/dev/reference/datamodel.html#implementing-descriptors -- keywords: +easy stage: - needs patch type: - enhancement versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19281 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18321] Multivolume support in tarfile module
Eduardo Robles Elvira added the comment: I cannot yet go into the details, because I have not tested the patch. The comments, docstrings and quoting are not very consistent with the rest of the module. There are a few spelling mistakes. I can try to take care of this, though it'd be best if you can point me out concrete examples. The open_volume() method is more or less a copy of the open() method which is not optimal. I know, but trying to do something else might be even worse.. The patch adds a lot of complexity to the tarfile module for a use case that only a few connoisseurs benefit from. It seems to alter some inherent TarFile mechanics that people might rely on, e.g. the members attribute contains only the members stored in the current volume not the overall entirety of members. Well, that doesn't make much sense to me. You say that people rely on something like members attribute contains only the members stored in the current volume not the overall entirety of members, but as you know, python tarfile lib didn't support volumes before this patch, so I guess people couldn't be relying on that anyway. Also please bear in mind that tarfile volumes support is part of the tar standard, and altough not everyone uses this, it has its niche uses (sliced backups etc). Does this patch reliably allow random-access? Yes and no. No: when you open a volume for reading, the list of members is cleared as you pointed so you cannot access to them. Yes: you can open any volume at the begining of a file, and it read the tarfile from there. I do that in my use-case. Would it be possible/easier to add the same functionality using a separate class MultiVolumeTarFile instead? If you find open_volume similar to open() and don't like, I'm quite sure you would like all the needed copy-paste having this a separate class would entail. Also as I said before, might not make much sense as this is part of the standard. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20425] inspect.Signature should work on decorated builtins
Nick Coghlan added the comment: Patch looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20425 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19920] TarFile.list() fails on some files
Serhiy Storchaka added the comment: Well, good. But I still have several nitpicks. Here is revised patch. * Now ASCII encoding is used to test list() output. And tests now run even if sys.stdout is a StringIO. * test_list_verbose now test that printed files are actually separated by one new line, not by just spaces and not by two new lines. * safe_print was simplified and renamed to _safe_print. Now streams without the encoding attribute are supported. * Minor style fixes. -- Added file: http://bugs.python.org/file33792/fix_tarfile_list_print_lone_surrogate_v5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20422] Signature.from_builtin should raise a ValueError when no signature can be provided
Nick Coghlan added the comment: This proposal and patch look good to me. The current behaviour definitely isn't desirable: import inspect inspect.Signature.from_function(1) Traceback (most recent call last): File stdin, line 1, in module File /home/ncoghlan/devel/py3k/Lib/inspect.py, line 1888, in from_function raise TypeError('{!r} is not a Python function'.format(func)) TypeError: 1 is not a Python function inspect.Signature.from_builtin(1) Signature.from_function() and Signature.from_builtin() should both also be documented, but we may want to wait for PEP 457 and #17373 in Python 3.5 before sorting all that out. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20422 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20436] test.regrtest is no more importable in 2.7
R. David Murray added the comment: Still works fine for me, and I just updated. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20436 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20437] Use Py_CLEAR to safe clear attributes
New submission from Serhiy Storchaka: Some time ago Victor proposed in issue16445 a large patch (275 changes) which replaces Py_DECREF(expr); expr = NULL; to safer Py_CLEAR(expr);. That patch contained was so large because it included cases where expr is just a local variable, which are safe in general. Here are much simpler patches which make replacements only for complex expressions. These patches (as Victor patch) are generated automatically by the Coccinelle tool (http://coccinelle.lip6.fr/). -- components: Extension Modules, Interpreter Core files: py_clear.spatch messages: 209640 nosy: asvetlov, haypo, serhiy.storchaka, skrah priority: normal severity: normal stage: patch review status: open title: Use Py_CLEAR to safe clear attributes type: crash versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33793/py_clear.spatch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20437 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20437] Use Py_CLEAR to safe clear attributes
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file33795/py_clear-3.3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20437 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20437] Use Py_CLEAR to safe clear attributes
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file33796/py_clear-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20437 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20437] Use Py_CLEAR to safe clear attributes
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file33794/py_clear-3.4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20437 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20437] Use Py_CLEAR to safe clear attributes
Serhiy Storchaka added the comment: Patches are generated by following command: spatch --in-place --sp-file py_clear.spatch --dir . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20437 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20434] Process crashes if not enough memory to import module
Serhiy Storchaka added the comment: There are other places where Py_DECREF is called after failed _PyBytes_Resize(). For example in PyBytes_FromObject(): if (_PyBytes_Resize(new, size) 0) goto error; ... error: /* Error handling when new != NULL */ Py_XDECREF(it); Py_DECREF(new); return NULL; -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20436] test.regrtest is no more importable in 2.7
Antoine Pitrou added the comment: Works here too. Are you sure you don't have a test.py somewhere on your path? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20436 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20436] test.regrtest is no more importable in 2.7
Serhiy Storchaka added the comment: Are you sure you don't have a test.py somewhere on your path? Oh, yes, I have. Sorry for the noise. -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20436 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20170] Derby #1: Convert 137 sites to Argument Clinic in Modules/posixmodule.c
Larry Hastings added the comment: Here's a complete patch, converts everything that I think should be converted for 3.4. With this patch applied, all unit tests pass on my 64-bit Linux box. I plan to also run tests with the buildbots before checking it in. The patch... well, it's 14,000 lines. 409k bytes. Do we have any takers? -- Added file: http://bugs.python.org/file33797/larry.clinicize.posixmodule.2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20170 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20170] Derby #1: Convert 137 sites to Argument Clinic in Modules/posixmodule.c
Larry Hastings added the comment: By the way, my plan is to turn on the file preset just before checkin. The patch is *much* easier to read without turning that on first; with the file preset, now you have to keep two windows in sync to compare calls to PyArg_*(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20170 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20437] Use Py_CLEAR to safe clear attributes
Larry Hastings added the comment: LGTM. If it compiles cleanly and passes the unit test suite--which obviously it should--you may check the 3.4 patch to trunk. -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20437 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20319] concurrent.futures.wait() can block forever even if Futures have completed
Changes by Brian Quinlan br...@sweetapp.com: -- assignee: - bquinlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20319 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20170] Derby #1: Convert 137 sites to Argument Clinic in Modules/posixmodule.c
Larry Hastings added the comment: Sorry for the fresh update, but here's revision 3. Only changes: * Gave os.access a - bool return converter. * Fixed up a lot of whitespace. Now, major things are separated by two empty lines, but removed whitespace between #ifdef HAVE_SOMETHING and /*[clinic input] os.something (I used to randomly have blank lines there. No more!) -- Added file: http://bugs.python.org/file33798/larry.clinicize.posixmodule.3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20170 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20422] Signature.from_builtin should raise a ValueError when no signature can be provided
Yury Selivanov added the comment: Nick, thanks for the review. Committed. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20422 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20422] Signature.from_builtin should raise a ValueError when no signature can be provided
Yury Selivanov added the comment: Signature.from_function() and Signature.from_builtin() should both also be documented, but we may want to wait for PEP 457 and #17373 in Python 3.5 before sorting all that out. I would like to wait till 3.5 too. Right now both of them are sort of private API, so we still have the liberty to adjust their behaviour in 3.5 if needed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20422 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20425] inspect.Signature should work on decorated builtins
Yury Selivanov added the comment: Thanks for the review! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20425 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20425] inspect.Signature should work on decorated builtins
Roundup Robot added the comment: New changeset a9fedabb69e5 by Yury Selivanov in branch 'default': inspect.signature: Add support for decorated (wrapped) builtins #20425 http://hg.python.org/cpython/rev/a9fedabb69e5 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20425 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20427] inspect.Signature should ensure that non-default params don't follow default ones
Roundup Robot added the comment: New changeset ca974997280d by Yury Selivanov in branch 'default': inspect.Signature: ensure that non-default params don't follow default ones #20427 http://hg.python.org/cpython/rev/ca974997280d -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20427 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20427] inspect.Signature should ensure that non-default params don't follow default ones
Changes by Yury Selivanov yselivanov...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20427 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20422] Signature.from_builtin should raise a ValueError when no signature can be provided
Roundup Robot added the comment: New changeset 9433b380ad33 by Yury Selivanov in branch 'default': inspect.Signature: Make from_builtin to raise an exception if no signature can http://hg.python.org/cpython/rev/9433b380ad33 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20422 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17481] inspect.getfullargspec should use __signature__
Yury Selivanov added the comment: Committed. Thanks for the reviews! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17481 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17481] inspect.getfullargspec should use __signature__
Changes by Yury Selivanov yselivanov...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17481 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17481] inspect.getfullargspec should use __signature__
Roundup Robot added the comment: New changeset 0fa2750c7241 by Yury Selivanov in branch 'default': inspect.test.getfullargspec: Add a unittest to ensure correct annotations http://hg.python.org/cpython/rev/0fa2750c7241 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17481 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17481] inspect.getfullargspec should use __signature__
Roundup Robot added the comment: New changeset 6d1e8162e855 by Yury Selivanov in branch 'default': inspect.getfullargspec: Use inspect.signature API behind the scenes #17481 http://hg.python.org/cpython/rev/6d1e8162e855 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17481 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
New submission from Yury Selivanov: Should we finally deprecate getfullargspec? With the AC and positional-only parameters support, getfullargspec doesn't provide full information anymore. By deprecation I mean changing its existing note Consider using the new Signature Object interface, which provides a better way of introspecting functions. to Deprecated since version 3.4: Use inspect.signature() instead. -- messages: 209658 nosy: brett.cannon, larry, ncoghlan, yselivanov priority: normal severity: normal status: open title: inspect: Deprecate getfullargspec? type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20170] Derby #1: Convert 137 sites to Argument Clinic in Modules/posixmodule.c
Larry Hastings added the comment: Actually, forget about the file output preset. It wouldn't work for posixmodule. 80% of the entry points are #ifdef conditional on platform functionality. Which means the Clinic generated stuff needs to be #ifdef too. It wouldn't be that hard to add the ability to #ifdef your generated code... but then what? Should it generate an #endif too, right before the end of the block? If it closed the #ifdef, then it'd look dumb: /*[clinic input]* ifdef HAVE_WHATNOT os.whatnot [clinic start generated code]*/ #ifdef HAVE_WHATNOT ... static PyObject * os_whatnot(PyModuleType *) #endif /* HAVE_WHATNOT */ /*[clinic end generated code: output=... ]*/ #ifdef HAVE_WHATNOT { ... } #endif /* HAVE_WHATNOT */ If it didn't close the #ifdef, well, that looks dumb too: /*[clinic input]* ifdef HAVE_WHATNOT os.whatnot [clinic start generated code]*/ #ifdef HAVE_WHATNOT ... static PyObject * os_whatnot(PyModuleType *) /*[clinic end generated code: output=... ]*/ { ... } #endif /* HAVE_WHATNOT */ though maybe that's less dumb. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20170 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20439] inspect.Signature: Add Signature.format method to match formatargspec functionality
New submission from Yury Selivanov: The ability to fine-tune formatting of Signature (currently Signature.__str__) might be useful for pydoc and idle. -- assignee: yselivanov messages: 209660 nosy: brett.cannon, larry, ncoghlan, terry.reedy, yselivanov priority: normal severity: normal status: open title: inspect.Signature: Add Signature.format method to match formatargspec functionality type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20439 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20437] Use Py_CLEAR to safe clear attributes
Serhiy Storchaka added the comment: And here is a patch which replaces Py_XDECREF(identifier); identifier = NULL; to Py_CLEAR(identifier); (10 replaces in 7 files). It doesn't fix any bug (unless identifier is global variable), but makes a code a little cleaner. Compilers should generate equivalent code for both writing. It would be good to commit it too. -- Added file: http://bugs.python.org/file33799/py_xdecref_clear-3.4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20437 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20170] Derby #1: Convert 137 sites to Argument Clinic in Modules/posixmodule.c
Serhiy Storchaka added the comment: The curses module also has many conditionally implemented functions. I think Argument Clinic can detect preprocessor instructions (#if/#ifdef/#ifndef/#else/#endif) and generate needed #if/#endif in generated file. This would be more robust than explicitly repeat condition in clinic declaration, because external conditions can be changed. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20170 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20418] socket.getaddrinfo fails for hostname that is all digits 0-9
Changes by Charles-François Natali cf.nat...@gmail.com: -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20418 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20440] Use Py_REPLACE/Py_XREPLACE macros
New submission from Serhiy Storchaka: Proposed patches replaced idiomatic code Py_DECREF(ptr); ptr = new_value; to Py_REPLACE(ptr, new_value); which is expanded to { PyObject *__tmp__ = ptr; ptr = new_value; Py_DECREF(__tmp__); } (and same for Py_XDECREF - Py_XREPLACE). Victor proposed large patch for issue16447, but this issue was closed after fixing particular bug. Here are updated patches, which Py_REPLACE/Py_XREPLACE macros for cleaner code. They are also generated automatically by the Coccinelle tool (http://coccinelle.lip6.fr/): spatch --in-place --sp-file py_replace.spatch --dir . Patch for every version contains about 50 replaces in about 21-24 files. -- components: Extension Modules, Interpreter Core files: py_replace.spatch messages: 209663 nosy: benjamin.peterson, georg.brandl, haypo, larry, serhiy.storchaka, skrah priority: normal severity: normal stage: patch review status: open title: Use Py_REPLACE/Py_XREPLACE macros type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33800/py_replace.spatch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20440 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20440] Use Py_REPLACE/Py_XREPLACE macros
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file33803/py_replace-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20440 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20440] Use Py_REPLACE/Py_XREPLACE macros
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file33802/py_replace-3.3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20440 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20437] Use Py_CLEAR to safe clear attributes
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +benjamin.peterson, georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20437 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20440] Use Py_REPLACE/Py_XREPLACE macros
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file33801/py_replace-3.4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20440 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Brett Cannon added the comment: Although I say do it in 3.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20438] inspect: Deprecate getfullargspec?
Brett Cannon added the comment: I vote deprecation with no stated plans of removal -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20440] Use Py_REPLACE/Py_XREPLACE macros
Antoine Pitrou added the comment: Something similar was proposed in issue3081. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20440 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17727] document that some distributions change site.py defaults
Georg Brandl added the comment: Matthias and I agreed this isn't necessary since on the relevant distribution it's already documented. -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17727 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20439] inspect.Signature: Add Signature.format method to match formatargspec functionality
Terry J. Reedy added the comment: For an api, given that we have formatargvalue(*getargvalues, ...) formatargspec(*getfullargspec, ...) we might add formatsignature(signature, ...) with the default being the same as str(signature). I checked the first 80 hits at http://code.ohloh.net/search?s=formatargspec%28p=7pp=0fl=Pythonmp=1ml=1me=1md=1ff=1filterChecked=true (which I found with 'search code' on Google) and 10-15% used one of the extended args. Another at least 5% used [1:=1] to strip of '(' and ')', so any new function might have 'parens=True' option. Idle uses the default formatargspec, like almost all other uses, and I presume str(sig) is the same except for where formatargspec is arguably wrong (bound methods). A calltip is a tip, not a doc, so I am most concerned that parameter names not be misleading, as in pattern.match(string) having the parameter misnamed 'pattern' in the C code and I presume, in .signature (absent being fixed). But that is not .signature's fault. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20439 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20440] Use Py_REPLACE/Py_XREPLACE macros
Serhiy Storchaka added the comment: I do not understand why that issue was closed. Probably Py_SETREF is not the best name but this can be discussed. Adverse idea about Py_INCREF also looked questionable. But many people supported the introduction of a macro for safe replacement. And now we see that sources contain 50 potential bugs which can be fixed either by using special macros or by manually inlining them. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20440 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20440] Use Py_REPLACE/Py_XREPLACE macros
Brett Cannon added the comment: It all seems like a good idea to me and I like the Py_REPLACE naming (I was going to suggest Py_SWAP, but Py_XSWAP looks too weird to me). -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20440 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20441] Test_tcl.TclTest.test_split(list) failures on Windows, 2.7.
New submission from Terry J. Reedy: My Win7, AMD64 Win7, Server 2003, but not x86 Win7 buildbot or any others that run test == FAIL: test_split (test.test_tcl.TclTest) -- Traceback (most recent call last): File C:\buildbot.python.org\2.7.kloth-win64\build\lib\test\test_tcl.py, line 321, in test_split self.assertEqual(split(arg), res) AssertionError: Tuples differ: ('12', u'\u20ac', u'\u20ac', '... != (12, u'\u20ac', u'\u20ac', (3 First differing element 0: 12 12 - ('12', u'\u20ac', u'\u20ac', '3.4') ? - -^ ^ + (12, u'\u20ac', u'\u20ac', (3.4,)) ?^ ^ + == FAIL: test_splitlist (test.test_tcl.TclTest) -- Traceback (most recent call last): File C:\buildbot.python.org\2.7.kloth-win64\build\lib\test\test_tcl.py, line 281, in test_splitlist self.assertEqual(splitlist(arg), res) AssertionError: Tuples differ: ('1', u'\u20ac', u'\u20ac', '3... != (1, u'\u20ac', u'\u20ac', (3.4... First differing element 0: 1 1 - ('1', u'\u20ac', u'\u20ac', '3.4') ? - -^ ^ + (1, u'\u20ac', u'\u20ac', (3.4,)) ? ^ ^ + I do not know which is correct and which wrong. -- components: Tkinter messages: 209671 nosy: serhiy.storchaka, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Test_tcl.TclTest.test_split(list) failures on Windows, 2.7. type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20441 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20441] Test_tcl.TclTest.test_split(list) failures on Windows, 2.7.
Serhiy Storchaka added the comment: What is Tcl/Tk patchlevel? It is reported somewhere in tests log. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20441 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20441] Test_tcl.TclTest.test_split(list) failures on Windows, 2.7.
Terry J. Reedy added the comment: I am running tcl8.5.2.1 and tk8.5.2.0 as installed by Tools/buildbots/external.bat. I presume same for Windows buildbots. I did not find 'tcl' or 'tk' other than in test names in the log I checked. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20441 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20406] Use application icon for IDLE
Serhiy Storchaka added the comment: We can steal icon from http://www.python.org/favicon.ico. It contains three variants for different size (16, 32 and 48 pixels). Here is extracted and converted to GIF images. Please try them and original favicon on Windows. Or may be we even can cut larger icon from large official Python logo. -- Added file: http://bugs.python.org/file33804/python_16x16.gif Added file: http://bugs.python.org/file33805/python_32x32.gif Added file: http://bugs.python.org/file33806/python_48x48.gif ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20406 ___attachment: python_16x16.gifattachment: python_32x32.gifattachment: python_48x48.gif___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17159] Remove explicit type check from inspect.Signature.from_function()
Yury Selivanov added the comment: Stefan, is this one still relevant? If it is, I can review it (I have a couple of things to improve) and push in 3.4, as it doesn't really change any API. -- nosy: +yselivanov versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17159 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20231] Argument Clinic accepts no-default args after default args
Yury Selivanov added the comment: Should this one be closed now? FWIW, signature object validates this case now. -- dependencies: +Argument Clinic rollup patch, 2014/01/25 nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20231 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20406] Use application icon for IDLE
Serhiy Storchaka added the comment: As for desctop icon, see also issue1353344 and issue15869. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20406 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com