[issue34489] subprocess: execution of batch-files (.cmd/.bat) is vulnerable in python for windows / insufficient escape

2018-08-24 Thread Sergey G. Brester
New submission from Sergey G. Brester : There is a vulnerability "insufficient escape of special chars for quoting of arguments by exec process" for python-language, if executing windows batch-files (bat/cmd). ### What version of python is affected? All ### Does this issue reproduc

[issue34489] subprocess: execution of batch-files (.cmd/.bat) is vulnerable in python for windows / insufficient escape

2018-08-29 Thread Sergey G. Brester
Sergey G. Brester added the comment: > Would you consider adding your test suite into the regression tests as well? Sure. Done. > Right now, this is a well known issue on all platforms Really? I can't imagine this for something else as windows (and it is currently fixed also

[issue34489] subprocess: execution of batch-files (.cmd/.bat) is vulnerable in python for windows / insufficient escape

2018-08-30 Thread Sergey G. Brester
Sergey G. Brester added the comment: I have extended the PR a bit (more tests and corresponding documentation part). -- ___ Python tracker <https://bugs.python.org/issue34

[issue18863] Encoding a unicode with unicode() and ignoring errors

2013-08-27 Thread G. Scott Johnston
New submission from G. Scott Johnston: I've come up with the following series of minimal examples to demonstrate my bug. >>> unicode("") u'' >>> unicode("", errors="ignore") u'' >>> unicode("abcü")

[issue17010] Windows launcher ignores active virtual environment

2013-01-21 Thread Bryan G. Olson
New submission from Bryan G. Olson: Python 3.3 includes PEP 397, a Python launcher for Windows, and PEP 405, virtual environment support in core. Unfortunately the Windows launcher does not respect virtual environments. Even with with a virtual environment activated and the current directory

[issue22124] Rotating items of list to left

2014-08-02 Thread Sai Krishna G
New submission from Sai Krishna G: Hi, I am trying to rotate list of 3 to left for this I am trying to define this function def rotate_left3(nums) #argument nums is list for example rotate_left3([1, 2, 3]) I am expecting value [2,3,1] in return. I have written the following code a = nums

[issue1353344] python.desktop

2009-04-15 Thread Alessio G. B.
Alessio G. B. added the comment: I have added the Italian translation. -- nosy: +agb Added file: http://bugs.python.org/file13689/python.desktop ___ Python tracker <http://bugs.python.org/issue1353

[issue9037] Add explanation as to how to raise a custom exception in the extending python intermezzo on exceptions

2010-06-20 Thread Jonathan G. Underwood
New submission from Jonathan G. Underwood : In the documentation section on Extending Python with C or C++ there is an Intermezzo on Errors and Exceptions which shows how to create a custom exception in an extension module. I was just following these instructions for the first time and got to

[issue24732] 3.5.0b3 Windows accept() on unready non-blocking socket raises PermissionError

2015-07-26 Thread Bryan G. Olson
New submission from Bryan G. Olson: In Python 3.4 on Windows 7, the code: import socket sock = socket.socket() sock.bind(('127.0.0.1', 52384)) sock.listen(5) sock.setblocking(False) csock, addr = sock.accept() Raised: Traceback (most recent call last):

[issue1308] unicode(None) anomaly

2007-10-21 Thread James G. sack (jim)
New submission from James G. sack (jim): '2.5 (r25:51908, Apr 10 2007, 10:27:40) \n[GCC 4.1.2 20070403 (Red Hat 4.1.2-8)]' unicode(None) u'None' This doesn't seem right, ;-) Regards, ,,jim -- components: Unicode messages: 56628 nosy: jgsack severity:

[issue1308] unicode(None) anomaly

2007-10-21 Thread James G. sack (jim)
James G. sack (jim) added the comment: (aside: Wow! that was a fast response to my posting!) I'm not really sure what makes the most sense, possibly: - an exception - u'' - None but not u'None'; not a string of length 4. That's quite unexpected! Regards, ..jim

[issue1308] unicode(None) anomaly

2007-10-21 Thread James G. sack (jim)
James G. sack (jim) added the comment: Here's more: >>> unicode(object) u"" There seems to be an call to repr() somewhere in the process. This seems, at least to me, to violate the principle of least surprise, and I'm thinking that unicode(x) ought to return Unic

[issue1308] unicode(None) anomaly

2007-10-21 Thread James G. sack (jim)
James G. sack (jim) added the comment: Martin v. Löwis wrote: > Martin v. Löwis added the comment: > > Ok. This is not a bug, but by design. unicode(X)==unicode(str(X)) for > most things, and str(X)==repr(X) for most things. repr(None)=='None', > hence the result yo

[issue1328] feature request: force BOM option

2007-10-25 Thread James G. sack (jim)
New submission from James G. sack (jim): The behavior of codecs utf_16_[bl]e is to omit the BOM. In a testing environment (and perhaps elsewhere), a forced BOM is useful. I'm requesting an optional argument something like force_BOM=False I guess it would require such an option in mul

[issue1328] feature request: force BOM option

2007-10-25 Thread James G. sack (jim)
James G. sack (jim) added the comment: Feature Request REVISION Upon reflection and more playing around with some test cases, I wish to revise my feature request. I think the utf8 codecs should accept input with or without the "sig". On output, only the

[issue1328] feature request: force BOM option

2007-10-25 Thread James G. sack (jim)
James G. sack (jim) added the comment: Later note: kind of weird! On my LE machine, utf16 reads my BE-formatted test data (no BOM) apparently assumng some kind of surrogate format, until it finds an "illegal UTF-16 surrogate". That I fail to understand, especially since it quits u

[issue1328] feature request: force BOM option

2007-10-26 Thread James G. sack (jim)
James G. sack (jim) added the comment: re: msg56782 Yes, of course I can explicitly write the BOM. I did realize that after my first post ( my-'duh' :-[ ). But after playing some more, I do think this issue has become a worthwhile one. My second post msg56780 asks that utf_8 be to

[issue1328] feature request: force BOM option

2007-10-26 Thread James G. sack (jim)
James G. sack (jim) added the comment: OK, I will work on it. I have just downloaded trunk and will see what I can do. Might be a week or two. ..jim __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1328] feature request: force BOM option

2007-11-01 Thread James G. sack (jim)
James G. sack (jim) added the comment: Adam Olsen wrote: > Adam Olsen added the comment: > > The problem with "being tolerate" as you suggest is you lose the ability > to round-trip. Read in a file using the UTF-8 signature, write it back > out, and suddenly nothi

[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread James G. sack (jim)
New submission from James G. sack (jim): The streamreader in utf_8_sig.py fails when asked to read a specified bytelength of data that ends up in the middle of a multibyte utf8 code. I will attached a atandalone unittest (which does work from autotest, but doesn't use test_su

[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread James G. sack (jim)
Changes by James G. sack (jim): Added file: http://bugs.python.org/file8750/test_utf8sig_stream.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1444> __ ___

[issue1328] feature request: force BOM option

2007-11-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: re: msg57041, I'm sorry if I gave the wrong impression about interacting with other programs. I started this feature request with some half-baked thinking, which I tried to revise in my second post. Anyway I'm most interested right now in lobb

[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: Oops, it looks like my patch may have broken test_partial in test_codecs. I will try to figure out what the test_partial does in the next day or so, unless someone else can add some insignt in the meantime. .jim

[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: One additional clue: test_codecs succeeds in verbose mode but fails in non- verbose mode (autotest "verbosity") .. I think. My eyes are getting blurry. More tomorrow, I guess. ..j __ Tracker <[EMAIL PROT

[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: I found the errror in my previous patch. It lacked a self.decode=.. line in the StreamReader.decode elif branch. I attach a replacement patch diff-u.py26_utf8sig (apply to the 2.6 version of utf_8_sig.py. (If allowed, I will next remove the incorrect

[issue1328] feature request: force BOM option

2007-11-19 Thread James G. sack (jim)
James G. sack (jim) added the comment: More discussion of utf_8.py decoding behavior (and possible change): For my needs, I would like the decoding parts of the utf_8 module to treat an initial BOM as an optional signature and skip it if there is one (just like the utf_8_sig decoder). In fact

[issue1328] Force BOM option in UTF output.

2008-03-20 Thread James G. sack (jim)
James G. sack (jim) <[EMAIL PROTECTED]> added the comment: > Can you post an example that requires this code? This is not a big issue, and it wouldn't hurt if it got declared "go away and come back later if you have patch, test, docs, and a convincing use case".

[issue43467] IDLE: horizontal scrollbar

2021-03-10 Thread David E. Franco G.
New submission from David E. Franco G. : I noticed that the horizontal scroll bar is missing, I think it was present in previous version, regardless it would be nice if its be present. Thanks. -- assignee: terry.reedy components: IDLE files: no scroll bar.PNG messages: 388469 nosy

[issue43467] IDLE: horizontal scrollbar

2021-03-10 Thread David E. Franco G.
David E. Franco G. added the comment: How is that clutter? Even the most basic text editor (window notepad) have it, and knowing that yours or whoever code you are looking at extend horizontally beyond the size of your current windows size is a relevant information. -- Added file

[issue29706] IDLE needs syntax highlighting for async and await

2017-03-03 Thread David E. Franco G.
David E. Franco G. added the comment: >I presume you would like 'async' and 'await' highlighted as keywords. Yes. Some others tools like IPython and the Spider IDE that come with the Anaconda package already highlighted them as keywords, even if you can use them as

[issue29706] IDLE needs syntax highlighting for async and await

2017-03-03 Thread David E. Franco G.
David E. Franco G. added the comment: Ok, Done. that work in both 3.5 and 3.6 I also did the python -m idlelib.ColorDelegator and python -m idlelib.colorizer and they turn ok I also open those modules in their respective idle and run them, ColorDelegator work ok but colorizer

[issue29706] IDLE needs syntax highlighting for async and await

2017-03-03 Thread David E. Franco G.
David E. Franco G. added the comment: I found the problem, it was a test.pyc file that was in my personal folder... once deleted it work perfect the build-in test module should have some other name... -- ___ Python tracker <http://bugs.python.

[issue30019] IDLE got unexpexted bahavior when trying to use some characters

2017-04-07 Thread David E. Franco G.
New submission from David E. Franco G.: wandering for the internet I fount some unicode character in a random comment, and just for curiosity I wanted to use python (3.6.1) to see their value, so I copy those characters and paste them in IDLE, and in doing so it just close without warning or

[issue7009] random.randint docs

2009-09-27 Thread James G. sack (jim)
New submission from James G. sack (jim) : Docs for 2.6.2 (http://docs.python.org/library/random.html? highlight=random#module-random) presently say """ random.randint(a, b) Return a random integer N such that a <= N <= b. """ It should say ...a <= N &l

[issue7396] regrtest single: iterator not subscriptable

2009-11-25 Thread James G. sack (jim)
New submission from James G. sack (jim) : file Lib/tests/regrtest.py Evidently rev 76260 (trunk) / 76261 (py3k) broke code at rev 76324 line 655 (py3k) rev 76321 line 620 (trunk) which is if tests[0] == alltests[i] because tests was rebound from a list to an iterable, and hence

[issue6922] Interpreter hangs up while trying to decode invalid utf32 stream.

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: It seems that on my Fedora 11 AMD X86_64, the problem still exists. In test_codecs.UTF32Test, test_handlers() seems to run forever, gobbling memory to 99+% and then activating swap until it fills up swap. tested by svn up -r 74869 rm /tmp

[issue6922] Interpreter hangs up while trying to decode invalid utf32 stream.

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: Clarification of my last message (msg96468): The test_handler in the current revision (76850) also exhibits the same memory-gobbling behavior. I only refered to -r 74869 because that's where the test was introduced, ostensibly to verify the pat

[issue7205] bz2file deadlock

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: On my Fedora 11 AMD x86_64 system, it appears the deadlock still occurs (up to the limit of my patience, ie: several minutes). If I reduce to say 3, I can get the test to succeed sometimes. Observed in: trunk -r 76850 (latest) -r 75818 (first

[issue7396] regrtest single: iterator not subscriptable

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: Thanks, it seems to work now. My test method uses the command format ./python -Ebb Lib/test/regrtest.py -s test_calendar Sorry for the delayed response, I discovered problems with test_bz2 test_codecs which I wanted to confirm was real rather

[issue7396] regrtest single: iterator not subscriptable

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: Update: I was doing something wrong and getting false failures. I forgot to do ./configure and make after major revision-switches so the failures I was seeing in bz2 and codecs (and others, :-[ ) was bogus. Repeating the main message, though: The

[issue7205] bz2file deadlock

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: IMPORTANT Correction: Please disregard msg96472. I was forgetting to do .configure and make, and evidently getting bogus failures. test_bz2 works fine now, ..sorry for the false alarm. ~jim -- ___ Python

[issue6922] Interpreter hangs up while trying to decode invalid utf32 stream.

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: IMPORTANT Correction: Please disregard msg 96468 & 96470. I was forgetting to do ./configure and make, and evidently getting bogus failures. test_codecs works fine now, ..sorry for the false alarm.

[issue7108] test_commands.py failing on OS X 10.5.7 due to '@' in ls output

2009-12-16 Thread James G. sack (jim)
James G. sack (jim) added the comment: test_commands test_getstatus also fails on linux with SELinux enabled On gnu/linux, info ls reports: """ Following the file mode bits is a single character that specifies whether an alternate access method such as an acce

[issue7537] test_format

2009-12-17 Thread James G. sack (jim)
New submission from James G. sack (jim) : With -r 76870, on Fedora 11, amd x80_64, regrtest of test_format fails when the -j option is combined with the -v option. It happens whether testing everything or just the one test. ./python -Ebb Lib/test/regrtest -j3 -vv or ./python -Ebb Lib

[issue29706] IDLE needs syntax highlighting for async and await

2017-03-02 Thread David E. Franco G.
New submission from David E. Franco G.: Well, this is pretty self explanatory, when playing with this new features of async and await (https://docs.python.org/3.5/whatsnew/3.5.html#new-features) I found to me surprise that there is no syntax highlighting for it in the IDLE for py3.5 and also

[issue27989] incomplete signature with help function using typing

2016-09-06 Thread David E. Franco G.
New submission from David E. Franco G.: the issue is that when calling help on a function annotated with typing, all the relevant information is lost, for example from typing import List, Any, Iterator, Tuple def foo(data:List[Any]) -> Iterator[ Tuple[int,Any] ]: ... when calling h

[issue27989] incomplete signature with help function using typing

2016-09-07 Thread David E. Franco G.
David E. Franco G. added the comment: as that is the case, how about this as a solution: def formatannotation(annotation, base_module=None): if isinstance(annotation, type): if annotation.__module__ in ('builtins', base_module): return annotation.__

[issue27989] incomplete signature with help function using typing

2016-09-07 Thread David E. Franco G.
David E. Franco G. added the comment: I think that removing the "typing." is for the best, with the example above >>> help(foo) Help on function foo in module __main__: foo(data:typing.List[typing.Any]) -> typing.Iterator[typing.Tuple[int, typing.Any]] >>>

[issue1602] windows console doesn't print utf8 (Py30a2)

2009-05-26 Thread Χρήστος Γεωργίου (Christos g...@psf.upfronthosting.co.za, eorgiou)
Χρήστος Γεωργίου (Christos Georgiou) added the comment: Just in case it helps, this behaviour is on Win XP Pro, Python 2.5.1: First, I added an alias for 'cp65001' to 'utf_8' in Lib/encodings/aliases.py . Then, I opened a command prompt with a bitmap font. c:\windows\system32>python Python 2

[issue6058] Add cp65001 to encodings/aliases.py

2009-05-26 Thread Χρήστος Γεωργίου (Christos g...@psf.upfronthosting.co.za, eorgiou)
New submission from Χρήστος Γεωργίου (Christos Georgiou) : Add 'cp65001' (Microsoft term for UTF-8) as an alias to 'utf_8' -- components: Library (Lib), Unicode files: alias_cp65001.diff keywords: patch messages: 88060 nosy: tzot severity: normal status: open title: Add cp65001 to encod

[issue6058] Add cp65001 to encodings/aliases.py

2009-05-26 Thread Χρήστος Γεωργίου (Christos g...@psf.upfronthosting.co.za, eorgiou)
Changes by Χρήστος Γεωργίου (Christos Georgiou) : -- components: +Windows ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue6058] Add cp65001 to encodings/aliases.py

2009-05-26 Thread Χρήστος Γεωργίου (Christos g...@psf.upfronthosting.co.za, eorgiou)
Changes by Χρήστος Γεωργίου (Christos Georgiou) : Removed file: http://bugs.python.org/file14013/alias_cp65001.diff ___ Python tracker ___ ___

[issue6058] Add cp65001 to encodings/aliases.py

2009-05-26 Thread Χρήστος Γεωργίου (Christos g...@psf.upfronthosting.co.za, eorgiou)
Changes by Χρήστος Γεωργίου (Christos Georgiou) : Added file: http://bugs.python.org/file14014/alias_cp65001.diff ___ Python tracker ___ ___ Py

<    1   2