[issue9389] Traceback: Exception Shows Code that's On-Disk (Not in memory)
New submission from Guy : When an exception is raised and Python's showing a traceback, the lines of the Python scripts are that of those on-disk, not in memory. For example, if I run a Python script which raises an exception, but I edit the line the exception occurs on and save the script in the same location, the new line (The one that's not interpreted), will be shown in the traceback. -- components: Interpreter Core messages: 111685 nosy: Guy priority: normal severity: normal status: open title: Traceback: Exception Shows Code that's On-Disk (Not in memory) type: behavior versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue9389> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9389] Traceback: Exception Shows Code that's On-Disk (Not in memory)
Guy added the comment: I was running a script that I was editing, and, after making changes, the code wasn't reinterpreted, but listed the line that the "error" occured on (I had corrected the error on the file that was on disk, but yet, Python didn't reinterpret the code). "I'm guessing you aren't running a standalone script, but are running and editing something out of an interpreter session that doesn't restart" - do you mean that it's assumed I will restart the session after a change to the code? Judging by the data the traceback shows, wouldn't the results of the traceback/exception be misleading, citing a line of Python code on disk that was interpreted differently in memory? -- status: closed -> open ___ Python tracker <http://bugs.python.org/issue9389> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1524] os.system() fails for commands with multiple quoted file names
New submission from Guy Mott: Given a call to os.system() with a command string like this: os.system('"TheCommand" > "MyOutput"') # fails then the call fails with the following error message on the console: 'TheCommand" > "MyOutput' is not recognized as an internal or external command, operable program or batch file. Note that both the executable file name and the redirected output file name are quoted. Apparently the command string is being parsed and the first quote is incorrectly being matched with the last quote. A more general statement of this bug might say that multiple quoted fields on a command line cause os.system() to fail. I have not done enough research to better characterize the problem. By contrast, if only one of the file names is quoted then the call to os.system() succeeds. E.g., these calls succeed: os.system('TheCommand > "MyOutput"') # succeeds os.system('"TheCommand" > MyOutput') # succeeds Of course this is a simplified example where it is not necessary to quote either file name. Real world examples include 2 file names with imbedded spaces. E.g.: os.system('"The Command" > "My Output"') # fails 'The' is not recognized as an internal or external command, operable program or batch file. A further real-world example is a command line with full path specifications for both the executable file and the output file. Such path specifications may include imbedded spaces so both need to be quoted. However, quoting both causes os.system() to fail. E.g.: os.system(r'"C:\New Folder\TheCommand" > "C:\New Folder\MyOutput"') # fails 'C:\New' is not recognized as an internal or external command, operable program or batch file. The above described scenario is the situation in the attached script that includes logic for finding an executable file that may not be found on the system path but is co-located with the Python script file. Thus the script and its companion file(s) may be moved from machine to machine and will work correctly even if not in a directory that is included on the system path. The script fails because the command line that it constructs, with executable and output file specifications quoted, fails in os.system(). Here is output from running the attached script: --- C:\New Folder>buggy.py strCmdLine=["ListMetadata" > "20071129Metadata.txt"] 'ListMetadata" > "20071129Metadata.txt' is not recognized as an internal or external command, operable program or batch file. Could not find "ListMetadata" on path, looking in script directory strCmdLine=["C:\New Folder\ListMetadata" > "20071129Metadata.txt"] 'C:\New' is not recognized as an internal or external command, operable program or batch file. Traceback (most recent call last): File "C:\New Folder\buggy.py", line 16, in raise Exception("Could not locate command") Exception: Could not locate command --- Note that the command line that is constructed by the attached script runs just fine and produces the desired result if it is executed directly at a command line prompt. It is when executed via os.system() that the command line fails. Testing environment: OS = Windows XP Professional Python = 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] -- components: Extension Modules, Windows files: buggy.py messages: 57952 nosy: Quigon severity: major status: open title: os.system() fails for commands with multiple quoted file names type: crash versions: Python 2.5 Added file: http://bugs.python.org/file8828/buggy.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1524> __ #=== # This is example logic for Python code that depends upon an external executable # file. If the executable is found on the system path then no problem. # Otherwise, this script attempts to execute the executable in the same # directory where the script is located. # Unfortunately, this logic fails because os.system() fails when both the # executable and the output files are both quoted. Note that the command lines # that this code constructs work just fine at the command prompt. They fail in # os.system(). #=== import os.path import sys strCmdName = "ListMetadata" # name of our executable file strOutName = "20071129Metadata.txt" # name of output file # Command line is constructed with both file names quoted for maxim
[issue1524] os.system() fails for commands with multiple quoted file names
Guy Mott added the comment: > Are you sure that the exact command line works in a Windows shell? Yes, I tried running the exact same command line in a Windows shell and it worked fine. Note that the buggy.py script echoes the command line and then immediately calls os.system with it. E.g.: print "strCmdLine=[%s]" % strCmdLine nRtn = os.system(strCmdLine) I tried running the script in a shell window, watched it fail, then immediately cut and pasted the command line that had been echoed out by the script to the command line prompt in the same shell, ran it and it succeeded. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1524> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10760] tarfile doesn't handle sysfs well
Changes by Guy Rozendorn : -- nosy: +guyrozendorn ___ Python tracker <http://bugs.python.org/issue10760> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent
Guy Kloss added the comment: I know this issue is marked as fixed, and won't be backported to 2.6. But the fix is simple enough to self perform on 2.6. Doing that I have discovered an issue that might still be present with the fix, as it was not discussed here, yet, but is still related. Whenever one does the same thing, but uses an SSL connection (HTTPS), the socket.error is raised from within ssl.py (line 174). Even though the send() call in httplib does not misbehave now, when using an SSL encrypted connection the ssl module still throws you in front of a bus. -- nosy: +guy.kloss ___ Python tracker <http://bugs.python.org/issue5542> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent
Guy Kloss added the comment: I would open a new issue if I had it verified. But I can't verify it right now, as I cannot install the dependencies for a Py2.7 (or 3.x) for running my failing code on the server (running Ubuntu Lucid/LTS). Unless you're saying I should open an issue for it anyway, without having it verified on 2.7 or 3.x ... -- ___ Python tracker <http://bugs.python.org/issue5542> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11235] Source files with date modifed in 2106 cause OverflowError
New submission from Guy Kisel : Tested in Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32 Exception thrown: OverflowError: modification time overflows a 4 byte field Steps to reproduce: 1. Set system time to 2/8/2106 or later and modify a .py file (or use a utility to change the date modified directly). 2. Try to run or import the .py file. This date is 2^32 seconds after the Unix epoch. -- components: None messages: 128753 nosy: Guy.Kisel priority: normal severity: normal status: open title: Source files with date modifed in 2106 cause OverflowError type: crash versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue11235> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
Guy DeStefano added the comment: Please help me. Am new to Python, and don't know enough to post here, but I will try. Have written a couple of programs that use tkinter, especially tkinter.filedialog.askopenfilenames, and as everyone else mine has quit working since Monterey. I have a macOS Monterey version beta( 21A5543b ). Am using Python3 v3.10.0. Have tried using v3.11.0a1, but could not even compile, says that import ( PIL ) does not exist. Put back v 3.10.0 and am back to no filedialog. Is Apple attempting to do away with the file API. Just asking. Thank you. -- nosy: +guydestefano versions: -Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue44828> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
Guy DeStefano added the comment: Thank you very Guy DeStefano On Mon, Oct 11, 2021 at 2:10 PM Marc Culler wrote: > > Marc Culler added the comment: > > No, Apple is not going to do away with their NSOpenPanel. There is always > some churn when they release a new OS. Subtle changes to APIs can occur > with no warning and no documentation. Sometimes they are bugs. Sometimes > they disappear when the OS is released. Sometimes they are permanent. I > would not recommend using a beta version of the OS to develop your tkinter > app. > > -- > > ___ > Python tracker > <https://bugs.python.org/issue44828> > ___ > -- ___ Python tracker <https://bugs.python.org/issue44828> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
Guy DeStefano added the comment: Thank you very much for the reply. Sorry for previous text. Guy DeStefano On Mon, Oct 11, 2021 at 2:10 PM Marc Culler wrote: > > Marc Culler added the comment: > > No, Apple is not going to do away with their NSOpenPanel. There is always > some churn when they release a new OS. Subtle changes to APIs can occur > with no warning and no documentation. Sometimes they are bugs. Sometimes > they disappear when the OS is released. Sometimes they are permanent. I > would not recommend using a beta version of the OS to develop your tkinter > app. > > -- > > ___ > Python tracker > <https://bugs.python.org/issue44828> > ___ > -- ___ Python tracker <https://bugs.python.org/issue44828> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
Guy DeStefano added the comment: I appreciate the information, In the future I will do as is stated. Thanks for the reply. Guy DeStefano On Mon, Oct 11, 2021 at 2:24 PM Ned Deily wrote: > > Ned Deily added the comment: > > @Guy, thanks for your interest but in the future please don't use the > issue tracker as a help forum. There are lots of places to ask about such > matters; https://www.python.org/about/help/ has a good list of resources > and, among the Python-specific mailing lists at > https://www.python.org/about/help/, there are ones specifically for > Python usage on macOS ( > https://mail.python.org/mailman/listinfo/pythonmac-sig) and Tkinter usage > (https://mail.python.org/mailman/listinfo/tkinter-discuss). > > -- > > ___ > Python tracker > <https://bugs.python.org/issue44828> > ___ > -- ___ Python tracker <https://bugs.python.org/issue44828> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45488] Powershell Commands no Longer Recognised
New submission from The Guy : I am using pyinstaller to port my python programs into windows executables so that I can distribute them among my friends, and I recently assigned python to my windows PATH (I'm still not 100% sure what that means so idk if im even saying that right) and now a large amount of my computers basic powershell commands are no longer recognized; trying to use the cmd cmdlet i am only met with the "not recognized as the name of a cmdlet, function, or operable program" error. I've checked the internet pretty extensively and I haven't found anything that works, if you know what's going on or have any ideas on how to fix it, any help would be greatly appreciated. P.S. I am an amateur programmer and I just started dipping my toes into python, so I apologize if I don't give enough/correct information, I am still very new to this and am happy to answer questions as needed. Also sorry if this is the wrong place to ask about these kinds of issues, idk where else to ask. (pls be nice im new) -- assignee: docs@python components: Documentation, Windows messages: 404036 nosy: docs@python, julienbloxerk, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Powershell Commands no Longer Recognised type: behavior versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue45488> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39331] 2to3 mishandles indented imports
New submission from Guy Galun : When encountering an import that should be removed in Python 3 (e.g. "from itertools import izip"), 2to3 changes it a blank line, which may cause a runtime error if that import was indented: error: module importing failed: expected an indented block (ptypes.py, line 10) File "temp.py", line 1, in File "./lldbmacros/xnu.py", line 771, in from memory import * File "./lldbmacros/memory.py", line 11, in import macho File "./lldbmacros/macho.py", line 3, in from macholib import MachO as macho File "./lldbmacros/macholib/MachO.py", line 10, in from .mach_o import MH_FILETYPE_SHORTNAMES, LC_DYSYMTAB, LC_SYMTAB File "./lldbmacros/macholib/mach_o.py", line 16, in from macholib.ptypes import p_uint32, p_uint64, Structure, p_long, pypackable Relevant section before 2to3: try: from itertools import izip, imap except ImportError: izip, imap = zip, map from itertools import chain, starmap And after 2to3: try: except ImportError: izip, imap = zip, map from itertools import chain, starmap * Side note: This specific case may only be problematic with scripts that are partially aware of Python 3, otherwise they wouldn't try-catch that import. * Proposed solution: In case of that kind of import being the single line of an indented block, change it to "pass" instead of a blank line. -- components: 2to3 (2.x to 3.x conversion tool) files: ptypes.py messages: 359978 nosy: galun.guy priority: normal severity: normal status: open title: 2to3 mishandles indented imports type: crash versions: Python 3.9 Added file: https://bugs.python.org/file48839/ptypes.py ___ Python tracker <https://bugs.python.org/issue39331> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40097] Queue.Empty issue - Python3.8
New submission from Guy Kogan : Python 3.8 Queue module is unable to handle the expection: error: Exception in thread Thread-5: Traceback (most recent call last): File "FTP_multithreading.py", line 17, in run new_connection = self.queue.get(timeout=2) File "/usr/local/lib/python3.8/queue.py", line 178, in get raise Empty _queue.Empty During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "FTP_multithreading.py", line 18, in run except queue.Empty: AttributeError: 'Queue' object has no attribute 'Empty' b'220 ns.iren.ru FTP server (Version wu-2.6.2(1) Fri Sep 12 08:50:43 IRKST 2008) ready.\r\n' Exception in thread Thread-4: Traceback (most recent call last): File "FTP_multithreading.py", line 17, in run new_connection = self.queue.get(timeout=2) File "/usr/local/lib/python3.8/queue.py", line 178, in get raise Empty _queue.Empty When the Last task is done the exception queue.Empty should occur while handling the exception another exception is occurred. -- files: FTP_Code_queue.py messages: 365225 nosy: Python_dev_IL priority: normal severity: normal status: open title: Queue.Empty issue - Python3.8 type: crash versions: Python 3.8 Added file: https://bugs.python.org/file49005/FTP_Code_queue.py ___ Python tracker <https://bugs.python.org/issue40097> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40097] Queue.Empty issue - Python3.8
Guy Kogan added the comment: I still dont understand what do you mean? Can you please elaborate? -- ___ Python tracker <https://bugs.python.org/issue40097> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40097] Queue.Empty issue - Python3.8
Guy Kogan added the comment: Thanks Tim Peters and Raymond Hettinger, the issue has been resolved. Have a nice day! -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue40097> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40189] MultiProcessing Subclass - overrides run method issue
New submission from Guy Kogan : unable to override run method. when running the code i am unable to run the "run" function output from the code: Process 0 has been created Process 1 has been created Join for process is done Join for process is done Test Done -- files: Multi-processing_SYN_scan.py messages: 365802 nosy: Python_dev_IL priority: normal severity: normal status: open title: MultiProcessing Subclass - overrides run method issue versions: Python 3.8 Added file: https://bugs.python.org/file49035/Multi-processing_SYN_scan.py ___ Python tracker <https://bugs.python.org/issue40189> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40189] MultiProcessing Subclass - overrides run method issue
Change by Guy Kogan : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue40189> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40189] MultiProcessing Subclass - overrides run method issue
Guy Kogan added the comment: I have fixed the issue -- resolution: -> fixed ___ Python tracker <https://bugs.python.org/issue40189> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14586] TypeError: truncate() takes no keyword arguments
New submission from Guy Taylor : The Python docs suggest that io.IOBase.truncate' should take a keyword argument of 'size'. However this causes a 'TypeError': TypeError: truncate() takes no keyword arguments Suggest that the docs are changed to 'truncate(size)' or CPython is changed to allow the keyword. http://docs.python.org/py3k/library/io.html?highlight=truncate#io.IOBase.truncate http://docs.python.org/library/io.html?highlight=truncate#io.IOBase.truncate -- assignee: docs@python components: Documentation, Interpreter Core files: test.py messages: 158308 nosy: TheBiggerGuy, docs@python priority: normal severity: normal status: open title: TypeError: truncate() takes no keyword arguments type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file25219/test.py ___ Python tracker <http://bugs.python.org/issue14586> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14586] TypeError: truncate() takes no keyword arguments
Guy Taylor added the comment: What ever change is made to the new CPythons the old docs should be updated to prevent confusion, with truncate([size]). On fixing it for the future I would agree that supporting it as a keyword argument is preferred, as it is more pythonic (in my opinion). However this would cause ether backwards incompatibility or ambiguity in the language (ie. truncate(0, size=1) or need the deprecate, warn then removal stages taken three release cycles). Maybe the less perfect but acceptable solution is just to change the docs and wait for Python 4k for the real fix? -- ___ Python tracker <http://bugs.python.org/issue14586> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14586] TypeError: truncate() takes no keyword arguments
Guy Taylor added the comment: @murray The thing I would be worried at in both supporting truncate(0) and truncate(size=0) would be truncate(0, size=1). This could throw an exception but causes the need for extra sanity checks and introduces ambiguity in the otherwise 'only one way to do something' Python style. -- ___ Python tracker <http://bugs.python.org/issue14586> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14586] TypeError: truncate() takes no keyword arguments
Guy Taylor added the comment: Looking through cpython and trying to form a patch I found several differing interpretations of truncate: Lib/_pyio.py def truncate(self, pos=None): Modules/_io/fileio.c PyDoc_STRVAR(truncate_doc, "truncate([size: int]) ..."); A first semi-working patch is attached. This will allow: truncate() truncate(x) truncate(size=x) and fail on: truncate(x, size=x) truncate(x, size=y) Thoughts? ps. fileio_truncate is defined as (PyCFunctionWithKeywords)fileio_truncate, METH_VARARGS | METH_KEYWORDS but fails with "takes no keyword arguments". How do I fix this? -- keywords: +patch Added file: http://bugs.python.org/file25246/truncate.ver1.patch ___ Python tracker <http://bugs.python.org/issue14586> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14586] TypeError: truncate() takes no keyword arguments
Guy Taylor added the comment: Sorry had not refreshed the page to pick up the last comment. After reading more the cpython code I get what you are saying now. Not a fan of that syntax but consistency is best. This is my first time working with cpython directly, I have only worked on small python to c modules before so please say if I am barking up the wrong tree. -- ___ Python tracker <http://bugs.python.org/issue14586> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14586] TypeError: truncate() takes no keyword arguments
Guy Taylor added the comment: @Brandl truncate() was the issue I ran into, no other reason. I have started on the rest of the IO module tho. I know the patch is not working but I ran into problems with getting cpython to change functions from positional to keyword. @all cpython| Python| Status ---+---+--- iobase_readlines | readline(limit=-1)| patch v2 iobase_readline| readlines(hint=-1)| patch v2 iobase_seek| seek(offset, whence=SEEK_SET) | patch v2 iobase_truncate| truncate(size=None) | patch v2 fileio_seek| seek(offset, whence=SEEK_SET) | patch v2 fileio_read| read(n=-1)| patch v2 textiowrapper_read | read(n=-1)| ToDo textiowrapper_readline | readline(limit=-1)| ToDo textiowrapper_seek | seek(offset, whence=SEEK_SET) | ToDo textiowrapper_truncate | truncate(size=None) | ToDo textiobase_read| read(n=-1)| ToDo textiobase_readline| readline(limit=-1)| ToDo {bufferedio.c} | | ToDo {bytesio.c}| | ToDo {stringio.c} | | ToDo ps. I am using code from within other C files and http://docs.python.org/dev/extending/extending.html#keyword-parameters-for-extension-functions to base my patch on but I still get "x()" takes no keyword arguments". What have I missed/Are the docs correct? -- Added file: http://bugs.python.org/file25251/truncate.ver2.patch ___ Python tracker <http://bugs.python.org/issue14586> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32218] add __iter__ to enum.Flag members
New submission from Guy Gangemi : I'm proposing to extend enum.Flag member functionality so it is iterable in a manner similar to enum.Flag subclasses. from enum import Flag, auto class FlagIter(Flag): def __iter__(self): for memeber in self._member_map_.values(): if member in self: yield member class Colour(FlagIter): RED = auto() GREEN = auto() BLUE = auto() YELLOW = RED | GREEN cyan = Colour.GREEN | Colour.Blue print(*Colour) # Colour.RED Colour.GREEN Colour.BLUE Colour.YELLOW # Without the enhancement, 'not iterable' is thrown for these print(*cyan) # Colour.GREEN Colour.BLUE print(*Colour.YELLOW) # Colour.RED Colour.GREEN Colour.YELLOW print(*~Colour.RED) # Colour.GREEN Colour.BLUE -- messages: 307629 nosy: Guy Gangemi priority: normal severity: normal status: open title: add __iter__ to enum.Flag members type: enhancement ___ Python tracker <https://bugs.python.org/issue32218> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10760] tarfile doesn't handle sysfs well
Guy Rozendorn added the comment: Here's a test case that re-creates this issue. I chose to use mocks instead of sample files from sysfs so it would be simpler to run, it can be easily changed to use a file from sysfs. The following code runs on Python2.7, requires the mock library {code} from unittest import TestCase from tempfile import mkstemp from mock import patch, Mock from os import close, remove, write, stat from posix import stat_result from tarfile import TarFile def fake_st_size_side_effect(*args, **kwargs): src, = args stats = stat(src) return stat_result((stats.st_mode, stats.st_ino, stats.st_dev, stats.st_nlink, stats.st_uid, stats.st_gid, stats.st_size + 10, stats.st_atime, stats.st_mtime, stats.st_ctime)) class Issue10760TestCase(TestCase): def setUp(self): fd, self.src = mkstemp() write(fd, '\x00' * 4) close(fd) fd, self.dst = mkstemp() close(fd) def test(self): with patch("os.lstat") as lstat: lstat.side_effect = fake_st_size_side_effect tar_file = TarFile.open(self.dst, 'w:gz') tar_file.add(self.src) {code} -- ___ Python tracker <http://bugs.python.org/issue10760> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20809] isabspath fails if path is None
New submission from <--This Guy: So far I've noticed this is only reproducible when running quickly with python2.7. Still, the error message seems like it would be confusing to new users to Python. user@host:~/foo/bar/project$ sudo python setup.py install DEBUG: Adding /foo/bar/project to system path. ERROR: Python module settings not found ERROR: Python module settings not found # basically, more DistUtilsExtra errors... running install DEBUG: Adding /foo/bar/project to system path. running build running build_py running build_scripts running build_i18n DEBUG: Desktop files: ['project.desktop.in'] intltool-update -p -g ryode running build_icons running build_help running install_lib copying build/lib/__init__.py -> /usr/local/lib/python2.7/site-packages copying build/lib/ryode/__init__.py -> /usr/local/lib/python2.7/site-packages/ryode byte-compiling /usr/local/lib/python2.7/site-packages/__init__.py to __init__.pyc byte-compiling /usr/local/lib/python2.7/site-packages/ryode/__init__.py to __init__.pyc running install_scripts copying build/scripts-2.7/project -> /usr/local/bin changing mode of /usr/local/bin/project to 775 running install_data copying build/share/applications/project.desktop -> /usr/local/share/applications running install_egg_info Removing /usr/local/lib/python2.7/site-packages/project-0.1-py2.7.egg-info Writing /usr/local/lib/python2.7/site-packages/project-0.1-py2.7.egg-info Traceback (most recent call last): File "setup.py", line 144, in cmdclass={'install': InstallAndUpdateDataDirectory} File "/usr/local/lib/python2.7/site-packages/python_distutils_extra-2.38-py2.7.egg/DistUtilsExtra/auto.py", line 100, in setup distutils.core.setup(**attrs) File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 116, in run target_data = '/' + os.path.relpath(self.install_data, self.root) + '/' File "/usr/local/lib/python2.7/posixpath.py", line 437, in relpath start_list = [x for x in abspath(start).split(sep) if x] File "/usr/local/lib/python2.7/posixpath.py", line 367, in abspath if not isabs(path): File "/usr/local/lib/python2.7/posixpath.py", line 61, in isabs return s.startswith('/') AttributeError: 'NoneType' object has no attribute 'startswith' -- components: Build messages: 212457 nosy: jordannh priority: normal severity: normal status: open title: isabspath fails if path is None type: behavior versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue20809> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20809] isabspath fails if path is None
Changes by <--This Guy : -- keywords: +patch Added file: http://bugs.python.org/file34255/issue20809-nontype-object-has-no-attribute-startswith.patch ___ Python tracker <http://bugs.python.org/issue20809> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29481] 3.6.0 doc describes 3.6.1 feature - typing.Deque
New submission from Guy Arad: See: - https://docs.python.org/3.6/library/typing.html#typing.Deque - https://docs.python.org/3.5/library/typing.html#typing.Deque `typing.Deque` is expected to be included in 3.6.1: https://docs.python.org/3/whatsnew/changelog.html#python-3-6-1-release-candidate-1 Please remove or specify the version in which it's going to be included. -- assignee: docs@python components: Documentation messages: 287313 nosy: Guy Arad, docs@python priority: normal severity: normal status: open title: 3.6.0 doc describes 3.6.1 feature - typing.Deque versions: Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue29481> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20476] If new email policies are used, default message factory should be EmailMessage
Changes by aj guy : -- assignee: -> docs@python components: +Documentation, Library (Lib) nosy: +aj guy, docs@python type: behavior -> resource usage ___ Python tracker <http://bugs.python.org/issue20476> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43807] JSONDecodeError: Extra Data Raised on Long Valid JSON
New submission from Unknown Retired Guy : https://i.ibb.co/tYqBsQ8/pico-hard.png That JSONDecodeError: Extra Data is raised when the Valid JSON is too long or over than 25000 bytes, I don't know what caused this, can you fix it? The code and the traceback is in that picture/link above in this comment and the long valid JSON is provided here. The Below picture/link proof that it's a valid JSON: https://i.ibb.co/fGytRFC/946.png -- components: Library (Lib) files: pico-hard.json messages: 390781 nosy: filipetaleshipolitosoares73 priority: normal severity: normal status: open title: JSONDecodeError: Extra Data Raised on Long Valid JSON type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file49953/pico-hard.json ___ Python tracker <https://bugs.python.org/issue43807> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com