Re: [Twisted-Python] Twisted 16.1 Release Announcement
Hi, Are there any plans to get back 32-bit wheels for Twisted? -- https://mail.python.org/mailman/listinfo/python-list
Roundup Bug-Tracker 1.5.1 released
I'm proud to release version 1.5.1 of Roundup which has been possible due to the help of several contributors. This release contains important security enhancements, so make sure to read `doc/upgrading.txt <http://www.roundup-tracker.org/docs/upgrading.html>`_ to bring your tracker up to date. Other changes, as usual, include some new features and many bug fixes. Features: - The example local_replace.py has been updated to show how to link to modern revision systems using hex revision identifiers. This extension is used to expand shortcuts in msgs. (Bernhard Reiter) - Drop comment in user settings about numeric hour offsets instead of using pytz timezone names. Due to DST these are wrong half of the year, it is much better to use timezone names. (Thomas Arendsen Hein) - issue2550793: Wrap messages with very long lines in the web interface. (Thomas Arendsen Hein) - New Link / Multilink option "try_id_parsing": Sometimes the key of a class can be numeric -- in that case roundup will try to parse the value as an ID when evaluating form values -- not as a key. Specifying try_id_parsing='no' for these Link/Multilink will skip the ID step, default is 'yes'. (Ralf Schlatterbeck) - New configuration option 'isolation_level' in rdbms section. Currently supported for Postgres and mysql, sets the transaction isolation level. Wrong history entries for concurrent database updates observed in issue2550806 can be prevented by setting this to 'repeatable read' if you want to pay the performance penalty. We test this behaviour in the regression tests for Postgres but not currently for mysql. See http://www.postgresql.org/docs/9.1/static/transaction-iso.html (Ralf Schlatterbeck) - /xmlrpc endpoint now shows link to XML-RPC documentation if accessed through browser, without text/xml Content-Type (anatoly techtonik) - docs: New dedicated chapter for extensions in ``doc/customizing.txt`` (anatoly techtonik) - Increase default height of classhelp windows from 400 to 600. (Thomas Arendsen Hein) - Date properties now can specify (on input) an explicit timezone suffix (similar to RFC 2822), e.g. +0200 for CEST or -0500 for EST. This also works in the XMLRPC interface. For examples see roundup.date.Date. (Ralf Schlatterbeck) - Add RejectRaw exception to allow unescaped HTML error messages to be displayed to the user (thanks Ezio Melotti for the initial patch) (John Kristensen) Fixed: - issue2550869 Duplicate mail headers (Reply-To, Message-ID, In-Reply-To) when sending out email. Reported with first fix by Mathias Behrle. (Bernhard Reiter) - issue2550830 An empty LinkHTMLProperty cannot be compared successfully. Improves the query editing page. Reported and fixed by R David Murray (Bernhard Reiter). - Fix Release-date of 1.5.0 in this file (thanks to Bernhard for discovery) (Ralf Schlatterbeck) - Pythons cgi form code can return a TypeError, we now guard for this condition. (Ralf Schlatterbeck) - Small bug-fix in SQL backends: A query (e.g. in a html menu) with a where-clause that always evaluates to false now will not raise a traceback. (Ralf Schlatterbeck) - Remove Python 2.3 compatibility code for i18n (anatoly techtonik) - If documentation 'sphinx-build' tool is not found in system PATH, 'setup.py build_doc' command now tries to detect it from PYTHONPATH (anatoly techtonik) - Read version and release for generated documentation from roundup/__init__.py. (Thomas Arendsen Hein) - Do not throw an internal error if a .mo file can not be read (Thomas Arendsen Hein) - issue2550673 Make the "Make a copy" link work by fixing copy_url to properly handle multilink properties. (John Rouillard) - issue2550583, issue2550635 Do not limit results with Xapian indexer (Thomas Arendsen Hein) - Allow using plain() on unsaved dates in HTML forms (Thomas Arendsen Hein) - setup.py now installs static files of the HTML documentation (stylesheets, images, etc.) (Thomas Arendsen Hein) - executable .py scripts need "#!/usr/bin/env python", add this to demo.py, remove exec bits from website/wiki/wiki/data/plugin/theme/roundup.py (Thomas Arendsen Hein) - issue2550822: Fix showing more than one additional property in class menu. Report and fix by James Mack (Thomas Arendsen Hein) - Fix String search with special SQL wildcard characters in LIKE/ILIKE clause and add testcase (Ralf Schlatterbeck) - Fix subtle bug when sorting by a Link that contains a Multilink from which we also search for an attribute. In that case the LEFT OUTER JOIN clause was missing in generated SQL. (Ralf Schlatterbeck) - Fix another XSS issue2550817. Note that the code that triggers that particular bug is no longer in roundup core. But the change to the templates we suggest is a *lot* safer as it by default escapes the error and ok messages now. Thanks to Thibault Fevry for the original bug-report. (Ralf Schlatterbeck) - issue2117897: Fi
Re: [Twisted-Python] Twisted 15.4 was the last release to support Python 2.6; or: a HawkOwl Can't Words Situation
Is it possible to fix the documentation? https://twistedmatrix.com/trac/browser/tags/releases/twisted-15.5.0/NEWS?format=raw On Mon, Dec 7, 2015 at 4:06 PM, Amber "Hawkie" Brownwrote: > Hi everyone! > > It's been brought to my attention that I misworded something in the release > notes and it slipped through the cracks. In the NEWS I said: > >> This is the last Twisted release where Python 2.6 is supported, on any >> platform. > > However, I meant that this is the first Twisted release to drop 2.6 support > wholesale, preventing import on this platform. Twisted 15.4 will still > operate, so if you have Python 2.6 deployment requirements, bracket the > maximum to 15.4 on that platform by using an if statement in your setup.py, > and `Twisted >=*minreq*,<=15.4; python_version < '2.7'` under requires_dist > in your setup.cfg, where minreq is the minimum required Twisted. > > Sorry for the inconvenience! > > - Amber "HawkOwl" Brown > Twisted Release Manager > > ___ > Twisted-Python mailing list > twisted-pyt...@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > -- anatoly t. -- https://mail.python.org/mailman/listinfo/python-list
Encoding of Python 2 string literals
Hi, Is there a way to know encoding of string (bytes) literal defined in source file? For example, given that source: # -*- coding: utf-8 -*- from library import Entry Entry(текст) Is there any way for Entry() constructor to know that string текст passed into it is the utf-8 string? I need to better prepare SCons for Python 3 migration. Please, CC. -- anatoly t. -- https://mail.python.org/mailman/listinfo/python-list
Subscribe to get an answer vs automatic CC Was: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)
On Wed, May 27, 2015 at 3:57 PM, Laura Creighton l...@openend.se wrote: Chris Angelico apparantly has a problem with cc'd people who aren't on the list. I thought that CC in this case works automatically? If that's not the case, then I'll be annoyed by this too. So, thanks for CCing. =) Also, https://mail.python.org/mailman/listinfo/python-list - this page should probably mention that you need to subscribe to ask a question (people like me won't read it anyway, but it may help others). python-list is very quiet these days, so if you subscribe it won't be drinking from the firehose. 1688 / 29 = 58.206896551724135 msg/day don't look quiet, and I don't want to be distracted by interesting side threads, because I will accomplish nothing, get stressed, and things get worse at the end of the day. And you can always turn off delivery when you are done. Or you can just go read the archives: https://mail.python.org/pipermail/python-list/2015-May/thread.html I wish I could also commend from the web interface. I've heard Mailman 3.0 is stable, it will be interesting to see what is it capable of. -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)
On Wed, May 27, 2015 at 3:57 PM, Laura Creighton l...@openend.se wrote: --- Forwarded Message Return-Path: python-list-bounces+lac=openend...@python.org Received: from mail.python.org (mail.python.org [82.94.164.166]) by theraft.openend.se (8.14.4/8.14.4/Debian-4) with ESMTP id t4RC09ap02From: Chris Angelico ros...@gmail.com Cc: python-list@python.org python-list@python.org On Wed, May 27, 2015 at 9:52 PM, anatoly techtonik techto...@gmail.com wrote: And the short answer is that we need unicode because we are printing this information to the stdout, and stdout is opened in text mode at least on Windows, and without explicit conversion, Python will try to decode stuff as being `ascii` and fail anyway. So you're working with text. No. It is unknown. I am printing Nodes of SCons build graph and I don't know how Nodes are represented. In my case it appeared that Node contained Russian text, which led to crash of SCons. It could contain Russian text in cp1251 or in utf-8 or in KOI-8 and I can't do guessing of all possible encodings there. I just need to print that tree without crash or information loss. That means you HAVE to decode it somehow; you fundamentally cannot print bytes to the console. Lossless concealment of arbitrary bytes won't help you. Won't help me with what? I am debugging build scripts to find out the *structure* of my dependencies and then all of the sudden Python crashes with UnicodeDecode error leaving me pronouncing bad Russian curses aloud. It is not even less forgiving than Java, but is also more treacherous, because of its run-time nature. It will surely help to preserve my zen if Python could just flow through the nodes of this graph. Garbage is okay - I can clean it up or remove if it stands in the way, just disrupt my flow or say me that now I want to deal with UnicodeDecode errors. Because I don't. If you can't adequately decode everything, either backslash-escape the rest, or use a replacement character; you can't print out those bytes. Yes. How to backslash the rest in Python 2? In Python 3 there is some freaky surrogateescape error strategy, but what to do in Python 2? Replacement character is not a solution, because it is a data loss, and if I want to do post processing of graph log, I won't be able to recover the missing bits. And no, I will not cc you. Subscribe to the list if you're going to ask a question. Added Mailman to my suxx tracker: https://github.com/techtonik/suxx-tracker#mailman -- anatoly t. -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)
On Fri, May 29, 2015 at 11:41 AM, Laura Creighton l...@openend.se wrote: In a message of Fri, 29 May 2015 11:05:07 +0300, anatoly techtonik writes: Added Mailman to my suxx tracker: https://github.com/techtonik/suxx-tracker#mailman You are damning the wrong piece of software -- this is not a problem with mailman; mailman doesn't care at all what software you use to read mail and reply to it with. The problem is with the various readers and repliers that people are using. In particular, people on the other side of one the usenet - python-list gateway may not be seeing this as mail at all, or sending their replies as mail. Sounds legit. But middle ux in suxx stands for user experience, and Mailman still doesn't improve it. If Mailman could subscribe me automatically to the thread I am starting, that would resolve all the problems. But back to your original problem. I still don't understand why you need to go from some lossless representation of your filename, back to the original. It is just happened that the only way to get graph out of SCons is to print its tree representation. That worked fine until we switched to from StringIO to its io.StringIO unicode equivalent. Dumping binary stuff in text form is a very common and reliable way to backup and process data. Starting from SQL dumps to SVN dumps - all these formats are convenient to store, transmit and process. You start with the binary version of the filename -- a series of bytes which turns out to be good Cyrillic text, but could be anything. Right, good Cyrillic text in utf-8, and Python 2.x uses 'ascii', so if Python 2.x used 'utf-8' as its default encoding, there won't be an issue. For now. But I realize that it is not enough, so I want 100% protection from unwanted crashes and data loss, so I want to backslash non-utf-8 bytes when converting the data to unicode. You store that as the first so many bytes of your file. If ever you need to have the original representation of your filename, you already have it, right there, by reading the first so many bytes of your file. Why care about what the user sees as a filename? Not sure that I understand. I don't store anything in file. Build graph is a representation of filesystem structure with entries that may or may not exist. Node in build graph can also be a string that is never written to disk. When I dump graph, I have no idea how I will process it, but when I will need to identify some Node, grep it, find a reference to it, I want its representation (which may as well serve as ID) to be preserved to avoid conflicts and wrong interpretation due to data loss Hopefully now that my user story is clear, can you tell me how can I do this bulletproof unicode conversion in Python 2? =) -- anatoly t. -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)
On Fri, May 29, 2015 at 2:39 PM, Laura Creighton l...@openend.se wrote: Do you know about the codecs module? reading http://pymotw.com/2/codecs/ may be useful if this is new to you. Does that work for Python 2 and Python 3? Have you read https://www.python.org/dev/peps/pep-0293/ ? No. Will backslashreplace do what you want? I don't know. I am sorry, but what is there the code that does this: binary - escaped utf-8 string - unicode - binary I know about coding module, but I am not seeing a solution to crash-proof output from Python. Is inserting a custom codec class into every piece of code that I want to debug is the only solution? -- anatoly t. -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Lossless bulletproof conversion to unicode (backslashing)
On Wed, May 27, 2015 at 2:35 PM, Laura Creighton l...@openend.se wrote: I am missing something. Why do you need unicode at all? Why can you not just keep your binary data as binary data? Good question. From the SCons code I see that we need unicode, because we switched to io.StringIO which is advertised as the future (and Python 3 way of doing things, because Python 3 doesn't have non-unicode StringIO). A really deep and exhaustive answer. advertisement (first link on StringIO vs io.StringIO): http://stackoverflow.com/questions/3410309/what-is-the-difference-between-stringio-and-io-stringio-in-python2-7 peaceful details https://bitbucket.org/scons/scons/commits/05d5af305a5d gory consequences https://bitbucket.org/scons/scons/pull-request/235/fix-tree-all-print-when-build-tree I feel like I must be missing something obvious here ... Not that obvious as it appears. -- anatoly t. -- https://mail.python.org/mailman/listinfo/python-list
Fwd: Lossless bulletproof conversion to unicode (backslashing)
Hi. This was labelled offtopic in python-ideas, so I edited and forwarded it here. Please CC as I am not subscribed. In short. I need is a bulletproof way to convert from anything to unicode. This requires some kind of escaping to go forward and back. Some helper function like u2b() (unicode to binary) and b2u() (that also removes escaping). So far I can't find any code that does just that. Background story. I need to print SCons graph. SCons is a build tool, so it has a graph of nodes - what depends on what. I have no idea what a node object could be. I know only that it can have human readable representation. Sometimes node is a filename in some encoding that is not utf-8, and without knowing the encoding, converting it to unicode is not possible without loosing the information about that filename. So, here is what Python proposes: https://docs.python.org/2.7/library/functions.html?highlight=unicode#unicode unicode() type constructor that doesn't allow you to do conversion without losing the data. It offers only two basic strategies - crash or corrupt: 1. ignore - meaning skip and corrupt the data 2. replace - just corrupt the data 3. strict - just crash Python design leaves the decision how to implement safe interoperability to you, and that's basically the reason why Python 3 fails. Without a safe approach (get my binary data back frum that unicode) people just can't wrap their heads around that. Python design assumes that people know the encoding of data they are processing, but that's not true in many cases. The data may also be just broken or invalid. So, the real world coding assumptions are: 1. external data encoding is unknown or varies 2. external data has binary chunks that are invalid for conversion to unicode In real world UnicodeDecode crashes is not an option for deal with unknown or broken and invalid input (such as when I need to print human representation of Node to the screen). In many (most?) situations lossless garbage is more welcome than crash or dataloss and that should be a default behaviour. The solution is to have filter preprocess the binary string to escape all non-unicode symbols so that the following lossless transformation becomes possible: binary - escaped utf-8 string - unicode - binary I want to know if that's real? I need to accomplish that with Python 2.x, but the use case is probably valid for Python 3 as well. This stuff is critical to port SCons to Python 3.x and I expect for other similar tools that have to deal with unknown ascii-binary strings too. -- anatoly t. -- https://mail.python.org/mailman/listinfo/python-list
Re: Fwd: Lossless bulletproof conversion to unicode (backslashing)
On Wed, May 27, 2015 at 2:47 PM, anatoly techtonik techto...@gmail.com wrote: On Wed, May 27, 2015 at 2:35 PM, Laura Creighton l...@openend.se wrote: I am missing something. Why do you need unicode at all? Why can you not just keep your binary data as binary data? Good question. From the SCons code I see that we need unicode, because we switched to io.StringIO which is advertised as the future (and Python 3 way of doing things, because Python 3 doesn't have non-unicode StringIO). A really deep and exhaustive answer. advertisement (first link on StringIO vs io.StringIO): http://stackoverflow.com/questions/3410309/what-is-the-difference-between-stringio-and-io-stringio-in-python2-7 peaceful details https://bitbucket.org/scons/scons/commits/05d5af305a5d gory consequences https://bitbucket.org/scons/scons/pull-request/235/fix-tree-all-print-when-build-tree I feel like I must be missing something obvious here ... Not that obvious as it appears. And the short answer is that we need unicode because we are printing this information to the stdout, and stdout is opened in text mode at least on Windows, and without explicit conversion, Python will try to decode stuff as being `ascii` and fail anyway. -- anatoly t. -- https://mail.python.org/mailman/listinfo/python-list
Re: [pydotorg-www] www.python.org - Backend is unhealthy
On Fri, May 8, 2015 at 11:32 AM, Noah Kantrowitz n...@coderanger.net wrote: On May 8, 2015, at 10:28 AM, Chris Angelico ros...@gmail.com wrote: On Fri, May 8, 2015 at 6:17 PM, jarau...@skynet.be wrote: I cannot access www.python.org. I always get Error 503 Backend is unhealthy Backend is unhealthy Guru Mediation: Details: cache-ams4149-AMS 1431072956 2041303800 Varnish cache server Is it only me? No, it's not only you. I get the same but with different details: Details: cache-syd1627-SYD 1431073575 864283876 It looks to me as if my result is coming from a cache node in Sydney; yours is coming from some other cache node, so it's not just one node that's down. Cc'ing in the www list in case someone there knows, and I'll create a github issue to ping the people there. Should be recovering now. I see those once in a while. Not sure if it is only for PyPI, wiki or both. What is the reason? -- anatoly t. -- https://mail.python.org/mailman/listinfo/python-list
[issue19822] PEP process entrypoint
New submission from anatoly techtonik: https://bitbucket.org/rirror/peps PEP repository readme lacks information about how to send Python Enhancement Proposal step-by-step. 1. hg clone https://bitbucket.org/rirror/peps 2. cd peps 3. # choose number 4. cp ??? pep-{{number}}.txt 5. # commit 6. # send pull request 7. # discuss -- assignee: docs@python components: Devguide, Documentation messages: 204652 nosy: docs@python, ezio.melotti, techtonik priority: normal severity: normal status: open title: PEP process entrypoint ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19822] PEP process entrypoint
anatoly techtonik added the comment: The entrypoint here means the point of entry for new Python Enhancement Proposals. Christian, what you propose is a 4th order link for someone who knows what PEPs are, and clones PEP repository to submit own proposal. What I propose it to make PEP repository self-sufficient, so that person who cloned it, can immediately get to work. You can argue that people who don't have time to read on all previous stuff, should not write PEPs, but I'd object that it is good to be inclusive. -- resolution: invalid - status: closed - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19822] PEP process entrypoint
anatoly techtonik added the comment: The process you are describing is not correct. In particular, the discussion happens before sending in a pull request. Post the link to correct process into README.rst and then this issue can be closed. As for python-dev, I thought it is too obvious and minor issue (still issue) to raise there, so it is just a matter of somebody with knowledge, time and commit privileges to commit the patch. It may worth to raise the question there anyway as I see that communicating usability concerns is a big problem. -- resolution: invalid - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19824] string.Template: Add PHP-style variable expansion example
New submission from anatoly techtonik: http://docs.python.org/2/library/string.html#template-strings This class could be more useful with the following example: from string import Template t = Template('$who likes $what') who = 'tim' what = 'kung pao' t.substitute(locals()) 'tim likes kung pao' This will help PHP folks to transition their .php files. -- assignee: docs@python components: Documentation messages: 204677 nosy: docs@python, techtonik priority: normal severity: normal status: open title: string.Template: Add PHP-style variable expansion example ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19824 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19822] PEP process entrypoint
anatoly techtonik added the comment: The ticket has been closed by two people. Why do you keep re-opening the ticket? Because you're not providing any arguments. If it is not important for you, just ignore. If something is not clear - ask. What you do is just closing the stuff, because you _feel_ that is not an issue. Provide rationale, address my points and then I'll close it myself. The particular stuff that is not clarified: Post the link to correct process into README.rst and then this issue can be closed. The repo readme is not the right place for this. Christian already mentioned the PEPs and anything should go into the dev guide. I want to know why PEPs repository README is not the place to direct users to starting point for submitting enhancement proposals? If you have something to contribute, please open a ticket, add a patch and request review. I am already keep opening it, damn. I want to contribute an improvement for the PEP process and not forget about it. That's why I fill in into tracker, and not into email. -- resolution: invalid - postponed status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19824] string.Template: Add PHP-style variable expansion example
anatoly techtonik added the comment: There is nothing to add to the class itself. It is about expanding docs section with helpful examples. `string.Template` is undervalued, because it is hard to see how it can be more useful than standard string formatting functions. But for people coming from PHP world, this can be a good start. The docs just need an entrypoint that shows how to use locally defined variables in template string. PHP does this for strings automatically. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19824 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19825] test b.p.o email interface
New submission from anatoly techtonik: -- anatoly t. -- messages: 204688 nosy: techtonik priority: normal severity: normal status: open title: test b.p.o email interface ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19825 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19825] test b.p.o email interface
anatoly techtonik added the comment: Closing by email using [status=closed;resolution=invalid] suffix in header. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19825 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19826] Document that bug reporting by email is possible
New submission from anatoly techtonik: I found this to be convenient: http://techtonik.rainforce.org/2013/11/roundup-tracker-create-issues-by-email.html And this is missing from here: http://docs.python.org/release/2.7/bugs.html#using-the-python-issue-tracker Anf from here: http://docs.python.org/devguide/triaging.html Disclaimer: I didn't sign the CLA, and people keep telling me that I need it to do documentation edits. But I edit Wikipedia freely and I find it wrong that I can not edit Python documentation without signing papers. So I am not sending patches until either Wikipedia requires CLA to edit its contents, or PSF abandons its ill FUD policies in favor of creating collaborative environment. Regarding my aforementioned blog post, feel free to copy-paste it, as an author I release this into CC0/public domain. Ask python-legal-sig if it is enough. -- assignee: docs@python components: Documentation messages: 204693 nosy: docs@python, techtonik priority: normal severity: normal status: open title: Document that bug reporting by email is possible ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19826 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19824] string.Template: Add PHP-style variable expansion example
anatoly techtonik added the comment: @Alex, have you seen http://pythonhosted.org/flufl.i18n/docs/using.html#substitutions-and-placeholders? I really like the brevity, and it is the function that does the magic, so it is fully transparent and you don't need to instantiate string.Template every time. I think its awesome. Do you have some explanations why passing locals() to string.Template is anti-pattern? I understand that passing all that you have is not good, but from my past experience with PHP I can't remember any problems that there are more names than I used. It is templating after all - what do you want to protect from? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19824 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19812] reload() by symbol name
New submission from anatoly techtonik: It would be nice if reload() supported reloading of symbols imported with from module import ... syntax. It is quite useful for development sessions, when you patch and test your function on some set of unexpected input. from astdump import dumpattrs as dat import imp imp.reload(dat) TypeError: reload() argument must be module imp.reload(dumpattrs) NameError: name 'dumpattrs' is not defined imp.reload(astdump) NameError: name 'astdump' is not defined -- components: Interpreter Core, Library (Lib) messages: 204573 nosy: techtonik priority: normal severity: normal status: open title: reload() by symbol name type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19812 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19557] ast - docs for every node type are missing
anatoly techtonik added the comment: https://greentreesnakes.readthedocs.org/en/latest/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19557 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19557] ast - docs for every node type are missing
anatoly techtonik added the comment: SO link serves a proof that a problem is actual. It is needed, because, for example Brett doesn't think it is important. 2nd link is the same proof, and also an example of documentation wanted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19557 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19557] ast - docs for every node type are missing
anatoly techtonik added the comment: In fact it may be the documentation that could be merged. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19557 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19655] Replace the ASDL parser carried with CPython
anatoly techtonik added the comment: +1 for initiative, points that are nice to be addressed are below. 1. Python 3.4 with modern idioms - too Python-specific code raises the barrier. I'd prefer simplicity and portability over modernism. Like how hard is it to port the parser into JS with PythonJS, for example? 2. ASDL specification is mostly offline. One PDF survived, but IR browser and source for did not, which is a pity, because visual tools are one of the most attractive. In any case, it may worth to contact university - they might have backups and resurrect browser in Python (GCI, GSoC). 3. File organization. This is bad: Grammar/Grammar Parser/ Python/ This is good: Core/README.md Core/Grammar Core/Parser/ Core/Processor/ (builds AST) Core/Interpreter/ Core/Tests/ I wonder what is PyPy layout? It may worth to steal it for consistency. 4. Specific problem with ASDL parsing - currently, by ASDL syntax all `expr` are allowed on the left side of assign node. This is not true for real app. It makes sense to clarify in README.md these borders (who checks what) and modify ASDL to reflect the restriction. -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19655 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19557] ast - docs for every node type are missing
anatoly techtonik added the comment: http://stackoverflow.com/questions/8370132/what-syntax-is-represented-by-an-extslice-node-in-pythons-ast -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19557 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19557] ast - docs for every node type are missing
anatoly techtonik added the comment: Neither you nor docs answer the question when Assign node gets Tuple as argument, when List and when Subscript. While it is obvious to you, I personally don't know what a Subscript is. This is the kind of stuff that I'd like to see documented. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19557 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19541] ast.dump(indent=True) prettyprinting
anatoly techtonik added the comment: Implemented more advanced interface with filtering and tests - here - https://bitbucket.org/techtonik/astdump/ Right now the output is not so detailed, but it may change if the need arises. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19541 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19608] devguide needs pictures
New submission from anatoly techtonik: http://docs.python.org/devguide/ it covers pretty much complicated stuff, which takes a lot of time to grasp. Pictures help to save hours if not weeks. There needs to be some immediate intro picture at the top of front page illustrating transformation of Python code through the toolchain to machine execution instructions. -- components: Devguide messages: 202933 nosy: ezio.melotti, techtonik priority: normal severity: normal status: open title: devguide needs pictures ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19608 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19608] devguide needs pictures
anatoly techtonik added the comment: Thanks for the proposal, but you know perfectly that I am not a designer. I don't believe that there are no talented people who find this ticket interesting. You just need to add tag:easy to is (or allow others to do), so it became visible to these people via OpenHatch or through PSF outreach initiatives. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19608 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19540] PEP339: Fix link to Zephyr ASDL paper
anatoly techtonik added the comment: It conflicts. =( https://bitbucket.org/rirror/peps/pull-request/1/pep-0339txt-fix-link-to-zephyr-asdl-paper/diff -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19540 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19557] ast - docs for every node type are missing
New submission from anatoly techtonik: http://docs.python.org/2/library/ast.html AST module doc is incomplete. To write node visitor, you need to know possible types of parameters and expected values for every node type. They are different. http://hg.python.org/cpython/file/1ee45eb6aab9/Parser/Python.asdl For example, visit_Assign expects: Assign(targets, value) `targets` can be List, Tuple or Name When there is List, and when there is Tuple? It should be documented. -- assignee: docs@python components: Devguide, Documentation messages: 202675 nosy: docs@python, ezio.melotti, techtonik priority: normal severity: normal status: open title: ast - docs for every node type are missing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19557 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12226] use HTTPS by default for uploading packages to pypi
anatoly techtonik added the comment: How come that this CVE is still present in just released 2.7.6? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12226 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13276] bdist_wininst-created installer does not run the postinstallation script when uninstalling
anatoly techtonik added the comment: Here is workaround, which is - patching distutils - https://code.google.com/p/spyderlib/wiki/PatchingDistutils -- versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13276 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19549] PKG-INFO is created with CRLF on Windows
New submission from anatoly techtonik: When packaging on Windows, sdist creates PKG-INFO, which is different in linefeeds. It will be better if this is consistent between platforms. -- assignee: eric.araujo components: Distutils, Distutils2 messages: 202602 nosy: alexis, eric.araujo, tarek, techtonik priority: normal severity: normal status: open title: PKG-INFO is created with CRLF on Windows versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19549 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19540] PEP339: Fix link to Zephyr ASDL paper
Changes by anatoly techtonik techto...@gmail.com: -- assignee: docs@python components: Documentation hgrepos: 213 nosy: docs@python, techtonik priority: normal severity: normal status: open title: PEP339: Fix link to Zephyr ASDL paper ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19540 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19541] ast.dump(indent=True) prettyprinting
New submission from anatoly techtonik: ast.dump needs an indent argument for pretty printing. from pprint import pprint as pp pp(ast.dump(node)) Assign(targets=[Tuple(elts=[Name(id='d', ctx=Store()), Name(id='m', ctx=Store())], ctx=Store())], value=Call(func=Name(id='divmod', ctx=Load()), args=[Call(func=Name(id='len', ctx=Load()), args=[Name(id='seq', ctx=Load())], keywords=[], starargs=None, kwargs=None), Name(id='size', ctx=Load())], keywords=[], starargs=None, kwargs=None)) -- assignee: docs@python components: Documentation messages: 202506 nosy: docs@python, techtonik priority: normal severity: normal status: open title: ast.dump(indent=True) prettyprinting ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19541 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19377] Backport SVG mime type to Python 2
anatoly techtonik added the comment: I think we are talking about double standards. Why the .xz and .txz are worthy including in 2.7.5 and .svg is not? See issue #16316. http://bugs.python.org/issue15207 will break a lot of this stuff anyway, so I hope it will fix the issue. -- resolution: wont fix - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19377 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19454] devguide: Document what a platform support is
New submission from anatoly techtonik: As a followup to issue19377 it would be nice if devguide contained a paragraph to resolve the conflicting point provided by http://bugs.python.org/msg187373 and http://bugs.python.org/msg201141 arguments. -- assignee: docs@python components: Devguide, Documentation messages: 201762 nosy: docs@python, ezio.melotti, techtonik priority: normal severity: normal status: open title: devguide: Document what a platform support is ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19454 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19377] Backport SVG mime type to Python 2
anatoly techtonik added the comment: Added issue19454 to settle this down. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19377 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19377] Backport SVG mime type to Python 2
New submission from anatoly techtonik: A request to backport issue10730 commit to Python 2.x Why? Google Client API uses mimetype module to detect file types when uploading to Google Drive, and because SVG is missing, it can not be edited after uploading. -- components: Library (Lib) messages: 201130 nosy: techtonik priority: normal severity: normal status: open title: Backport SVG mime type to Python 2 versions: Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19377 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19377] Backport SVG mime type to Python 2
anatoly techtonik added the comment: I am not sure that policy defines anything related to datasets bundled with Python. Even when try to adopt policy reading to this case, it doesn't look like a feature, but a bug fix. SVG is a registered MIME type http://www.w3.org/TR/SVG/mimereg.html, SVG is the most popular (the only one?) open source format for vector graphics, which should be present in Python database, but it isn't. I don't know what do you mean by work around. Users don't know that the source of the bug is missing information from mimetypes package. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19377 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19110] PEP-0 history link is broken
anatoly techtonik added the comment: Cool. Even if it is automatically generated, it may worth to commit this file anyway to get browsable HG history about PEP additions/removals. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19110 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19066] os.execv fails with spaced names on Windows
anatoly techtonik added the comment: I tested with 2.7 and 3.3, but this is true for any version. If the bug is actual for Python 2.6, 3.1 and 3.2 why should I uncheck them? Versions field description doesn't say that I should mark only latest change. In addition, people (unlikely, but still) may search for specific versions to see which bugs were reported against them and fixed in later releases. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19066 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19121] Documentation guidelines enhancements
New submission from anatoly techtonik: I'll raise some points and then suggest how to fix that. issue19060 it appeared that list of functions that subprocess replaces imbues readers with uncertainty, because this list is not complete. Current http://docs.python.org/devguide/documenting.html guide doesn't pay attention that information should be complete and unambiguous. issue19060 is a good example of completeness requirement - user should not be left guessing what other functions can be or can not be replaced by subprocess. Unambiguous means that there should also be answer why they can or can not be replaced. For subprocess this info is partially provided in replacing older functions chapter. There also should not be a place for subjective judgement, fear and desperation. If something can not be done with subprocess, users should not be discouraged (left in fear) to use older functions. If there are valid points where subprocess is not good, they should be described in advanced section. If the description is too long to read, it should be linked. Somebody may raise the point that subprocess docs is not the best place for such list. But between choice to be complete and structured, the former should take precedence. When documentation is complete enough, it's text can be restructured. This further raises a point about structure of docs. Both main docs and guidelines itself. Main docs structure. The more unambiguous, complete and concise documentation is, the better it is for understanding. Currently our docs really miss overviews and summaries. Some may argue that there is no place for that in official docs, especially if such summaries will contain info about history and changes between Python versions. But I'd say that if there is no place, we need to find it for them. Just two examples. MSDN and Python Cookbook both are examples of perfect documentation and these both include overview chapters before function reference. When where is a critical mass of info related to child process execution and management, it is worth to make an overview. Guidelines structure. ToC. Sphinx ToCs are too narrow - they are hard to read. If ToC is present in side panel for navigation, it is not the reason not to include it below the page header for human readers to see the structure of the doc. I find it extremely hard (unnatural) to scan the side panel for the doc structure. This should be split between markup and content guidelines. Right now the structure of docs is: 7. Documenting Python 7.1. Introduction 7.2. Style guide 7.2.1. Use of whitespace 7.2.2. Footnotes 7.2.3. Capitalization 7.2.4. Affirmative Tone 7.2.5. Economy of Expression 7.2.6. Code Examples 7.2.7. Code Equivalents 7.2.8. Audience 7.3. reStructuredText Primer 7.3.1. Paragraphs 7.3.2. Inline markup 7.3.3. Lists and Quotes 7.3.4. Source Code 7.3.5. Hyperlinks 7.3.5.1. External links 7.3.5.2. Internal links 7.3.6. Sections 7.3.7. Explicit Markup 7.3.8. Directives 7.3.9. Footnotes 7.3.10. Comments 7.3.11. Source encoding 7.3.12. Gotchas 7.4. Additional Markup Constructs 7.4.1. Meta-information markup 7.4.2. Module-specific markup 7.4.3. Information units 7.4.4. Showing code examples 7.4.5. Inline markup 7.4.6. Cross-linking markup 7.4.7. Paragraph-level markup 7.4.8. Table-of-contents markup 7.4.9. Index-generating markup 7.4.10. Grammar production displays 7.4.11. Substitutions 7.5. Differences to the LaTeX markup 7.5.1. Inline markup 7.5.2. Information units 7.5.3. Structure 7.6. Building the documentation 7.6.1. Using make 7.6.2. Without make As you may see the 90% of the ToC is markup reference. Some topics like Hyperlinks are oversplit. Making two chapter for just one sentence is an obsession with structure. That's ok for coding, but for readability I would just make it into a list in one chapter, renamed to Linking and merged cross-linking markup section into it. 7.2.3. Capitalization 7.2.4. Affirmative Tone 7.2.5. Economy of Expression 7.2.6. Code Examples As you may see, the Content writing is perfectly mixed with Content formatting into the mix of rules for proper whitespace formatting. This perfectly characterizes us coders, who often mix the concept of good code which is bug-free with concept of good code which is PEP-8 compliant. I mean that it leaves expression that most of the document is about rules, regulations and nitpicking about how you should format the text, not how you should write. Let's make this unambiguous - Content of documentation is essential info that readers need to know. Format of docs is the markup, whitespace, examples, footnotes and other stuff. Content guidelines say that you should insert footnotes, Format guidelines show how to do this. Content guidelines should not distract from the content aspects. So, the Style Guide should be split into Content Writing and Formatting Guidelines [ ]. Or moves into separate file at all. The Content Writing chapter. Should
[issue19060] docs: note that subprocess doesn't replace os.exec*
anatoly techtonik added the comment: I would like to know if the list is complete too. It would be extremely awesome if it was complete. This raises a side issue that there seems no guideline to write unambiguous and complete documentation. I spammed the tracker with this stuff in issue19121. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19060 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19060] docs: note that subprocess doesn't replace os.exec*
anatoly techtonik added the comment: On Sat, Sep 28, 2013 at 10:30 PM, Terry J. Reedy rep...@bugs.python.org wrote: If a sentence were added, I would simplify it to It does not replace os.exec*. or perhaps os.fork and os.exec*.. I prefer list. It is easier to scan: http://www.nngroup.com/articles/how-users-read-on-the-web/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19060 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19066] os.execv fails with spaced names on Windows
anatoly techtonik added the comment: It should be documented somehow then. At least in the field tooltip. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19066 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19124] os.execv executes in background on Windows
New submission from anatoly techtonik: os.execv() starts process in background on Windows. Because it inherits stdin/stdout handlers from the process that launched Python interpreter, this becomes a source of numerous weird bugs, from polluting the stdout stream of parent to completely blocking its input. Example session on Windows. Open cmd.exe and run attached testexecvchild.py. It starts child process with execv(). Child pauses for 2 seconds during which I type 'echo Hello' and hit Enter. With Python 3 is pollutes parent output after 3 seconds: python testexecvchild.py echo Hello Hello Traceback (most recent call last): File testexecvchild.py, line 7, in module raw_input('xxx') NameError: name 'raw_input' is not defined With Python 2 the stdin of cmd.exe is blocked: py testexecvchild.py echo Hello Hello xxxecho Hello Hello echo Hello testexecvchild.py passed echo Hello Hello The same behavior on Linux: $ python testexecvchild.py echo Hello xxx testexecvchild.py passed -- components: Library (Lib) messages: 198578 nosy: techtonik priority: normal severity: normal status: open title: os.execv executes in background on Windows type: behavior versions: Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19124 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19124] os.execv executes in background on Windows
anatoly techtonik added the comment: s/same behavior/same command/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19124 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19124] os.execv executes in background on Windows
Changes by anatoly techtonik techto...@gmail.com: Added file: http://bugs.python.org/file31905/testexecvchild.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19124 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19066] os.execv fails with spaced names on Windows
anatoly techtonik added the comment: On Sun, Sep 29, 2013 at 2:05 PM, Richard Oudkerk rep...@bugs.python.org wrote: See http://bugs.python.org/issue436259 I am not sure that I should see there. There is discussion of DOS, which is not supported, also some complain about Windows execv function, which deprecated since VC++ 2005 (which I hope also not supported). Can you be more specific? This is a problem with Window's implementation of spawn*() and exec*(). Note that on Windows exec*() is useless: it just starts a subprocess and exits the current process. You can use subprocess to get the same effect. Are you describing Windows implementation of _exec() http://msdn.microsoft.com/en-us/library/431x4c1w.aspx or current Python implementation? Just use subprocess instead which gets this stuff right. subprocess doesn't replace os.exec*, see issue19060 -- title: os.execv fails with spaced names on Windows - os.execv fails with spaced names on Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19066 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19066] os.execv fails with spaced names on Windows
anatoly techtonik added the comment: On Sun, Sep 29, 2013 at 3:03 PM, Richard Oudkerk rep...@bugs.python.org wrote: _spawn*() and _exec*() are implemented by the C runtime library. spawn*() and execv() are (deprecated) aliases. It is said that execv() is deprecated, but it is not said that it is alias of _execv(). It is only said that _execv() is C++ compliant. http://msdn.microsoft.com/en-us/library/ms235416(v=vs.90).aspx The the first message is about someone's attempt to work around the problems with embedded spaces and double quotes by writing a function to escape each argument. He says he had a partial success. Don't we have such function already? I don't see the problem in quoting the string. Surely this is basic reading comprehension? I am mentally crippled. Sorry about that. Note that on Windows exec*() is useless: it just starts a subprocess and exits the current process. You can use subprocess to get the same effect. Are you describing Windows implementation of _exec() http://msdn.microsoft.com/en-us/library/431x4c1w.aspx or current Python implementation? The Windows implementaion of _exec(). Does it start child process in foreground or in background? Did you compile examples on http://msdn.microsoft.com/en-us/library/431x4c1w.aspx page with new VC++ to check? I don't possess the VC++ 10, so I can't do this myself. And I believe that compiling with GCC may lead to different results. Just use subprocess instead which gets this stuff right. subprocess doesn't replace os.exec*, see issue19060 On Unix subprocess does not replace os.exec*(). That is because on Unix exec*() replaces the current process with a new process with the *same pid*. subprocess cannot do this. But on Windows os.exec*() just starts an independent process with a *different pid* and exits the current process. The line os.execv(path, args) is equivalent to os.spawnv(os.P_NOWAIT, path, args) os._exit(0) I don't mind if it runs child process with different pid, but why it runs new process in background. Unix version doesn't do this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19066 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19124] os.execv executes in background on Windows
anatoly techtonik added the comment: On Sun, Sep 29, 2013 at 6:39 PM, Richard Oudkerk rep...@bugs.python.org wrote: Richard Oudkerk added the comment: As I wrote in http://bugs.python.org/issue19066, on Windows execv() is equivalent to os.spawnv(os.P_NOWAIT, ...) os._exit(0) Where did you get that info? MSDN is silent about that. http://msdn.microsoft.com/en-us/library/886kc0as(v=vs.90).aspx This means that control is returned to cmd when the child process *starts* (and afterwards you have cmd and the child connected to the same console). On Unix control is returned to the shell only once the child process *ends*. That was my conclusion also. Although it might be less memory efficient, you would actually get something closer to Unix behaviour by replacing os.execv(...) with sts = os.spawnv(os.P_WAIT, ...) _exit(sts) or sts = subprocess.call(...) _exit(sts) This is why I said that execv() is useless on Windows and that you should just use subprocess instead. The problem is not in what I should or should not use. The problem that existing scripts that work on Unix and use os.execv() to launch interactive scripts, on Windows behave absolutely weird and unusable behavior. I previously experienced this with SCons, but couldn't get the reason. Now I experience this with basic Android development tools and dug down to this. It is clearly a big mess from this side of Windows. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19124 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19066] os.execv fails with spaced names on Windows
anatoly techtonik added the comment: Hey. This ticket is about os.execv failing on spaced paths on Windows. It is not a duplicate of issue19124. -- resolution: duplicate - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19066 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19066] os.execv fails with spaced names on Windows
anatoly techtonik added the comment: On Sun, Sep 29, 2013 at 8:48 PM, Richard Oudkerk rep...@bugs.python.org wrote: Don't we have such function already? I don't see the problem in quoting the string. No one seems to know how to write such a quoting function. Why escape quotes with slash and surrounding in quotes doesn't help? http://msdn.microsoft.com/en-us/library/ms235416(v=vs.90).aspx How does Linux and subprocess on Windows survive then? If I am not mistaken both subprocess and execv on Windows use CreateProcess. Does subprocess fail as well? Does it start child process in foreground or in background? Did you compile examples on http://msdn.microsoft.com/en-us/library/431x4c1w.aspx page with new VC++ to check? I don't possess the VC++ 10, so I can't do this myself. And I believe that compiling with GCC may lead to different results. There is no such thing as a background task in Windows. A process is either attached to a console, or it isn't. When you use execv() to start a process, it inherits the parent's console. All right. Then why does it start to interfere with running cmd.exe (in issue19124)? If it inherits console, it should continue to own it exclusively, and not return it back to parent cmd.exe On Unix try replacing os.execv(...) by os.spawnv(os.P_NOWAIT, ...) os._exit(0) and you will probably get the same behaviour where the shell and the child process both behave as conflicting foreground tasks. Maybe Python code doesn't use _execv() at all on Windows and uses these spawnv's? .. I don't mind if it runs child process with different pid, but why it runs new process in background. Unix version doesn't do this. The point is that the shell waits for its child process to finish by using waitpid() (or something similar) on the child's pid. If the child uses execv() then the child is replaced by a grandchild process with the same pid. From the point of view of the shell, the child and the grandchild are the same process, and waitpid() will not stop until the grandchild terminates. I can not accept your point when you don't know for sure how cmd.exe waits for child process to exit. Are you sure that it doesn't use some blocking CreateProcess call? Are you sure that Python on Windows calls exactly _execv and not some spawn surrogate? This issue should be closed: just use subprocess instead. We need some quorum on this. I'd like to hear two more people that can confirm and agree with your position. I don't want to think that usability of execv() on Windows can not be improved, because people who love Linux doesn't think that this OS deserves some care. I'd like to run Python scripts with the same base behaviour regardless of platform. If that's impossible, that should be documented. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19066 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19124] os.execv executes in background on Windows
anatoly techtonik added the comment: On Sun, Sep 29, 2013 at 8:53 PM, Richard Oudkerk rep...@bugs.python.org wrote: Richard Oudkerk added the comment: Where did you get that info? MSDN is silent about that. http://msdn.microsoft.com/en-us/library/886kc0as(v=vs.90).aspx Reading the source code for the C runtime included with Visual Studio. Visual Studio 10+ ? Is it available somewhere for a reference? The problem is not in what I should or should not use. The problem that existing scripts that work on Unix and use os.execv() to launch interactive scripts, on Windows behave absolutely weird and unusable behavior. I previously experienced this with SCons, but couldn't get the reason. Now I experience this with basic Android development tools and dug down to this. It is clearly a big mess from this side of Windows. As said before (more than once), os.exec*() is useless on Windows: just use subprocess. I value your expert opinion, but to increase the bus factor, I can not leave it without asking for reasons. Have you tried to run examples provided by MSDN - do they exhibit the same behavior as Python script I attached earlier and described in the first message? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19124 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19124] os.execv executes in background on Windows
anatoly techtonik added the comment: I can't use subprocess. These are official business suite scripts for Android development from Google. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19124 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19124] os.execv executes in background on Windows
Changes by anatoly techtonik techto...@gmail.com: -- resolution: rejected - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19124 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19110] PEP-0 history link is broken
New submission from anatoly techtonik: See http://www.python.org/dev/peps/, click Last-Modified. -- assignee: docs@python components: Documentation messages: 198509 nosy: docs@python, techtonik priority: normal severity: normal status: open title: PEP-0 history link is broken ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19110 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19089] Windows: Broken Ctrl-D shortcut on Python 3
New submission from anatoly techtonik: Ctrl-D shortcut works to terminate session in Python 2 on Windows, and doesn't work with Python 3. -- components: Windows messages: 198393 nosy: techtonik priority: normal severity: normal status: open title: Windows: Broken Ctrl-D shortcut on Python 3 versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19089 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19089] Windows: Broken Ctrl-D shortcut on Python 3
anatoly techtonik added the comment: Well, it appears that installed IPython brought pyreadline, but I execute it in standard Python shell. I'd vote for this feature by default. Is that possible without readline? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19089 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19089] Windows: Broken Ctrl-D shortcut on Python 3
anatoly techtonik added the comment: Here is the output of py -v. -- Added file: http://bugs.python.org/file31868/py_-v.stderr.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19089 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19089] Windows: Broken Ctrl-D shortcut on Python 3
anatoly techtonik added the comment: It would be nice if Python supported some cross-platform standard for user interfaces. It is rather annoying to use Ctrl-Z for Python in local window and Ctrl-D for Python in remote console session (which is *nix of course). It becomes even more annoying, because Ctrl-Z in *nix session sends Python process to background. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19089 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19089] Windows: Make Ctrl-D exit key combination cross-platform
Changes by anatoly techtonik techto...@gmail.com: -- title: Windows: Broken Ctrl-D shortcut on Python 3 - Windows: Make Ctrl-D exit key combination cross-platform versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19089 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19061] Shelve documentation security warning is not visible
anatoly techtonik added the comment: The scope of warning is wrong. It is not a warning for open() call, and that's why it is easy to miss. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19061 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19061] Shelve documentation security warning is not visible
anatoly techtonik added the comment: On Sun, Sep 22, 2013 at 12:42 PM, Georg Brandl rep...@bugs.python.orgwrote: Oh, please. It's big and red and directly below the open() description, how could you miss it? I believe that it is pretty easy with mobile browser due to screen constraints. Can you test this on your mobile devices? As for your argument about my border not being everyone's border, I believe that my border accounts for 18%+ of browser market share. http://gs.statcounter.com/#mobile_vs_desktop-ww-monthly-201308-201308-bar I would be even more interested to see docs.python.org stats, which may be more, because reading docs from tablet is more convenient, or less, because there tables are not good development platforms for Python. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19061 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19024] Document asterisk (*), splat or star operator
anatoly techtonik added the comment: 223 people + me out of 1422 disagree with you both. http://stackoverflow.com/questions/101268/hidden-features-of-python -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19024 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19024] Document asterisk (*), splat or star operator
anatoly techtonik added the comment: To narrow the point of conflict, I say that argument unpacking *operators* should have a prominent place in Python documentation that people can link to. Current page http://docs.python.org/3/tutorial/controlflow.html#unpacking-argument-lists is about functionality, not about operators, and therefore usage of these while studying Python code can not be tracked back to documentation. Which is why it is hidden. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19024 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19061] Shelve documentation security warning is not visible
anatoly techtonik added the comment: On Sun, Sep 22, 2013 at 2:11 PM, Georg Brandl rep...@bugs.python.orgwrote: Georg Brandl added the comment: I believe that it is pretty easy with mobile browser due to screen constraints. Can you test this on your mobile devices? Sorry, but we don't adapt the docs *content* to any specific device. You should never only read just a screenful in any case. This is technical documentation, not a news article! I am sorry, but you're misplacing arguments. It looks like this: me[1] open() function description is a wrong place for warning that is related to a whole module you[2] common, it is visible, that's the point anyway me[3] it is not visible on mobile you[4] we do not support mobile [3] makes your point [2] invalid. And your point [4] doesn't apply as an answer to [1]. Now my arguments are: 1. Warning is located in the wrong place (bug is trivial, not important) 2. Wrong place causes problems with mobiles (trivial, somewhat matters) And you argument that users (or is it for me personally?) should never read only screenful for a module description is rather strange for the most of us. Why are things always in the last place you look for them? Because you stop looking when you find them. I highly recommend you to read this book - http://www.sensible.com/chapter.html - it's awesome. And just for amusement - http://uxmyths.com/post/647473628/myth-people-read-on-the-web If you believe that you can improve the docs *design* (the CSS, mainly) to work better on mobile devices, be my guest! There are certainly optimization opportunities, but that never relieves you of making sure you read the whole content that's relevant to you. There is nothing wrong with CSS or mobile design. There is an issue with the placement of this specific piece of information, which comes detached from the place (module description) where it belongs. Although the effect of this bug is partially with background workaround, the cause is still there. To make it more real scenario for you. In corporate environment somebody who issues a recommendation, is not necessarily the person who implements it. If you're implementing everything yourself, of course you won't miss the details. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19061 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19061] Shelve documentation security warning is not visible
anatoly techtonik added the comment: On Sun, Sep 22, 2013 at 2:57 PM, Georg Brandl rep...@bugs.python.orgwrote: Georg Brandl added the comment: me[1] open() function description is a wrong place for warning that is related to a whole module you[2] common, it is visible, that's the point anyway me[3] it is not visible on mobile you[4] we do not support mobile Your complaint was that it is located under screen border. My reply is that what the screen border is is highly device specific and that we don't cater to specific devices, therefore rejecting your complaint. I never said we don't support mobile. That's it for me and this issue. Well, at least now you know how I read the replies. Glad we settled this down. Now it would be nice if somebody with CLA for docs could just move this block upper. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19061 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18553] os.isatty() is not Unix only
anatoly techtonik added the comment: I having a snippet to fix that, should I open a new issue for patch? Please open a new issue. Reference is welcome. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18553 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19074] Add PySide to GUI FAQ
New submission from anatoly techtonik: http://docs.python.org/2/faq/gui.html - this page misses info about PySide. -- assignee: docs@python components: Documentation messages: 198279 nosy: docs@python, techtonik priority: normal severity: normal status: open title: Add PySide to GUI FAQ versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19074 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15329] clarify which deque methods are thread-safe
anatoly techtonik added the comment: So, is deque a faster replacement for Queue.Queue or not? -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15329 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19074] Add PySide to GUI FAQ
anatoly techtonik added the comment: If only wiki had a theme like Sphinx docs.. But I agree that static FAQ look dead compared to wiki or stackoverflow. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19074 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19060] docs: note that subprocess doesn't replace os.exec*
New submission from anatoly techtonik: I always thought that subprocess is replacing all other methods of executing external programs from Python and it is a preferred way. Perhaps I was not attentive that people isolate: os.system os.spawn* os.popen* and os.exec* While subprocess replaces three first, it doesn't do this with the last one. The documentation should mention this in the header block. Proposed edit: ... replace several other, older modules and functions, such as: os.system os.spawn* os.popen* popen2.* commands.* + Note that it doesn't replace other ways of executing external + processes from Python, such as: + +os.exec* Information about how the subprocess module can be used ... -- assignee: docs@python components: Documentation messages: 198188 nosy: docs@python, techtonik priority: normal severity: normal status: open title: docs: note that subprocess doesn't replace os.exec* versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19060 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19060] docs: note that subprocess doesn't replace os.exec*
anatoly techtonik added the comment: tag:easy (meaning, please mark it as easy for OpenHatch robots) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19060 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19061] Shelve documentation security warning is not visible
New submission from anatoly techtonik: This is a follow up to issue #8855. Currently the security warning is completely invisible from Python 2 docs http://docs.python.org/2/library/shelve.html and is located under screen border on Python 3 docs. The proposal is to move warning out of the description of open() function to paragraph following module description, the same way is it is done for pickle http://docs.python.org/3.3/library/pickle.html -- assignee: docs@python components: Documentation messages: 198194 nosy: docs@python, techtonik priority: normal severity: normal status: open title: Shelve documentation security warning is not visible versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19061 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19061] Shelve documentation security warning is not visible
anatoly techtonik added the comment: tag:easy -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19061 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19066] os.execv fails with spaced names on Windows
New submission from anatoly techtonik: If file to be executed with os.execv on Windows is located in directory with spaces, Python fails. This doesn't fail on Linux. To test, run: testexecv.py spaced testexecv.py is attached. -- components: Library (Lib), Windows files: testexecv.py messages: 198242 nosy: techtonik priority: normal severity: normal status: open title: os.execv fails with spaced names on Windows versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file31837/testexecv.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19066 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19024] Document asterisk (*), splat or star operator
New submission from anatoly techtonik: I'd say this is a critical documentation bug that leads to head bang when you try to figure out what does '*' in code means. This bug is two fold: 1. Define a dedicated place in documentation for '*' operator with examples. I propose http://docs.python.org/3/library/stdtypes.html chapter with a name like Special Operations or Function Argument Operations or Function Argument Operators 2. Make '*', 'asterisk', 'splat', 'star' operator searchable http://docs.python.org/3/search.html?q=* http://docs.python.org/3/search.html?q=asterisk http://docs.python.org/3/search.html?q=splat http://docs.python.org/3/search.html?q=star+operator Good? References: http://stackoverflow.com/questions/2322355/proper-name-for-python-operator http://stackoverflow.com/questions/5239856/foggy-on-asterisk-in-python http://stackoverflow.com/questions/2921847/python-once-and-for-all-what-does-the-star-operator-mean-in-python http://stackoverflow.com/questions/287085/what-do-args-and-kwargs-mean http://stackoverflow.com/search?q=[python]+%2Bkwargs+is%3Aquestion -- assignee: docs@python components: Documentation messages: 197772 nosy: docs@python, techtonik priority: normal severity: normal status: open title: Document asterisk (*), splat or star operator type: crash versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19024 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19024] Document asterisk (*), splat or star operator
anatoly techtonik added the comment: tag:easy -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19024 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19026] OrderedDict should not accept dict as parameter
New submission from anatoly techtonik: http://stackoverflow.com/questions/15733558/python-ordereddict-not-keeping-element-order I wonder why OrderedDict accepts dict as parameter in a first place? OD is used when order is important and if plain dict is supplied, the order is lost. d = {3:4, 1:2} OD(d) OrderedDict([(1, 2), (3, 4)]) OrderedDict should not accept dict as parameter. -- components: Library (Lib) messages: 197787 nosy: techtonik priority: normal severity: normal status: open title: OrderedDict should not accept dict as parameter versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19026 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19026] OrderedDict should not accept dict as parameter
anatoly techtonik added the comment: I don't know if it is bug or feature. There are probably cases when order is not important and OrderedDict is used, but I don't remember any. Too bad Python doesn't have first class ordered mapping type, so that it could report error if unordered arguments are supplied (such as dict or **kwargs). tag:wart -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19026 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19026] OrderedDict should not accept dict as parameter
anatoly techtonik added the comment: Is it possible to make strict OrderedDict an optional feature? Like `from features import strict_ordered_dict'? -- status: closed - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19026 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19026] OrderedDict should not accept dict as parameter
anatoly techtonik added the comment: On Sun, Sep 15, 2013 at 9:25 PM, Raymond Hettinger rep...@bugs.python.org wrote: In general, it is not possible for a hypothetical StrictOrderedDict to know whether its input was ordered or not. Right. That's why it should not accept input that can only be unordered (including dict and **kwargs) - this is what I mean by strict mode. Remember, Armin's core concept for OrderedDict was to remember the order that keys were added, the order is determined by whoever does the adding. IMHO the statement the order is determined by whoever does the adding is false in 9/10 cases of passed dict. In 9/10 cases whoever supplies dict or **kwargs argument is unaware of what mistake he is making, and how many hour she will spend discovering the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19026 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18553] os.isatty() is not Unix only
anatoly techtonik added the comment: None that I know of. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18553 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18553] os.isatty() is not Unix only
New submission from anatoly techtonik: It seems like os.isatty(0) works on Windows too. Documentation says Unix only: http://docs.python.org/2/library/os.html#os.isatty http://docs.python.org/3.4/library/os.html#os.isatty C:\py -c import os; print os.isatty(0) True C:\echo x | py -c import os; print os.isatty(0) False C:\py -c import os; print os.isatty(0) | more True -- components: Library (Lib) messages: 193694 nosy: techtonik priority: normal severity: normal status: open title: os.isatty() is not Unix only versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18553 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18553] os.isatty() is not Unix only
Changes by anatoly techtonik techto...@gmail.com: -- assignee: - docs@python components: +Documentation nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18553 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18535] termios.tcgetattr should return namedtuple
anatoly techtonik added the comment: I've made my own monster, attached. -- Added file: http://bugs.python.org/file31026/DictRecord.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18535 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18535] termios.tcgetattr should return namedtuple
anatoly techtonik added the comment: Do not hijack the issue - value interpretation is the next step, which better keep out of scope for this improvement. termios is a C interface, which documents the meaning of TIOCGWINSZ and has defined names for structure entries, such as lflag. This issue is to make Python code at least as readable as C. C doesn't allow you to revert value meaning from ('\x1b') to text form. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18535 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18535] termios.tcgetattr should return namedtuple
anatoly techtonik added the comment: If you need a better use case for DictRecord, urlparse is another one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18535 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18535] termios.tcgetattr should return namedtuple
New submission from anatoly techtonik: Names of field for tuple returned by tcgetattr are already in documentation at http://docs.python.org/2/library/termios.html It would be nice to get them into code. -- components: Library (Lib) messages: 193595 nosy: techtonik priority: normal severity: normal status: open title: termios.tcgetattr should return namedtuple type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18535 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18535] termios.tcgetattr should return namedtuple
anatoly techtonik added the comment: Actually namedtuple doesn't suit the use case well. The use case is to read termios config, (re)set flags set it back. The attributes should be mutable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18535 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18298] pythonw.exe fails with redirected stderr
anatoly techtonik added the comment: I am not using pythonw.exe, it is the option users prefer to run the program. pythonw.exe is a binary, how do you propose to patch that? Or is it translated to .exe with RPython? Can you be more specific what shell does not work correctly, what exactly does not work correctly, and what is the backward-incompatible behaviour that you want to avoid? pythonw.exe is meant to suppresses the terminal window on startup (console window to be exact), but not to kill vital streams for an application. I posted links Spyder IDE source to show how it should be done. -- resolution: wont fix - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue706263] print in pythonw raises silent exception when no console available
anatoly techtonik added the comment: This is still an issue for Python 2 users. Most important that pythonw.exe has a magic ability to fail silently leaving users with no means to create valid bug reports (the reason why StackOverflow questions are downvoted and erased). http://bugs.ascend4.org/print_bug_page.php?bug_id=471 stream https://code.google.com/p/spyderlib/issues/detail?id=1260 The argument in msg15198 is somewhat misleading. If pythonw.exe fails because of print statement or because other issue, there is no way to report that. Anyway, this reminds me very much of mod_wsgi, with only problem that Python developers don't receive as much feedback as Graham to make the change: http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html -- nosy: +techtonik title: print raises exception when no console available - print in pythonw raises silent exception when no console available ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue706263 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Changes by anatoly techtonik techto...@gmail.com: -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18298] pythonw.exe fails with redirected stdett
New submission from anatoly techtonik: ---cut test.py--- print(-1-) open(-2-, w).write(-3-) ---cut test.py--- C:\Python27\pythonw.exe test.py -4- type -4- -1- C:\Python27\pythonw.exe test.py 2 -4- type -4- close failed in file object destructor: sys.excepthook is missing lost sys.stderr C:\Python27\python.exe test.py 2 -4- -1- type -4- This may also affect subprocess calls under pythonw.exe I am running Python 2.7.3 -- messages: 191839 nosy: techtonik priority: normal severity: normal status: open title: pythonw.exe fails with redirected stdett versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com