[issue9320] os.environ is global for threads

2010-07-21 Thread anatoly techtonik
anatoly techtonik added the comment: > in http://docs.python.org/library/thread.html > """...multiple threads of control sharing their global data space...""" > > That's how threads are understood in all programming languages. Do you mean this one

[issue9320] os.environ is global for threads

2010-07-22 Thread anatoly techtonik
anatoly techtonik added the comment: I have to debug CGIHTTPServer test case that apparently uses threads, and I expected to find at least some pointer about "what exactly a thread in Python is". I hope Python Manual is not only for system programmers. They do not need the man

[issue9376] Refer to gnuwin32 diff util on development FAQ

2010-07-26 Thread anatoly techtonik
anatoly techtonik added the comment: There is diff.py utility that is already available from standard Python distribution. -- nosy: +techtonik ___ Python tracker <http://bugs.python.org/issue9

[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread anatoly techtonik
anatoly techtonik added the comment: On Fri, Jul 23, 2010 at 10:24 PM, Alexander Belopolsky wrote: > I suggest changing > > Use exit() or Ctrl-D (i.e. EOF) to exit > >  to > > Type exit() or quit() and press the Enter key to exit Type exit() or press Ctrl-D to e

[issue9376] Refer to gnuwin32 diff util on development FAQ

2010-07-26 Thread anatoly techtonik
anatoly techtonik added the comment: The better way would be > python -m easy_install review > python -m review -- ___ Python tracker <http://bugs.python.org/

[issue9376] Refer to gnuwin32 diff util on development FAQ

2010-07-26 Thread anatoly techtonik
anatoly techtonik added the comment: > Brian Curtin added the comment: > > Until Rietveld has a defined place in our workflow, I don't think that's a > good idea. 1. AFAIK Python don't have any workflow. Do you speak about your own workflow? 2. What conditions sh

[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread anatoly techtonik
anatoly techtonik added the comment: On Mon, Jul 26, 2010 at 5:32 PM, Alexander Belopolsky wrote: > > I think you missed the point of the story that I posted.  The young > user, who was not completely new to computers, by the way, was not > familiar with "Ctrl"  abbrevi

[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread anatoly techtonik
anatoly techtonik added the comment: On Mon, Jul 26, 2010 at 7:03 PM, Alexander Belopolsky wrote: >> >> Could we (easily) add a third line at startup that says how to quit? > > +1 +1 - Type "help", "copyright", "credits" or "license"

[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread anatoly techtonik
anatoly techtonik added the comment: Something is broken in your 3.1.2 - this is Ctrl-D for me. {{{ Microsoft Windows [Version 6.0.6002] Copyright (c) 2006 Microsoft Corporation. All rights reserved. C:\~env\Python26>python Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32

[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread anatoly techtonik
anatoly techtonik added the comment: It appears that `import pyreadline` goes ok. It appears that this lib is used for unification of console incompatibilities between platform. Why not to ship it in Python by default? -- ___ Python tracker <h

[issue9362] Make exit/quit hint more novice friendly

2010-07-28 Thread anatoly techtonik
anatoly techtonik added the comment: >> Why not to ship it in Python by default? > > Because it is under GPL? pyreadline is under BSD. -- ___ Python tracker <http://bugs.pytho

[issue9362] Make exit/quit hint more novice friendly

2010-07-28 Thread anatoly techtonik
anatoly techtonik added the comment: On Mon, Jul 26, 2010 at 11:48 PM, Mark Lawrence wrote: > > This to me is getting stupid.  Let's make a decision and move on, there are > far more pressing issues that need attention. Do you think that getting `readline` module to run on Win

[issue13512] ~/.pypirc created insecurely

2013-02-18 Thread anatoly techtonik
anatoly techtonik added the comment: CVE-2011-4944 -- nosy: +techtonik ___ Python tracker <http://bugs.python.org/issue13512> ___ ___ Python-bugs-list mailin

[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-02-26 Thread anatoly techtonik
anatoly techtonik added the comment: Thanks for working on this. It is always nice to see things moving. -- ___ Python tracker <http://bugs.python.org/issue11

[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-03-09 Thread anatoly techtonik
anatoly techtonik added the comment: You can use patch.py utility from http://python-patch.googlecode.com/svn-history/trunk/patch.py to apply patch that doesn't have this CRLF problem. -- ___ Python tracker <http://bugs.python.org/is

[issue17426] \0 in re.sub substitutes to space

2013-03-14 Thread anatoly techtonik
New submission from anatoly techtonik: According to docs, group 0 is equivalent to the whole match, which is not true for Python. import re print( re.sub('aaa', r'__\0__', 'argaaagra') ) arg__ __gra import re print( re.sub('(aaa)', r'__\1__'

[issue17426] \0 in re.sub substitutes to space

2013-03-14 Thread anatoly techtonik
anatoly techtonik added the comment: You're right - groups are defined here: http://docs.python.org/2/library/re.html#re.MatchObject.group The need to fix this is to gain internal language consistency, external consistency with other major implementations, reduce docs and amount of exce

[issue17426] \0 in re.sub substitutes to space

2013-03-14 Thread anatoly techtonik
anatoly techtonik added the comment: Am I right that \0 is not supported just because nobody thought about supporting it? -- ___ Python tracker <http://bugs.python.org/issue17

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: The perl syntax supported $0 according to this doc http://turtle.ee.ncku.edu.tw/docs/perl/manual/pod/perlre.html but was removed for unknown reason. Using the fact that support is removed without knowing the true reason is "cargo cult argument"

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: Matthew, finally the right answer. Thanks! Looking further, there is a bug in processing backslashes in raw literal replacement strings. re.sub ignores raw strings as replacements. This can be even more confusing for people who look for more advanced

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: I thought that trackers are used to track the sources of the bugs. Aren't they? -- ___ Python tracker <http://bugs.python.org/is

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: Users list the effect. Then a research is made to find the source. Then a decision is made to find the right cause for the source of the bug, and then a decision about if the fix is possible. The bug is closed, but that doesn't mean we can not ded

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: Amaury, the documentation could make it more clear that it is a double replacement. Of course I payed attention to the repeated instructions about string substitution, but I thought that it is just a reminder, not an extra processing layer on top of

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: FWIW, I reimplemented substitution logic in my wikify [1] engine some time ago. I was kind of disappointed that I have to reinvent the bicycle, but now I see that this was for good. Thanks to people in this report I now understand the whole stuff much

[issue17436] pass a string to hashlib.update

2013-03-16 Thread anatoly techtonik
New submission from anatoly techtonik: http://docs.python.org/3/library/hashlib#hashlib.hash.update The hashlib is most useful for big chunks of data, and that means every time you need to create a wrapper for reading from files. It makes sense to allow hashlib.update accept file like object

[issue17436] pass a file object to hashlib.update

2013-03-16 Thread anatoly techtonik
Changes by anatoly techtonik : -- title: pass a string to hashlib.update -> pass a file object to hashlib.update ___ Python tracker <http://bugs.python.org/issu

[issue17436] pass a file object to hashlib.update

2013-03-16 Thread anatoly techtonik
anatoly techtonik added the comment: Otherwise you need to repeat this code. def filehash(filepath): blocksize = 64*1024 sha = hashlib.sha256() with open(filepath, 'rb') as fp: while True: data = fp.read(blocksize) if not data:

[issue17438] json.load docs should mention that it always return unicode

2013-03-16 Thread anatoly techtonik
New submission from anatoly techtonik: Strings returned in the object returned from json.load() seem to be always unicode, but it is not documented. Python 2.7 -- assignee: docs@python components: Documentation messages: 184308 nosy: docs@python, techtonik priority: normal severity

[issue17439] insufficient error message for failed unicode conversion

2013-03-16 Thread anatoly techtonik
New submission from anatoly techtonik: When Python 2.x compares ordinary string with unicode, it tries to convert the former, and shows an error message if the conversion fails. Attached example with Russian strings gives the following: russian.py:11: UnicodeWarning: Unicode equal comparison

[issue17436] pass a file object to hashlib.update

2013-03-16 Thread anatoly techtonik
anatoly techtonik added the comment: Why unbuffered will be faster?? -- ___ Python tracker <http://bugs.python.org/issue17436> ___ ___ Python-bugs-list mailin

[issue17436] pass a file object to hashlib.update

2013-03-16 Thread anatoly techtonik
anatoly techtonik added the comment: Even though I mentioned passing file object in the title of this bugreport, what I really need is the following API: hexhash = hashlib.sha256().readfile(filename).hexdigest() -- ___ Python tracker <h

[issue17436] pass a file object to hashlib.update

2013-03-16 Thread anatoly techtonik
anatoly techtonik added the comment: I don't get that. I thought that buffered reading should be faster, although I agree that OS should handle this better. Why have the buffering turned on by default then? (I miss the ability to fork discussions from tracker, but there is no c

[issue17439] insufficient error message for failed unicode conversion

2013-03-17 Thread anatoly techtonik
anatoly techtonik added the comment: Ok. Does the data (string literals) has a scope? Does Python know at runtime that a string literal stored in its memory was defined in the input stream or a file? -- ___ Python tracker <http://bugs.python.

[issue17462] argparse FAQ: how it is different from optparse

2013-03-18 Thread anatoly techtonik
New submission from anatoly techtonik: http://stackoverflow.com/questions/3217673/why-use-argparse-rather-than-optparse Too many votes. This should be confirmed by the official documentation. -- assignee: docs@python components: Documentation messages: 184468 nosy: docs@python

[issue17462] argparse FAQ: how it is different from optparse

2013-03-18 Thread anatoly techtonik
anatoly techtonik added the comment: @asvetlov: I still don't have the answer which licence - Academic Free License v2.1 or Apache 2.0 should I choose to license my patches. What is the difference? Ezio: It explains what you should replace, but doesn't explain why. -

[issue17465] Gut devinabox

2013-03-19 Thread anatoly techtonik
anatoly techtonik added the comment: Given some tweaks, it can become an attracting entrypoint into Python core development - http://shelr.tv/records/5148841296608075f849 -- nosy: +techtonik ___ Python tracker <http://bugs.python.org/issue17

[issue17494] References to stack bottom are confusing

2013-03-20 Thread anatoly techtonik
New submission from anatoly techtonik: If stack is saved in list and printed to the screen, it will be printed as: [ root, second, last ] And the last elements is the bottom element. The documentation at http://docs.python.org/3/reference/datamodel.html#frame-objects refers "b

[issue17503] replace mode is always on in console

2013-03-20 Thread anatoly techtonik
New submission from anatoly techtonik: It is very annoying behavior of Python 3.3.0 that when you type in the console, replace mode is always on, and even after you press insert to go insert mode, it resets after every executed line. Windows Vista 32. Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29

[issue17503] replace mode is always on in console

2013-03-21 Thread anatoly techtonik
anatoly techtonik added the comment: In Python 2 replace mode is always off. -- ___ Python tracker <http://bugs.python.org/issue17503> ___ ___ Python-bugs-list m

[issue17503] replace mode is always on in console

2013-03-21 Thread anatoly techtonik
anatoly techtonik added the comment: Ok. From cmd.exe both work the same in insert mode, but when I execute them from different shell (http://www.farmanager.com/opensource.php?l=en), the Python 3 starts to misbehave. And Python 2 works ok, because there is pyreadline installed. With -s -S

[issue17494] References to stack bottom are confusing

2013-03-21 Thread anatoly techtonik
anatoly techtonik added the comment: stack = [] stack.append(item) stack.append(item) stack.append(item) This is an appropriate explanation of the stack in Python, the first frame is the frame that was put in first. root/terminal - if you know what a stack is, you won't confuse it w

[issue17494] References to stack bottom are confusing

2013-03-21 Thread anatoly techtonik
anatoly techtonik added the comment: +or None if this is the first frame (at the bottom of the stack); I'd avoid top/bottom altogether, but if it is what is needed to reach the consensus then I am fine with that. -- ___ Python tracker

[issue17503] replace mode is always on in console

2013-03-21 Thread anatoly techtonik
anatoly techtonik added the comment: I've messed with some settings, upgraded Far, restarted it during yet another test and suddenly everything worked. I hate such stuff. Thanks for support. -- resolution: -> invalid status: open -

[issue17494] References to stack bottom are confusing

2013-03-21 Thread anatoly techtonik
anatoly techtonik added the comment: It appeared that I always thought that stacks grow down towards the end of memory, but it appears that they are growing down towards the beginning (x86 and friends). Spent some years with assembly to miss that. A shame on me. =) Even if title of the issue

[issue17494] References to stack bottom are confusing

2013-03-21 Thread anatoly techtonik
anatoly techtonik added the comment: @eli.bendersky: The article is awesome. One of the cases when I regret that many interesting Python posts don't have a +1 button. One more chapter about C stack overflow and it will get all top

[issue15005] corrupted output from subprocess call under a trace

2013-03-22 Thread anatoly techtonik
anatoly techtonik added the comment: This use case is actual for various kind of asynchronous operations. -- title: trace corrupts return result on chained execution -> corrupted output from subprocess call under a trace ___ Python tracker &l

[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread anatoly techtonik
Changes by anatoly techtonik : -- title: corrupted output from subprocess call under a trace -> corrupted contents of stdout result from subprocess call under a trace ___ Python tracker <http://bugs.python.org/issu

[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread anatoly techtonik
anatoly techtonik added the comment: I can't repeat this on Windows. Looks like it is a Linux issue, because of forks. -- ___ Python tracker <http://bugs.python.org/is

[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread anatoly techtonik
anatoly techtonik added the comment: I can not repeat this neither on Python 2.7 nor on Python 3 on Windows Vista. Need to run this on a Linux system to confirm. -- ___ Python tracker <http://bugs.python.org/issue15

[issue14979] pdb doc: Explain how to extend debugger instead of sending readers to the source

2013-03-22 Thread anatoly techtonik
anatoly techtonik added the comment: A minimal example of debugger is needed, with the explanation how frame.f_trace is used by debuggers. -- versions: +Python 3.4, Python 3.5 ___ Python tracker <http://bugs.python.org/issue14

[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread anatoly techtonik
anatoly techtonik added the comment: Python 3 is not affected. Python 2.7, Linux only. -- ___ Python tracker <http://bugs.python.org/issue15005> ___ ___ Python-bug

[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread anatoly techtonik
anatoly techtonik added the comment: And how to find all such issues for Python 2 that people need to be aware of in this tracker? -- ___ Python tracker <http://bugs.python.org/issue15

[issue17546] rename type returned by locals() to livedict

2013-03-25 Thread anatoly techtonik
New submission from anatoly techtonik: -locals() returns object that does't walk like a duck. +locals() returns object that does't work like a dict. Much of the confusion with locals() comes from the fact that returned object is labelled a dict, but this heisendict changes its beh

[issue17546] rename type returned by locals() to livedict

2013-03-26 Thread anatoly techtonik
anatoly techtonik added the comment: 1. The documentation doesn't say that the content of this dict may change sporadically even if you don't call locals() 2. I am referring to inline documentation: >>> h = locals() >>>

[issue17546] rename type returned by locals() to livedict

2013-03-26 Thread anatoly techtonik
anatoly techtonik added the comment: Under the trace function, the dict is always updated, and that changed a workflow in the program I was debugging leading to heisenbug. But that's a different story. I'd like to concentrate on the reasons to rename locals() result type from

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-27 Thread anatoly techtonik
anatoly techtonik added the comment: Raymond, could you please get the title back? You unintentionally hijacked the issue. The "Document the circumstances where the locals() dict gets updated" is not a describing title for this issue - it is one of the possible action items. I'

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-27 Thread anatoly techtonik
anatoly techtonik added the comment: Eric, here is the code that confirms changed behavior under trace function for both Python 2 and 3 - http://bugs.python.org/file15081/localstest.py I agree that the documentation fix is necessary, and if you say that it is an easier sell - I tend to

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-27 Thread anatoly techtonik
anatoly techtonik added the comment: Amaury, from user's point of view (I am not a core developer - I just need to troubleshoot complicated Python code) the object (the internal structure) returned by locals() has different behavior than a normal dict. Normal dict in Python is updated by

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-27 Thread anatoly techtonik
anatoly techtonik added the comment: Example: l = locals() z = dict(a=5, b=3) lc = dict(l) zc = dict(z) print(lc == l) print(zc == z) Gives: False True -- ___ Python tracker <http://bugs.python.org/issue17

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-27 Thread anatoly techtonik
anatoly techtonik added the comment: > "I as a user" can > see and can inspect for further troubleshooting This doesn't work for this example, which was your question. I still feel like this needs further clarification. For a user this behavior is not expected. User i

[issue7083] locals() behaviour differs when tracing is in effect

2013-03-27 Thread anatoly techtonik
anatoly techtonik added the comment: Attached localtest2.py where an empty locals() call changes behavior. --- localtest.pyWed Mar 27 19:48:06 2013 +++ localtest2.py Wed Mar 27 19:45:19 2013 @@ -3,6 +3,7 @@ def X(): l = locals() i = "foo" +locals() pr

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-27 Thread anatoly techtonik
anatoly techtonik added the comment: It could be the implementation detail if locals() calls were not useful to majority of Python software, and if behavior of its returned dict did not affect the execution flow of user programs (was deterministic for users who should not care about the

[issue6310] Windows "App Paths" key is not checked when installed for current user

2013-03-28 Thread anatoly techtonik
anatoly techtonik added the comment: Am not using XP anymore. Looks like everything is ok with Vista. -- ___ Python tracker <http://bugs.python.org/issue6

[issue17438] json.load docs should mention that it always return unicode

2013-03-28 Thread anatoly techtonik
anatoly techtonik added the comment: Thanks for the fix. ;) -- ___ Python tracker <http://bugs.python.org/issue17438> ___ ___ Python-bugs-list mailing list Unsub

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-28 Thread anatoly techtonik
anatoly techtonik added the comment: Ok. Maybe I proposed the solution too early. I am fine with doc fix, but given the previous experience I have doubts it will happen. Maybe opening a wiki page with a current draft can help: http://wiki.python.org/moin/Locals or better http

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-30 Thread anatoly techtonik
anatoly techtonik added the comment: > them as CPython implementation details and not part of the language definition What is the formal language definition of locals() then? What behavior and functionality of locals() should be supported by all Python implementations? For a potent

[issue17546] Document the circumstances where the locals() dict get updated

2013-03-30 Thread anatoly techtonik
anatoly techtonik added the comment: > ... cannot be relied upon to either happen or not happen... IMHO this phrase is from Advanced English course. > The original included the caution against modifying it, and I think it is valid because of the inconsistent behavior. > Perhaps it

[issue3778] python uninstaller leave registry entries

2013-04-19 Thread anatoly techtonik
anatoly techtonik added the comment: What is the reason for not following the good practice? Is it so hard to fix? -- ___ Python tracker <http://bugs.python.org/issue3

[issue17859] improve error message for saving ints to file

2013-04-28 Thread anatoly techtonik
New submission from anatoly techtonik: I needed to write some bytes to file and got this message. >>> hex = open('hex', 'wb') >>> for x in range(0, 0xff, 0x11): ... hex.write(x) ... Traceback (most recent call last): File "", line 2,

[issue17860] subprocess docs lack info how to use output result

2013-04-28 Thread anatoly techtonik
New submission from anatoly techtonik: http://docs.python.org/3/library/subprocess.html A common confusion is that result from subprocess calls in Python 3 is bytes, not string, and needs to be converted. The problem is complicated because you need to know the encoding of input/output

[issue17862] itertools.chunks(iterable, size, fill=None)

2013-04-28 Thread anatoly techtonik
New submission from anatoly techtonik: The history: 2007 - http://bugs.python.org/issue1502 2009 - http://bugs.python.org/issue6021 I'd like to resurrect this proposal again, but name it: itertools.chunks(iterable, size, fill=None) Two reasons. 1. practicality - top itertools reque

[issue17860] subprocess docs lack info how to use output result

2013-04-28 Thread anatoly techtonik
anatoly techtonik added the comment: > > > Actually stdin/stdout/stderr are string streams if universal_newline is > True > I believe that makes the issue even worse. =) -- ___ Python tracker <http://bugs.pyt

[issue16631] tarfile.extractall() doesn't extract everything if .next() was used

2013-04-28 Thread anatoly techtonik
anatoly techtonik added the comment: Ping. -- ___ Python tracker <http://bugs.python.org/issue16631> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17868] pprint long non-printable bytes as hexdump

2013-04-30 Thread anatoly techtonik
anatoly techtonik added the comment: Some issues: 1. the hex converting logic doesn't belong to base64 module - there is no chance a person without StackOverflow access can find it 2. i'd put issue17862 first as a dependency for this one, because proposed itertools.chunks() can

[issue17887] docs: summary page - generator vs iterator vs iterable

2013-04-30 Thread anatoly techtonik
New submission from anatoly techtonik: Docs lack a good summary page comparing three concepts. The main question is how do I tell if something is a sequence, generator, iterator or iterable? I found myself puzzled that range() is neither generator or iterator. -- assignee: docs@python

[issue17888] docs: more information on documentation team

2013-05-01 Thread anatoly techtonik
New submission from anatoly techtonik: To help people understand that they can actually improve Python docs themselves, how about the following changes: http://docs.python.org/3/bugs.html - rename from "Reporting Bugs" to "Dealing with Bugs". Explain that sometimes fixin

[issue17888] docs: more information on documentation team

2013-05-01 Thread anatoly techtonik
anatoly techtonik added the comment: May take a few days. -- ___ Python tracker <http://bugs.python.org/issue17888> ___ ___ Python-bugs-list mailing list Unsub

<    5   6   7   8   9   10