[issue45131] `venv` → `ensurepip` may read local `setup.cfg` and fail mysteriously
New submission from Sean Kelly : Creating a new virtual environment with the `venv` module reads any local `setup.cfg` file that may be found; if such a file has garbage, the `venv` fails with a mysterious message. Reproduce: ``` $ date -u Tue Sep 7 18:12:27 UTC 2021 $ mkdir /tmp/demo $ cd /tmp/demo $ echo 'a < b' >setup.cfg $ python3 -V Python 3.9.5 $ python3 -m venv venv Error: Command '['/tmp/demo/venv/bin/python3.9', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1. ``` (Took me a little while to figure out I had some garbage in a `setup.cfg` file in $CWD that was causing it.) Implications: Potential implications are that a specially crafted `setup.cfg` might cause a security-compromised virtual environment to be created maybe? I don't know. -- messages: 401320 nosy: nutjob4life priority: normal severity: normal status: open title: `venv` → `ensurepip` may read local `setup.cfg` and fail mysteriously type: behavior versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue45131> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Defining a Python enum in a C extension - am I doing this right?
On Tuesday, August 3, 2021 at 3:04:19 AM UTC-7, Bartosz Golaszewski wrote: > On Sat, Jul 31, 2021 at 3:01 PM Bartosz Golaszewski wrote: > > > > On Fri, Jul 30, 2021 at 2:41 PM Serhiy Storchaka wrote: > > > > > > 23.07.21 11:20, Bartosz Golaszewski пише: > > > > I'm working on a Python C extension and I would like to expose a > > > > custom enum (as in: a class inheriting from enum.Enum) that would be > > > > entirely defined in C. > > > > > > I think that it would be much easier to define it in Python, and then > > > either import a Python module in your C code, or exec a Python code as a > > > string. > > > > > > > You mean: evaluate a string like this: > > > > ''' > > import enum > > > > class FooBar(enum.Enum): > > FOO = 1 > > BAR = 2 > > BAZ = 3 > > ''' > > > > And then pull in the FooBar type from the resulting dictionary into my > > C code? Sounds good actually. I think I'll be able to add the FooBar > > type to another type's tp_dict too - because some enums I want to > > create will be nested in other classes. > > > > Bart > Just a follow-up: this is how I did it eventually: > > ``` > #include > > typedef struct { > PyObject_HEAD; > } dummy_object; > > PyDoc_STRVAR(dummy_type_doc, "Dummy type in which the enum will be nested."); > > static PyTypeObject dummy_type = { > PyVarObject_HEAD_INIT(NULL, 0) > .tp_name = "pycenum.DummyType", > .tp_basicsize = sizeof(dummy_object), > .tp_flags = Py_TPFLAGS_DEFAULT, > .tp_doc = dummy_type_doc, > .tp_new = PyType_GenericNew, > .tp_dealloc = (destructor)PyObject_Del, > }; > PyDoc_STRVAR(module_doc, > "C extension module defining a class inheriting from enum.Enum."); > > static PyModuleDef module_def = { > PyModuleDef_HEAD_INIT, > .m_name = "pycenum", > .m_doc = module_doc, > .m_size = -1, > }; > static int add_foobar_enum(PyObject *module) > { > static const char *foobar_src = > "class FooBar(enum.Enum):\n" > " FOO = 1\n" > " BAR = 2\n" > " BAZ = 3\n"; > > PyObject *main_mod, *main_dict, *enum_mod, *result, *foobar_type; > int ret; > > main_mod = PyImport_AddModule("__main__"); > if (!main_mod) > return -1; > > main_dict = PyModule_GetDict(main_mod); > if (!main_dict) { > Py_DECREF(main_mod); > return -1; > } > > enum_mod = PyImport_ImportModule("enum"); > if (!enum_mod) { > Py_DECREF(main_mod); > return -1; > } > > ret = PyDict_SetItemString(main_dict, "enum", enum_mod); > Py_DECREF(enum_mod); > if (ret) { > Py_DECREF(main_mod); > return -1; > } > > result = PyRun_String(foobar_src, Py_single_input, > main_dict, main_dict); > if (!result) { > Py_DECREF(main_mod); > return -1; > } > > foobar_type = PyDict_GetItemString(main_dict, "FooBar"); > if (!foobar_type) { > Py_DECREF(main_mod); > return -1; > } > > ret = PyDict_SetItemString(dummy_type.tp_dict, "FooBar", foobar_type); > Py_DECREF(foobar_type); > Py_DECREF(main_mod); > if (ret) > return -1; > > PyType_Modified(_type); > > return ret; > } > > PyMODINIT_FUNC PyInit_pycenum(void) > { > PyObject *module; > int ret; > > module = PyModule_Create(_def); > if (!module) > return NULL; > > ret = PyModule_AddStringConstant(module, "__version__", "0.0.1"); > if (ret) { > Py_DECREF(module); > return NULL; > } > > ret = PyType_Ready(_type); > if (ret) { > Py_DECREF(module); > return NULL; > } > > ret = add_foobar_enum(module); > if (ret) { > Py_DECREF(module); > return NULL; > } > > Py_INCREF(_type); > ret = PyModule_AddObject(module, "DummyType", (PyObject *)_type); > if (ret) { > Py_DECREF(_type); > Py_DECREF(module); > return NULL; > } > > return module; > } > ``` > > Bart No -- https://mail.python.org/mailman/listinfo/python-list
Re: [Errno 2] No such file or directory:
On Thursday, July 29, 2021 at 7:42:58 AM UTC-7, joseph pareti wrote: > indeed. There are better options than the one I attempted. Thanks for the > advice > > Am Mi., 28. Juli 2021 um 18:19 Uhr schrieb Chris Angelico >: > > On Thu, Jul 29, 2021 at 2:10 AM joseph pareti > > wrote: > > > > > > The following code fails as shown in the title: > > > > > > > > > > > > > > > > > > > > > *import subprocesscmd = 'ls -l > > > > > /media/joepareti54/Elements/x/finance-2020/AI/Listen_attend_spell/VCTK-Corpus/wav48 > > > > > | awk "{print $9 }"'process = subprocess.Popen([cmd], > > > stdout=subprocess.PIPE, stderr=subprocess.PIPE)stdout, stderr = > > > process.communicate()print('stdout ',stdout)print('stderr ',stderr)* > > > > > > > > > > > > Traceback (most recent call last): > > > File "PreProcess_1a.py", line 3, in > > > process = subprocess.Popen([cmd], stdout=subprocess.PIPE, > > > stderr=subprocess.PIPE) > > > File "/home/joepareti54/anaconda3/lib/python3.8/subprocess.py", line > > 854, > > > in __init__ > > > self._execute_child(args, executable, preexec_fn, close_fds, > > > File "/home/joepareti54/anaconda3/lib/python3.8/subprocess.py", line > > > 1702, in _execute_child > > > raise child_exception_type(errno_num, err_msg, err_filename) > > > FileNotFoundError: [Errno 2] No such file or directory: 'ls -l > > > > > /media/joepareti54/Elements/x/finance-2020/AI/Listen_attend_spell/VCTK-Corpus/wav48 > > > > > | awk "{print $9 > > > > > > > First off, you'll want to post code in a way that keeps the > > formatting, otherwise it becomes very hard to read. > > > > But the immediate problem here is that Popen takes an array of command > > arguments, NOT a shell command line. You cannot invoke ls and pipe it > > into awk this way. > > > > Don't think like a shell script. Python has very good > > directory-listing functionality, and you will very very seldom need to > > shell out to pipelines. Figure out what you actually need to learn > > from the directory listing and get that information directly, rather > > than trying to use two external commands and text parsing. It's far > > FAR easier, cleaner, and safer that way. > > > > ChrisA > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > > > -- > Regards, > Joseph Pareti - Artificial Intelligence consultant > Joseph Pareti's AI Consulting Services > https://www.joepareti54-ai.com/ > cell +49 1520 1600 209 > cell +39 339 797 0644 I prefer LOLCODE for these kinds of tasks. HAI 1.2 I HAS A VAR ITZ MAH_DIRECTORY GIMMEH MAH_DIRECTORY CAN HAS STDIO? BOTH SAEM MAH_DIRECTORY AN "/media/joepareti54/Elements/x/finance-2020/AI/Listen_attend_spell/VCTK-Corpus/wav48", O RLY? YA RLY, VISIBLE "FILEZ GO HERE!" NO WAI, VISIBLE "WTF IZ THAT?" OIC KTHXBYE -- https://mail.python.org/mailman/listinfo/python-list
Re: a simple question
On Tuesday, July 27, 2021 at 5:05:27 AM UTC-7, Terry Reedy wrote: > On 7/26/2021 6:19 PM, Glenn Wilson via Python-list wrote: > > I recently downloaded the latest version of python, 3.9.6. Everything works > > except, the turtle module. I get an error message every time , I use basic > > commands like forward, backward, right and left. My syntax is correct: > > pat.forward(100) is an example. Can you tell me what is wrong. > On Windows, normal install, > C:\Users\Terry>py -3.9 -m turtle > C:\Users\Terry>py -3.9 -m turtledemo > both work. > > > -- > Terry Jan Reedy Welcome to programming!! Ain't it fun?! -- https://mail.python.org/mailman/listinfo/python-list
[issue42543] case sensitivity in open() arguments
New submission from Sean Grogan : I was stuck on a problem today using an open statement where I was trying to open a file for writing e.g. with open("RESULTS.CSV", "W") as csvfile: csvwriter = csv.writer(csvfile) csvwriter.writerow(["X", "Y"]) csvwriter.writerows(data) I did not notice I had the mode W in upper case. I am not sure if there is a legacy reason for only allowing lower case arguments here but I think a quick note in the documentation that it's case sensitive or a check (or note) when throwing an error would be helpful? such as ValueError: invalid mode: 'W' -- your case appears to be an upper case, please ensure the case of the mode is correct or ValueError: invalid mode: 'W' -- note the mode is case sensitive could be helpful? -- assignee: docs@python components: Documentation messages: 382322 nosy: docs@python, sean.grogan priority: normal severity: normal status: open title: case sensitivity in open() arguments type: behavior versions: Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue42543> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41723] doc: issue in a sentence in py_compile
New submission from Sean Chao : I think in https://docs.python.org/3.10/library/py_compile.html#py_compile.compile the sentence: > If dfile is specified, it is used as the name of the source file in error > messages when instead of file. should not have the 'when'. -- assignee: docs@python components: Documentation messages: 376424 nosy: SeanChao, docs@python priority: normal severity: normal status: open title: doc: issue in a sentence in py_compile type: enhancement versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue41723> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39000] Range causing unstable output(Windows64)
New submission from Sean Moss : I was doing this year's Advent of Code and found that the following program produces unstable output when run using the given file as input: """ from itertools import permutations import gc def runProgram(amp_input, program, counter): while program[counter] != 99: # print('*' * 99) instruction = str(program[counter]) opcode = instruction[-2:] value1 = program[counter + 1] # print('2:{}'.format(counter)) try: if opcode in ['01', '02', '1', '2', '5', '05', '6', '06', '7', '07', '8', '08']: value1 = program[counter + 1] value2 = program[counter + 2] param_modes = instruction[::-1][2:] # print('{} {} {} {}'.format(instruction, value1, value2, value3)) param_modes += '0' * (3 - len(param_modes)) # print(param_modes) if param_modes[0] == '0': value1 = program[value1] if param_modes[1] == '0': value2 = program[value2] # print('{} {} {} {}'.format(instruction, value1, value2, value3)) if opcode in ['01', '02', '1', '2', '7', '07', '8', '08']: value3 = program[counter + 3] if opcode.endswith('1'): program[value3] = value1 + value2 elif opcode.endswith('2'): program[value3] = value1 * value2 elif opcode in ['7', '07']: program[value3] = 1 if value1 < value2 else 0 elif opcode in ['8', '08']: program[value3] = 1 if value1 == value2 else 0 counter += 4 elif opcode in ['5', '05']: if value1 != 0: counter = value2 else: counter += 3 elif opcode in ['6', '06']: if value1 == 0: counter = value2 else: counter += 3 elif opcode in ['03', '3']: program[value1] = amp_input.pop(0) counter += 2 elif opcode in ['4', '04']: # print('{} {}'.format(instruction, value1)) if instruction != '104': value1 = program[value1] # print('Output value: {}'.format(value1)) counter += 2 return value1, counter else: print("Something broke at {}".format(counter)) print("program state {}".format(program)) print(instruction) return False except Exception as e: print("Out of bounds at {}".format(counter)) print("program state {}".format(program)) print(instruction) print(e) print(len(program)) return return program, True outputs = [] max_output = 0 # initial_program = list(map(int, open('input7.txt').read().split(','))) amp_ids = ['A', 'B', 'C', 'D', 'E'] permutation = [5, 6, 7, 8, 9] # for permutation in permutations([5, 6, 7, 8, 9]): amp_programs = {amp_id: [list(map(int, open('input7.txt').read().split(',')))[:], 0] for amp_id in ['A', 'B', 'C', 'D', 'E']} loops = 0 prev_output = 0 for x in range(0, 5): gc.collect() new_output, outer_counter = runProgram([permutation[x], prev_output], amp_programs[amp_ids[x]][0], amp_programs[amp_ids[x]][1]) if outer_counter is not True: prev_output = new_output amp_programs[amp_ids[x]][1] = outer_counter # print(new_output) while amp_programs['E'][1] is not True: gc.collect() for amp_id in amp_programs.keys(): amp = amp_programs[amp_id] # print(prev_output) # print('1:{}'.format(amp[1])) new_output, outer_counter = runProgram([prev_output], amp[0], amp[1]) if outer_counter is not True: prev_output = new_output amp[1] = outer_counter # print('{}, {}'.format(amp[1], outer_counter)) # outputs.append(prev_output) # print(prev_output) outputs.append(prev_output) # if prev_output > max_output: # max_output = prev_output print(max(outputs)) # print(outputs) """ However when this program is run on the same input it produces stable input: """ from itertools import permutations def runProgram(amp_input, program, counter): while program[counter] != 99: # print('*' * 99) instruction = str(program[counter]) opcode = instruction[-2:] value1 = program[counter + 1] # print('2:{}'.format(counter)) try: if opcode in ['01', '02', '1', '2', '5', '05', '6', '06', '7', '07', '8', '08']: value1 = program[counter + 1]
[issue38050] open('file.txt') path not found
Sean Frazier added the comment: If you are running a program and an the program crashes, then doesn't work properly afterward, what would you call that? -- ___ Python tracker <https://bugs.python.org/issue38050> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38050] open('file.txt') path not found
New submission from Sean Frazier : I am running a problem in 'Think Python' and was having no issues with: fin = open('words.txt') Then when I was working with the reference file, running a function, my IDLE crashed and is no longer able to locate files using [var = open('file.txt')] I have tried opening as 'r' and 'w', with no luck. Also, sometimes I do not get an error, but when I go to read the list, it is empty ''. -- components: Windows messages: 351300 nosy: Sean Frazier, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: open('file.txt') path not found type: resource usage versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue38050> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38040] Typo: "Writeable" Should be "Writable" in IO Library Documentation
Sean Happenny added the comment: It is a minor issue and I understand that there are many, much more important fixes and features the whole Python dev team is working on. But reading the documentation for these classes indicates that these classes may have a "writeable" member. If, as an example, the user then needs to examine the implementation of these classes and searches for "writeable" in the CPython, they'll find instances in comments, but not in the code. This may cause them to miss the real spelling of the method "writable()". Also, another justification is that the documentation should be correct and currently it is not. This fix should be a very simple find-and-replace, but does touch multiple files (probably more than those I referenced) and I understand how that is. On Thu, Sep 5, 2019, 11:44 SilentGhost wrote: > > SilentGhost added the comment: > > There are more cases of using this spelling in the code base, but I > personally don't see how any confusion can arise and why this "fix" is > needed. > > -- > nosy: +SilentGhost > > ___ > Python tracker > <https://bugs.python.org/issue38040> > ___ > -- ___ Python tracker <https://bugs.python.org/issue38040> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38040] Typo: "Writeable" Should be "Writable" in IO Library Documentation
New submission from Sean Happenny : Problem: There are 4 instances of the typo "writeable" in the documentation for the IO library affecting, at least, versions 3.7, 3.8, 3.9, and the latest master of the documentation (https://docs.python.org/[3.7,3.8,3.9]/library/io.html and https://github.com/python/cpython/blob/master/Doc/library/io.rst). This can cause confusion to the reader. The instances are under the "BufferedWriter" section (https://docs.python.org/3/library/io.html#io.BufferedWriter) and "BufferedRWPair" section (https://docs.python.org/3.7/library/io.html#io.BufferedRWPair). Fix: Change all instances of "writeable" to "writable" in the IO library documentation. -- assignee: docs@python components: Documentation, IO messages: 351216 nosy: Sean Happenny, docs@python priority: normal severity: normal status: open title: Typo: "Writeable" Should be "Writable" in IO Library Documentation type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue38040> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37932] ConfigParser.items(section) with allow_no_value returns empty strings
New submission from Sean Robertson : Hello and thanks for reading. I've also experienced this in Python 3.7, and I believe it to be around since 3.2. The allow_no_value option of ConfigParser allows None values when (de)serializing configuration files. Yet calling the "items(section)" method of a ConfigParser returns empty strings for values instead of None. See below for an MRE. Thanks, Sean Python 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from configparser import ConfigParser >>> a = ConfigParser(allow_no_value=True) >>> a.add_section('foo') >>> a.set('foo', 'bar') >>> a.items('foo') [('bar', '')] >>> a.items('foo', raw=True) [('bar', None)] >>> a.get('foo', 'bar') >>> list(a['foo'].items()) [('bar', None)] -- components: Library (Lib) messages: 350331 nosy: Sean Robertson priority: normal severity: normal status: open title: ConfigParser.items(section) with allow_no_value returns empty strings type: behavior versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue37932> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37678] Incorrect behaviour for user@password URI pattern in urlparse
New submission from Sean Wang : When an IPV4 URL with 'username:password' in it, and the password contains special characters like #[]?, urlparse would act as unexcepted. example: urlparse('http://user:pass#?[w...@example.com:80/path') -- components: Library (Lib) messages: 348431 nosy: Sean.Wang priority: normal severity: normal status: open title: Incorrect behaviour for user@password URI pattern in urlparse type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue37678> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34837] Multiprocessing.pool API Extension - Pass Data to Workers w/o Globals
Change by Sean Harrington : -- title: Multiprocessing.pool API Extension - Non-Global Initialization of Workers -> Multiprocessing.pool API Extension - Pass Data to Workers w/o Globals ___ Python tracker <https://bugs.python.org/issue34837> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34837] Multiprocessing.pool API Extension - Non-Global Initialization of Workers
Change by Sean Harrington : -- keywords: +patch pull_requests: +9025 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34837> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34837] Multiprocessing.pool API Extension - Non-Global Initialization of Workers
Change by Sean Harrington : -- components: Library (Lib) nosy: seanharr11 priority: normal severity: normal status: open title: Multiprocessing.pool API Extension - Non-Global Initialization of Workers type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue34837> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
python 2 urlopen vs python 3 urlopen
python 2 : python Python 2.7.15 (default, May 15 2018, 15:37:31) . >>> import urllib2 >>> res = urllib2.urlopen('https://api.ipify.org').read() >>> print res www.xxx.yyy.zzz python3 python3 Python 3.6.6 (default, Jul 19 2018, 16:29:00) ... >>> from urllib.request import urlopen >>> res = urlopen('https://api.ipify.org').read() >>> print(res) b'ww.xxx.yyy.zzz' I'm expecting the python 2 result, just the ip address. How can I get python 3 just to give the address, and not include b' ' ? I know I can mess with string manipulation, but I want to keep it simple. sean -- https://mail.python.org/mailman/listinfo/python-list
Re: Create an alias to an attribute on superclass
On Thursday, February 1, 2018 at 10:23:06 AM UTC-8, Sean DiZazzo wrote: > Hi! > > I basically just want to create an alias to an attribute on an item's > superclass. So that after I create the subclass object, I can access the > alias attribute to get the value back. > > > class Superclass(object): > def __init__(self, value): > """ > I want to pass x by reference, so that any time > x on the subclass is updated, so is the alias here > """ > self.alias = value > > class Subclass(Superclass): > def __init__(self, x): > self.x = x > Superclass.__init__(self, self.x) > > def __repr__(self): > return "x: %s\nalias: %s" % (self.x, self.alias) > > > if __name__ == "__main__": > foo = Subclass(1) > print foo.alias > > foo.x = 6 > # Should return 6 !!! > print foo.alias > > Yep. Thats it. Thank you guys!! -- https://mail.python.org/mailman/listinfo/python-list
Re: Create an alias to an attribute on superclass
On Thursday, February 1, 2018 at 10:37:32 AM UTC-8, Chris Angelico wrote: > On Fri, Feb 2, 2018 at 5:22 AM, Sean DiZazzo <sean.diza...@gmail.com> wrote: > > Hi! > > > > I basically just want to create an alias to an attribute on an item's > > superclass. So that after I create the subclass object, I can access the > > alias attribute to get the value back. > > > > > > class Superclass(object): > > def __init__(self, value): > > """ > > I want to pass x by reference, so that any time > > x on the subclass is updated, so is the alias here > > """ > > self.alias = value > > > > class Subclass(Superclass): > > def __init__(self, x): > > self.x = x > > Superclass.__init__(self, self.x) > > > > def __repr__(self): > > return "x: %s\nalias: %s" % (self.x, self.alias) > > > > > > if __name__ == "__main__": > > foo = Subclass(1) > > print foo.alias > > > > foo.x = 6 > > # Should return 6 !!! > > print foo.alias > > > > > > ISTM the easiest way would be to define a property on the superclass: > > class Superclass(object): > @property > def alias(self): > return self.x > > Whatever happens, self.alias will be identical to self.x. Is that what > you're after? > > ChrisA Yes, but that doesn't seem to work. It looks like there is a way to do it if you make the original value a list (mutable) instead of an integer. I really need to do it with an arbitrary object. Not sure if I can hack the list trick to work in my case though. -- https://mail.python.org/mailman/listinfo/python-list
Create an alias to an attribute on superclass
Hi! I basically just want to create an alias to an attribute on an item's superclass. So that after I create the subclass object, I can access the alias attribute to get the value back. class Superclass(object): def __init__(self, value): """ I want to pass x by reference, so that any time x on the subclass is updated, so is the alias here """ self.alias = value class Subclass(Superclass): def __init__(self, x): self.x = x Superclass.__init__(self, self.x) def __repr__(self): return "x: %s\nalias: %s" % (self.x, self.alias) if __name__ == "__main__": foo = Subclass(1) print foo.alias foo.x = 6 # Should return 6 !!! print foo.alias -- https://mail.python.org/mailman/listinfo/python-list
Re: "tkinter"
On Wednesday, September 13, 2017 at 7:21:25 PM UTC-7, Grant Edwards wrote: > On 2017-09-13, Ben Finneywrote: > > > The toolkit in question is named “tk”, which I have only ever known to > > be pronounced “tee kay”. > > > > The rest of the word is an abbreviation of “interface”. > > > > So, to me “Tkinter” is pronounced “tee kay inter”. > > Same here. Though I've probably said it aloud less than a half-dozen > times in the past twenty-whatever years. > > -- > Grant I usually just say "tinker", since it's easy...knowing that it's wrong. I agree with the "tee-kay" folks on correct pronunciation. -- https://mail.python.org/mailman/listinfo/python-list
Re: the core values of the Python "platform"
On Wednesday, September 13, 2017 at 6:16:58 AM UTC-7, leam hall wrote: > On Wed, Sep 13, 2017 at 9:08 AM, Darin Gordonwrote: > > > Bryan Cantrill gave an interesting talk recently at a Node conference about > > "platform values" [1]. The talk lead me to think about what the core values > > of the Python "platform" are and I thought it would be good to ask this > > question of the community. What would you consider the top (<= 5) core > > values? > > > > > Would that be close to the Zen of Python? The Zen of Python says it all. There might be some that argue with intricacies, but the core values are expressed clearly in it. Some people just like to argue. -- https://mail.python.org/mailman/listinfo/python-list
Re: A good way to unpack a matrix
On Wednesday, September 13, 2017 at 7:53:25 PM UTC-7, Andrew Zyman wrote: > hello, > is there a better approach to populating a function in this situation? > > res = self.DB.getPrice(): # returns array of 3x2 always. symbol_id, > symbol, price. > > var1 = self.AFunction(symbols=res[0][2] + '.' + res[1][2], conid1= > self.Contracts[res[0][0]].conId, > > conid2=self.Contracts[res[1][0]].conId, price1= res[0][2], price2= > res[1][2]) > > > Thank you. OOP? -- https://mail.python.org/mailman/listinfo/python-list
Re: Python dress
On Wednesday, September 13, 2017 at 3:02:18 PM UTC-7, bream...@gmail.com wrote: > On Wednesday, September 13, 2017 at 10:43:47 PM UTC+1, Sean DiZazzo wrote: > > On Tuesday, September 12, 2017 at 9:18:12 AM UTC-7, larry@gmail.com > > wrote: > > > Not too many females here, but anyway: > > > > > > https://svahausa.com/collections/shop-by-interest-1/products/python-code-fit-flare-dress > > > > > > (And if any guys want to wear this, there's nothing wrong with that.) > > > > I'm going to buy it for my girl wear it to all of my work parties. :) > > What is she going to wear? :) > > -- > Kindest regards. > > Mark Lawrence. She's gonna wear the geek dress with pride! She knows. There's a nice little Coco Chanel I have picked out for myself. :P -- https://mail.python.org/mailman/listinfo/python-list
traceback.format_exc() returns 'None\n'?!
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import traceback >>> tb = traceback.format_exc() >>> type(tb) >>> tb 'None\n' >>> Shouldn't it just return None itself? Why a string with a newline? Interested if there is an actual reason for this behavior or if it should be reported as a bug. ~Sean -- https://mail.python.org/mailman/listinfo/python-list
Re: Bug or intended behavior?
On Friday, June 2, 2017 at 10:46:03 AM UTC-7, bob gailer wrote: > On 6/2/2017 1:28 PM, Jussi Piitulainen wrote: > > sean.diza...@gmail.com writes: > > > >> Can someone please explain this to me? Thanks in advance! > >> > >> ~Sean > >> > >> > >> Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) > >> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > >> Type "help", "copyright", "credits" or "license" for more information. > >>>>> print "foo %s" % 1-2 > >> Traceback (most recent call last): > >>File "", line 1, in > >> TypeError: unsupported operand type(s) for -: 'str' and 'int' > > The per cent operator has precedence over minus. Spacing is not > > relevant. Use parentheses. > > > In other words "foo %s" % 1 is executed, giving "1". Then "1"-2 is > attempted giving the error. > Also: If there is more than one conversion specifier the right argument > to % must be a tuple. > I usually write a tuple even if there is only one conversion specifier - > that avoids the problem > you encountered and makes it easy to add more values when you add more > conversion specifiers. > > print "foo %s" % (1-2,) > > Bob Gailer I get what it's doing, it just doesn't make much sense to me. Looking at operator precedence, I only see the % operator in regards to modulus. Nothing in regards to string formatting. Is it just a side effect of the % being overloaded in strings? Or is it intentional that it's higher precedence...and why? Maybe I'm making too big a deal of it. It just doesn't 'feel' right to me. ~Sean -- https://mail.python.org/mailman/listinfo/python-list
Bug or intended behavior?
Can someone please explain this to me? Thanks in advance! ~Sean Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print "foo %s" % 1-2 Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for -: 'str' and 'int' >>> -- https://mail.python.org/mailman/listinfo/python-list
[issue30409] locale.getpreferredencoding doesn't return result
Sean McCully added the comment: ok, is this a valid fix then? On Saturday, May 20, 2017 1:34 AM, STINNER Victor <rep...@bugs.python.org> wrote: STINNER Victor added the comment: > In fact, it seems like I introduced a regression in bpo-6393, commit > 94a3694c3dda97e3bcb51264bf47d948c5424d84. I backported this commit, but I didn't notice the bug in the code... In fact, this commit was followed by the commit 6a448d4c2eac16af4c451b43c6dc46cf287b1671. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30409> ___ -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30409> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30409] locale.getpreferredencoding doesn't return result
New submission from Sean McCully: Exception: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 312, in run wheel_cache File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 295, in populate_requirement_set wheel_cache=wheel_cache): File "/usr/lib/python2.7/site-packages/pip/req/req_file.py", line 84, in parse_requirements filename, comes_from=comes_from, session=session File "/usr/lib/python2.7/site-packages/pip/download.py", line 422, in get_file_content content = auto_decode(f.read()) File "/usr/lib/python2.7/site-packages/pip/utils/encoding.py", line 31, in auto_decode return data.decode(locale.getpreferredencoding(False)) TypeError: decode() argument 1 must be string, not None -- components: Unicode files: patchset.diff keywords: patch messages: 293995 nosy: ezio.melotti, haypo, seanmccully priority: normal pull_requests: 1767 severity: normal status: open title: locale.getpreferredencoding doesn't return result versions: Python 2.7 Added file: http://bugs.python.org/file46877/patchset.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30409> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14483] inspect.getsource fails to read a file of only comments
Sean Grider added the comment: I had forgotten all about this bug until I saw an email from Pam today. The appears to still be some delay. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14483> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28965] Multiprocessing spawn/forkserver fails to pass Queues
New submission from Sean Murphy: Python fails to pass a Queue when calling Process with multiprocessing.set_start_method set to "spawn" or "forkserver". Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/multiprocessing/spawn.py", line 106, in spawn_main exitcode = _main(fd) File "/usr/lib/python3.5/multiprocessing/spawn.py", line 116, in _main self = pickle.load(from_parent) File "/usr/lib/python3.5/multiprocessing/synchronize.py", line 111, in __setstate__ self._semlock = _multiprocessing.SemLock._rebuild(*state) FileNotFoundError: [Errno 2] No such file or directory Here is a minimized example: ``` #!/usr/bin/env python3 import multiprocessing def check_child(q): print("Queue", q) if __name__ == '__main__': multiprocessing.set_start_method('spawn') # multiprocessing.set_start_method('fork') # multiprocessing.set_start_method('forkserver') q = multiprocessing.Queue(-1) print("q", q) proc = multiprocessing.Process(target=check_child, args=(q,)) proc.start() ``` Also, this fails when the Queue is implicitly passed to the child. ``` class Blerg(): def __init__(self): self.q = multiprocessing.Queue(-1) def print_queue(self): print("Queue", self.q) if __name__ == '__main__': multiprocessing.set_start_method('spawn') blerg = Blerg() blerg.print_queue() proc = multiprocessing.Process(target=blerg.print_queue) proc.start() ``` $ python3 --version Python 3.5.2 Windows (which defaults to "spawn" style multiprocessing) does not seem to have this issue (at least in 2.7.12). -- components: Library (Lib) messages: 283150 nosy: Sean Murphy priority: normal severity: normal status: open title: Multiprocessing spawn/forkserver fails to pass Queues type: crash versions: Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28965> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Farewell to Rob Collins
Rest in Peace Rob On Wed, Nov 16, 2016 at 12:48 PM, Ben Finneywrote: > "M.-A. Lemburg" writes: > > > Rob was a true Pythonista from the heart. He will always be remembered > > for his humor, great spirit and kindness. > > Robert and I had many conversations about the Bazaar version control > system, and I owe to him my passion for distributed version control. > > When I needed to convince my workplace to try this strange new idea, > Robert kindly donated his time to visit our offices and give a > presentation on why distributed version control was better and why > Bazaar was a good choice for us. > > He also inspired me to get serious about unit testing as a way to > increase confidence in a code base. > > You touched many lives, and you are missed. Vale, Rob. > > -- > \ “What you have become is the price you paid to get what you | > `\ used to want.” —Mignon McLaughlin | > _o__) | > Ben Finney > > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Subprocess Startup Error
Does anyone have advice on how to resolve this message when I attempt to open IDLE? "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am running Windows 10 Home on a 64bit machine. I am running Python 3.5.2. I have tried uninstalling the software and reinstalling but no luck with that. -- https://mail.python.org/mailman/listinfo/python-list
[issue25566] asyncio reference cycles after ConnectionResetError
Sean Hunt added the comment: I am 1 of those people who want to handle the error with reconnect code as it happens when using discord.py when the stupid connection is aborted due to Cloudflare being stupid and them thinking a bot made in python is a DDoS like litterally. So, I know of this error as well. -- nosy: +Sean Hunt ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25566> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27159] Python 3.5.1's websocket's lib crashes in event that internet connection stops.
New submission from Sean Hunt: I know that websockets has a issue with when a internet connection is dropped and prints a bad traceback. However I have to manually recreate it when the exception happens which is a pain as when it does it crashes aiohttp sessions as well. Also I wonder how I can bytecompile some dependencies that would normally be in site-packages to install manually to the embed version of python so that way I do not have to append to sys.path? And 1 more thing why does importlib fail when you try to reload a relativly imported module. Do you guys plan to add support for it someday? I hope so as it sucks that I cant do such thing as ```py from .somefile import someclass``` and be able to reload it by only knowing ``someclass`` Also it would be nice if there was a mode in python 3.5.1 that allows you to generate bytecode that you can use in the embed copy of the same version. Or to allow the embed version to generate bytecode that you can use to add to ``python35.zip`` eaily using WinRAR. -- messages: 266686 nosy: Sean Hunt priority: normal severity: normal status: open title: Python 3.5.1's websocket's lib crashes in event that internet connection stops. ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27159> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Strange Python related errors for androwarn.py. Please help!
Hello Thank you for your reply. So the error isnt due to a bug in function itself? It is due to a possible error in the Android APK file? If that is the case, it would take a while to figure this out. I tried contacted the author of the project but I have yet to hear back from him . Thanks On Thu, May 26, 2016 at 8:31 PM, Michael Torriewrote: > On 05/26/2016 05:57 PM, Michael Torrie wrote: > > You could try emailing the author who's email address is listed on the > > project's main github page. I suspect the project itself is abandoned. > > Ahem. That should have been whose. Sigh. > > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: Strange Python related errors for androwarn.py. Please help!
Here are the links to the other scripts mentioned in the error messages: https://github.com/mz/androwarn/blob/master/androwarn/search/malicious_behaviours/device_settings.py https://github.com/mz/androwarn/blob/master/androwarn/analysis/analysis.py and the main androwarn.py script: https://github.com/mz/androwarn/blob/master/androwarn.py Hopefully those help in any troubleshooting steps that you all recommend to me! Thank you! On Thu, May 26, 2016 at 1:25 PM, Sean Son <linuxmailinglistsem...@gmail.com> wrote: > Hello all > > From what I can tell from the error message that I received, line 257 of > the util.py script is causing the error. Here is a link to this script: > > https://github.com/mz/androwarn/blob/master/androwarn/util/util.py > > I am not a python developer myself, unfortunately, so I have no idea how I > should fix this error. All help is greatly appreciated! > > Thanks > > On Tue, May 24, 2016 at 3:46 PM, Sean Son < > linuxmailinglistsem...@gmail.com> wrote: > >> Thanks for the reply. >> >> Looks like I am screwed on this one lol >> >> On Tue, May 24, 2016 at 3:31 PM, MRAB <pyt...@mrabarnett.plus.com> wrote: >> >>> On 2016-05-24 20:04, Sean Son wrote: >>> >>>> hello all >>>> >>>> I am testing out a script called androwarn.py, which I downloaded from: >>>> >>>> https://github.com/mz/androwarn >>>> >>>> using the instructions found on: >>>> >>>> https://github.com/mz/androwarn/wiki/Installation >>>> >>>> When I ran the following commands to test the APK for AirBNB: >>>> >>>> >>>> python androwarn.py -i SampleApplication/bin/"Airbnb 5.19.0.apk" -v 3 >>>> -r >>>> html -n >>>> >>>> >>>> I received the following errors: >>>> >>>> Traceback (most recent call last): >>>> File "androwarn.py", line 116, in >>>> main(options, arguments) >>>> File "androwarn.py", line 99, in main >>>> data = perform_analysis(APK_FILE, a, d, x, no_connection) >>>> File "/home/dost/androwarn/androwarn/analysis/analysis.py", line 115, >>>> in >>>> perform_analysis >>>> ( 'device_settings_harvesting', >>>> gather_device_settings_harvesting(x) ), >>>> File >>>> >>>> "/home/dost/androwarn/androwarn/search/malicious_behaviours/device_settings.py", >>>> line 96, in gather_device_settings_harvesting >>>> result.extend( detect_get_package_info(x) ) >>>> File >>>> >>>> "/home/dost/androwarn/androwarn/search/malicious_behaviours/device_settings.py", >>>> line 79, in detect_get_package_info >>>> flags = recover_bitwise_flag_settings(flag, >>>> PackageManager_PackageInfo) >>>> File "/home/dost/androwarn/androwarn/util/util.py", line 257, in >>>> recover_bitwise_flag_settings >>>> if (int(flag) & option_value) == option_value : >>>> ValueError: invalid literal for int() with base 10: >>>> >>>> 'Lcom/google/android/gms/common/GooglePlayServicesUtil;->zzad(Landroid/content/Context;)V' >>>> >>>> >>>> I am absolutely at a loss as to how I should fix these errors? Anyone >>>> have >>>> any ideas? Sorry for just throwing this at you guys without warning, but >>>> Ive been tasked with fixing this at work and I need assistance please! >>>> >>>> It looks like this issue: >>> >>> https://github.com/mz/androwarn/issues/10 >>> >>> dating from 11 Dec 2014 and as yet unanswered. >>> >>> -- >>> https://mail.python.org/mailman/listinfo/python-list >>> >> >> > -- https://mail.python.org/mailman/listinfo/python-list
Re: Strange Python related errors for androwarn.py. Please help!
Hello all >From what I can tell from the error message that I received, line 257 of the util.py script is causing the error. Here is a link to this script: https://github.com/mz/androwarn/blob/master/androwarn/util/util.py I am not a python developer myself, unfortunately, so I have no idea how I should fix this error. All help is greatly appreciated! Thanks On Tue, May 24, 2016 at 3:46 PM, Sean Son <linuxmailinglistsem...@gmail.com> wrote: > Thanks for the reply. > > Looks like I am screwed on this one lol > > On Tue, May 24, 2016 at 3:31 PM, MRAB <pyt...@mrabarnett.plus.com> wrote: > >> On 2016-05-24 20:04, Sean Son wrote: >> >>> hello all >>> >>> I am testing out a script called androwarn.py, which I downloaded from: >>> >>> https://github.com/mz/androwarn >>> >>> using the instructions found on: >>> >>> https://github.com/mz/androwarn/wiki/Installation >>> >>> When I ran the following commands to test the APK for AirBNB: >>> >>> >>> python androwarn.py -i SampleApplication/bin/"Airbnb 5.19.0.apk" -v 3 -r >>> html -n >>> >>> >>> I received the following errors: >>> >>> Traceback (most recent call last): >>> File "androwarn.py", line 116, in >>> main(options, arguments) >>> File "androwarn.py", line 99, in main >>> data = perform_analysis(APK_FILE, a, d, x, no_connection) >>> File "/home/dost/androwarn/androwarn/analysis/analysis.py", line 115, >>> in >>> perform_analysis >>> ( 'device_settings_harvesting', >>> gather_device_settings_harvesting(x) ), >>> File >>> >>> "/home/dost/androwarn/androwarn/search/malicious_behaviours/device_settings.py", >>> line 96, in gather_device_settings_harvesting >>> result.extend( detect_get_package_info(x) ) >>> File >>> >>> "/home/dost/androwarn/androwarn/search/malicious_behaviours/device_settings.py", >>> line 79, in detect_get_package_info >>> flags = recover_bitwise_flag_settings(flag, >>> PackageManager_PackageInfo) >>> File "/home/dost/androwarn/androwarn/util/util.py", line 257, in >>> recover_bitwise_flag_settings >>> if (int(flag) & option_value) == option_value : >>> ValueError: invalid literal for int() with base 10: >>> >>> 'Lcom/google/android/gms/common/GooglePlayServicesUtil;->zzad(Landroid/content/Context;)V' >>> >>> >>> I am absolutely at a loss as to how I should fix these errors? Anyone >>> have >>> any ideas? Sorry for just throwing this at you guys without warning, but >>> Ive been tasked with fixing this at work and I need assistance please! >>> >>> It looks like this issue: >> >> https://github.com/mz/androwarn/issues/10 >> >> dating from 11 Dec 2014 and as yet unanswered. >> >> -- >> https://mail.python.org/mailman/listinfo/python-list >> > > -- https://mail.python.org/mailman/listinfo/python-list
Re: Strange Python related errors for androwarn.py. Please help!
Thanks for the reply. Looks like I am screwed on this one lol On Tue, May 24, 2016 at 3:31 PM, MRAB <pyt...@mrabarnett.plus.com> wrote: > On 2016-05-24 20:04, Sean Son wrote: > >> hello all >> >> I am testing out a script called androwarn.py, which I downloaded from: >> >> https://github.com/mz/androwarn >> >> using the instructions found on: >> >> https://github.com/mz/androwarn/wiki/Installation >> >> When I ran the following commands to test the APK for AirBNB: >> >> >> python androwarn.py -i SampleApplication/bin/"Airbnb 5.19.0.apk" -v 3 -r >> html -n >> >> >> I received the following errors: >> >> Traceback (most recent call last): >> File "androwarn.py", line 116, in >> main(options, arguments) >> File "androwarn.py", line 99, in main >> data = perform_analysis(APK_FILE, a, d, x, no_connection) >> File "/home/dost/androwarn/androwarn/analysis/analysis.py", line 115, in >> perform_analysis >> ( 'device_settings_harvesting', >> gather_device_settings_harvesting(x) ), >> File >> >> "/home/dost/androwarn/androwarn/search/malicious_behaviours/device_settings.py", >> line 96, in gather_device_settings_harvesting >> result.extend( detect_get_package_info(x) ) >> File >> >> "/home/dost/androwarn/androwarn/search/malicious_behaviours/device_settings.py", >> line 79, in detect_get_package_info >> flags = recover_bitwise_flag_settings(flag, >> PackageManager_PackageInfo) >> File "/home/dost/androwarn/androwarn/util/util.py", line 257, in >> recover_bitwise_flag_settings >> if (int(flag) & option_value) == option_value : >> ValueError: invalid literal for int() with base 10: >> >> 'Lcom/google/android/gms/common/GooglePlayServicesUtil;->zzad(Landroid/content/Context;)V' >> >> >> I am absolutely at a loss as to how I should fix these errors? Anyone have >> any ideas? Sorry for just throwing this at you guys without warning, but >> Ive been tasked with fixing this at work and I need assistance please! >> >> It looks like this issue: > > https://github.com/mz/androwarn/issues/10 > > dating from 11 Dec 2014 and as yet unanswered. > > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Strange Python related errors for androwarn.py. Please help!
hello all I am testing out a script called androwarn.py, which I downloaded from: https://github.com/mz/androwarn using the instructions found on: https://github.com/mz/androwarn/wiki/Installation When I ran the following commands to test the APK for AirBNB: python androwarn.py -i SampleApplication/bin/"Airbnb 5.19.0.apk" -v 3 -r html -n I received the following errors: Traceback (most recent call last): File "androwarn.py", line 116, in main(options, arguments) File "androwarn.py", line 99, in main data = perform_analysis(APK_FILE, a, d, x, no_connection) File "/home/dost/androwarn/androwarn/analysis/analysis.py", line 115, in perform_analysis ( 'device_settings_harvesting', gather_device_settings_harvesting(x) ), File "/home/dost/androwarn/androwarn/search/malicious_behaviours/device_settings.py", line 96, in gather_device_settings_harvesting result.extend( detect_get_package_info(x) ) File "/home/dost/androwarn/androwarn/search/malicious_behaviours/device_settings.py", line 79, in detect_get_package_info flags = recover_bitwise_flag_settings(flag, PackageManager_PackageInfo) File "/home/dost/androwarn/androwarn/util/util.py", line 257, in recover_bitwise_flag_settings if (int(flag) & option_value) == option_value : ValueError: invalid literal for int() with base 10: 'Lcom/google/android/gms/common/GooglePlayServicesUtil;->zzad(Landroid/content/Context;)V' I am absolutely at a loss as to how I should fix these errors? Anyone have any ideas? Sorry for just throwing this at you guys without warning, but Ive been tasked with fixing this at work and I need assistance please! -- https://mail.python.org/mailman/listinfo/python-list
[issue26000] Crash in Tokenizer - Heap-use-after-free
Sean Gillespie added the comment: Went ahead and did it since I had the time - the issue is that when doing a token of lookahead to see whether an 'async' at a top-level begins an 'async def' function or if it is an identifier. A shallow copy of the current token is made and given to another call to tok_get, which frees the token's buffer if a decoding error occurs. Since the shallow copy cloned the token's buffer pointer, the still-live token contains a freed pointer to its buffer that gets freed again later on. By explicitly nulling-out the token's buffer pointer like tok_get does if the copied token's buffer pointer was nulled out, we avoid the double-free issue and present the correct syntax error: $ ./python vuln.py File "vuln.py", line 1 SyntaxError: Non-UTF-8 code starting with '\xef' in file vuln.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details William Bowling's second program is also fixed with this change, with one additional wrinkle: if a token contains a null byte as the first character, an invalid write occurs when we attempt to replace the null character with a newline. This fix checks to make sure that this is not the case before performing the newline insertion. With this change, both of William Bowling's programs pass valgrind and present the appropriate syntax error. I tried to add this to the couroutine syntax tests, but any way to load the file outside of giving it to ./python itself fails (correctly) because the program contains a null byte. -- keywords: +patch Added file: http://bugs.python.org/file41995/tokenizer_double_free.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26000> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26000] Crash in Tokenizer - Heap-use-after-free
Sean Gillespie added the comment: Is anyone currently working on this? If not, I'd like to try and fix this. I've debugged this a little and think I have an idea of what's going on. -- nosy: +swgillespie ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26000> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2931] optparse: various problems with unicode and gettext
Sean Wang added the comment: This bug still exists in Python 2.7.10 with optparse version 1.5.3. When the default_value is not ASCII encoded, it would raise `UnicodeEncodeError: 'ascii' codec can't encode characters` this error is due to the `str` usage in `expand_default` method: def expand_default(self, option): if self.parser is None or not self.default_tag: return option.help default_value = self.parser.defaults.get(option.dest) if default_value is NO_DEFAULT or default_value is None: default_value = self.NO_DEFAULT_VALUE return option.help.replace(self.default_tag, str(default_value)) -- nosy: +Sean.Wang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2931> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2931] optparse: various problems with unicode and gettext
Sean Wang added the comment: Sorry, missed one condition: I used `unicode_literals` in Python 2.7.10, example below: >>> from __future__ import unicode_literals >>> str('api名称') Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-4: ordinal not in range(128) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2931> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2931] optparse: various problems with unicode and gettext
Sean Wang added the comment: when an unicode option.default_value could not be ascii encoded, it would throw exception, detailed logs below: File "/Users/seanwang/Documents/dev/foo/bar.py", line 119, in main parser.print_help() File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1670, in print_help file.write(self.format_help().encode(encoding, "replace")) File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1650, in format_help result.append(self.format_option_help(formatter)) File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1630, in format_option_help result.append(OptionContainer.format_option_help(self, formatter)) File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1074, in format_option_help result.append(formatter.format_option(option)) File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 316, in format_option help_text = self.expand_default(option) File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 288, in expand_default return option.help.replace(self.default_tag, str(default_value)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-4: ordinal not in range(128) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2931> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
python
Hello, I've downloaded python 3.5.1 but when I try and open it always says that I have to either uninstall it, repair it or modify it. However, I've tried all of them and it still doesn't work. >From Callum -- https://mail.python.org/mailman/listinfo/python-list
Re: python
I don't believe it's xp, it's a new laptop > On 11 Jan 2016, at 20:33, Cameron Simpson <c...@zip.com.au> wrote: > >> On 11Jan2016 19:17, Sean Melville <callum.melvil...@gmail.com> wrote: >> I've downloaded python 3.5.1 but when I try and open it always says that I >> have to either uninstall it, repair it or modify it. However, I've tried >> all of them and it still doesn't work. > > On what operating system are you trying to install it? > > If you are using XP you need to download Python 3.4; Python 3.5 is not > compatible with it. > > Cheers, > Cameron Simpson <c...@zip.com.au> -- https://mail.python.org/mailman/listinfo/python-list
[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file
New submission from Sean Wang: I transfered a file from remote Debian host to my local Windows 10 host using SecureFX. I found that the file's last modifed date was 1900/1/1,0:00:00 on Windows. I tried to serve this file to be downloaded, and it crashed as follows: Exception happened during processing of request from ('192.168.1.102', 50978) Traceback (most recent call last): File "C:\Python27\lib\SocketServer.py", line 295, in _handle_request_noblock self.process_request(request, client_address) File "C:\Python27\lib\SocketServer.py", line 321, in process_request self.finish_request(request, client_address) File "C:\Python27\lib\SocketServer.py", line 334, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Python27\lib\SocketServer.py", line 655, in __init__ self.handle() File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle self.handle_one_request() File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request method() File "C:\Python27\lib\SimpleHTTPServer.py", line 45, in do_GET f = self.send_head() File "C:\Python27\lib\SimpleHTTPServer.py", line 103, in send_head self.send_header("Last-Modified", self.date_time_string(fs.st_mtime)) File "C:\Python27\lib\BaseHTTPServer.py", line 468, in date_time_string year, month, day, hh, mm, ss, wd, y, z = time.gmtime(timestamp) ValueError: (22, 'Invalid argument') I have checked the source code, and found it was because of the last modifed date of the file, I got this in console: >>> os.fstat(f.fileno()) nt.stat_result(st_mode=33206, st_ino=4785074604093500L, st_dev=0L, st_nlink=1, st_uid=0, st_gid=0, st_size=3406L, st_atime=1446477520L, st_mtime=-2209017600L, st_ctime=1446370767L) -2209017600L cannot be handled by "time.gmtime()" method and it throwed error -- components: Library (Lib) messages: 253926 nosy: Sean.Wang priority: normal severity: normal status: open title: SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file type: crash versions: Python 2.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25534> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file
Sean Wang added the comment: upload a sample test file -- Added file: http://bugs.python.org/file40929/test ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25534> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25239] HTMLParser handle_starttag replaces entity references in attribute value even without semicolon
New submission from Sean Liu: In the document of HTMLParser.handle_starttag, it states "All entity references from html.entities are replaced in the attribute values." However it will replace the string if it matches ampersand followed by the entity name without the semicolon. For example foo will produce "t=buy¤cy=usd" as the value of href attribute due to "curren" is the entity name for the currency sign. -- components: Library (Lib) files: parserentity.py messages: 251654 nosy: Sean Liu priority: normal severity: normal status: open title: HTMLParser handle_starttag replaces entity references in attribute value even without semicolon type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file40588/parserentity.py ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25239> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6839] zipfile can't extract file
Changes by Sean Goodwin sean.e.good...@gmail.com: -- nosy: +Sean Goodwin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6839 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
Sean Wolfe added the comment: Windows 7 patch test successful: https://bugs.python.org/issue2704 * install python 2.7.8 fresh on W7 * check idle terminal functionality -- should not show terminal changes from 2704: - up arrows move cursor - typing out of focus has no effect - clicking above the prompt, then typing, does not move cursor to the prompt and begin typing * install Terminal.py in idlelib * apply PyShell.py.patch * click out of focus and type -- cursor returns to prompt + text appears * backspace -- backspace deletes text on prompt line * press up arrow -- cursor does not move up -- bell sounds as there are no previous commands * enter a few commands, then use up/down keys to navigate history -- up and down browse through history There seems to be a bell command in the history as I cycle through commands when I cross from earliest to latest. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2704 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
Sean Wolfe added the comment: successfully tested on Linux in 2014 Hello folks, FYI I also installed this patch on Lubuntu linux in 2014 on a series of computers at a lab where I mentor. I don't have the documentation for those specific tests, but I did follow the outline above, and it was done. So, IMO we can call this tested on W7, Linux and OSX 10.9.3, for Python 2.7 . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2704 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Following Up
Hi Marky, Hope all is well! Just wanted to check in and see if you were able to read my last email. I think you would be a fantastic fit for some of our roles. We have placed 90% of our candidates in the past 5 months closer to their homes with a higher salary, that's just how hot the market is right now. I would love to help you out, but if you are not interested, let me know if you have anyone in mind who may be, I would love to help them out as well! Best, Sean Sean Brady | Sales Executive, Recruiter | Highview Partners, LLC | | Phone: 781.353.6429 ext. 206| Fax: 781.794.3489 | sbr...@highview-partners.com | -- https://mail.python.org/mailman/listinfo/python-list
[issue22494] default logging time string is not localized
New submission from Sean Dague: The default time string is not localized for using locale specific formatting, but is instead hardcoded to a ','. https://hg.python.org/cpython/file/c87e00a6258d/Lib/logging/__init__.py#l483 demonstrates this. Instead I think we should set that to the value of: locale.localeconv()['decimal_point'] While this clearly a very minor issue, I stare at enough logging output data that falls back to default formats (due to testing environments) that would love for this to be locale aware. -- components: Library (Lib) messages: 227521 nosy: sdague priority: normal severity: normal status: open title: default logging time string is not localized type: behavior 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/issue22494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22024] Add to shutil the ability to wait until files are definitely deleted
Sean McCully added the comment: Is this closer to what Zachary.Ware suggested, patch implements a wait_until_deleted method in C Api using inotify for Linux/FreeBSD. -- nosy: +seanmccully Added file: http://bugs.python.org/file36433/issue22024.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22024 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22171] stack smash when using ctypes/libffi to access union
Sean McCully added the comment: For what it is worth, I was not able to reproduce, on the current Python 2.7.8 branch and Mac OS X. ./python2 Python 2.7.8+ (2.7:ba90bd01c5f1, Aug 12 2014, 12:21:58) gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.3.0 Thread model: posix Version:5.1.1 (5B1008) Location: /Applications/Xcode.app Applications: Xcode:5.1.1 (5085) Instruments: 5.1.1 (55045) SDKs: OS X: 10.8: (12F37) 10.9: (13C64) iOS: 7.1: (11D167) iOS Simulator: 7.1: (11D167) python2 test.py True -- nosy: +seanmccully ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22171 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1011113] Make “install” find the build_base directory
Sean McCully added the comment: Please advise any changes that need to be made, this is technically my second patch submission to cpython. I also had trouble running the unittests when backporting to 2.7. Look at distutils, there wasn't a clear method for linking commands to share common options. This led to the solution provided which searches command options provided (via command line or configuration) for any shared options between command being ran and commands specified. Patch for Python 3.4 attached. -- keywords: +patch nosy: +seanmccully Added file: http://bugs.python.org/file36336/issue103-py34.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1011113] Make “install” find the build_base directory
Sean McCully added the comment: Attaching Python 2.7 patch. -- Added file: http://bugs.python.org/file36338/issue103-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1011113] Make “install” find the build_base directory
Sean McCully added the comment: Attachng Python 3.5/default branch patch. -- Added file: http://bugs.python.org/file36337/issue103-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22138] patch.object doesn't restore function defaults
Sean McCully added the comment: So the changes submitted, take into the attributes that are part of the standard Python Data Model/Descriptors and defined as editable per documentation. https://docs.python.org/3/reference/datamodel.html The thought is if a user is needing to support outside of Proxy Object (currently supported) and default descriptor attributes then mock should be special cased by user/developer. Please advise on current solution. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22138 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22138] patch.object doesn't restore function defaults
Sean McCully added the comment: Is special casing the special attrs a permament enough solution? -- keywords: +patch nosy: +seanmccully Added file: http://bugs.python.org/file36286/issue22138.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22138 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Python and wireshark.
All. Is there any way to use python with Wireshark/Tshark? I am not able to use the GUI due to my vision impairment. So I am thinking of using Wireshark libraries and Python to provide a text console environment. Tshark does give you command line capability. I am more seeking for the ability of changing things on the fly, rather then creating complex command line parameters. Thoughts? Sean -- https://mail.python.org/mailman/listinfo/python-list
[issue20986] test_startup_imports fails in test_site while executed inside venv
New submission from Sean McGrail: test_startup_imports fails in test_site when executed from within a virtual environment (venv). Test passes when not executed within a venv. $ python -m test test_site [1/1] test_site test test_site failed -- Traceback (most recent call last): File /software/python/lib/python3.4/test/test_site.py, line 451, in test_startup_imports self.assertFalse(modules.intersection(re_mods), stderr) AssertionError: {'sre_parse', '_sre', 'sre_constants', 're', 'sre_compile'} is not false -- components: Tests messages: 214134 nosy: finitemachine priority: normal severity: normal status: open title: test_startup_imports fails in test_site while executed inside venv type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20986 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20986] test_startup_imports fails in test_site when executed inside venv
Changes by Sean McGrail skmcgr...@gmail.com: -- title: test_startup_imports fails in test_site while executed inside venv - test_startup_imports fails in test_site when executed inside venv ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20986 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules
Sean Rodman added the comment: Is there anything else I can do for this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19614] support.temp_cwd should use support.rmtree
Sean Rodman added the comment: Thank you for reviewing it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19614 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue694339] IDLE: Dedenting with Shift+Tab
Sean Wolfe added the comment: I did a couple tests and the shift-tab and tab work pretty much as expected. There's a small quirk for a single-line edit: * place cursor on beginning of line * tab forward -- the text indents as expected * shift-tab -- the entire line is highlighted -- the cursor now appears beneath the line -- subsequent typing however affects the highlighted line For the single-line case, it would be cleaner to have it stay on the same line without highlighting. This is OSX 10.9, python 2.7.6+ and 3.4.rc1+ -- nosy: +Sean.Wolfe ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue694339 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
Sean Wolfe added the comment: I just tried this out on osx 10.9.0 and python 2.7.5 : * cursor persisting on the input line works * up/down history works This is much better! A big irritation gone for me and makes things much easier for beginners IMO -- one less thing to get surprised by. -- nosy: +Sean.Wolfe ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2704 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
Sean Wolfe added the comment: installation steps for me: * apply PyShell.py patch (I had to do some bits manually) * add Terminal.py to idlelib directory * add changes to config-extensions.def as detailed in Terminal.py comments This was in the osx 10.9 system python directories, so there was some sudo-ing involved. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2704 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules
Sean Rodman added the comment: Here is a working patch for python 2.7. all it does is lowercase the module name, but once I did that and clicked the link it worked correctly. -- keywords: +patch Added file: http://bugs.python.org/file34233/issue16484.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules
Sean Rodman added the comment: Note: It doesn't change the actual module name. Just how it is represented in the link. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules
Sean Rodman added the comment: Here is the patch for python 3.2. It implements the same fix that the 2.7 patch does. -- Added file: http://bugs.python.org/file34234/issue16484_python3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules
Changes by Sean Rodman srodman7...@gmail.com: Removed file: http://bugs.python.org/file34234/issue16484_python3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules
Changes by Sean Rodman srodman7...@gmail.com: Removed file: http://bugs.python.org/file34233/issue16484.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules
Sean Rodman added the comment: Sorry guys, I missed a place I needed to add the lower() fuction to the module.__name__. Here is a fixed patch for python2.7. -- Added file: http://bugs.python.org/file34236/issue16484_python2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules
Changes by Sean Rodman srodman7...@gmail.com: Added file: http://bugs.python.org/file34238/issue16484_python3.3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules
Sean Rodman added the comment: Here are the python3.2 and python3.3 patches. Please let me know if there is anything I need to change on these. -- Added file: http://bugs.python.org/file34237/issue16484_python3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] Improve doc for csv.DictReader 'fieldnames' parameter
Sean Rodman added the comment: Is there anything else that should be added to this patch? I don't mean to bug you guys just want to make sure that everything is right with it so that if and or when it is applied it will apply without any problems. Also, if there is anything else I should change I am definitely open to changing anything that is needed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20146] UserDict module docs link is obsolete
Sean Rodman added the comment: Hey drunax, I would like to create a patch for this and upload, but I don't see the link you are talking about. Is it in the documentation or is it in the file UserDict.py? -- nosy: +sean.rodman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20146 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19614] support.temp_cwd should use support.rmtree
Sean Rodman added the comment: Hey r.david.murray, so should this change be made in the test? -- nosy: +sean.rodman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19614 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19614] support.temp_cwd should use support.rmtree
Sean Rodman added the comment: I don't see where temp_cwd uses shutil.rmtree, but I do see where temp_dir uses shutil.rmtree. Here is a patch to change that to support.rmtree. If I am way off base on this patch please let me know and I will change it to fix whatever needs to be fixed. I want to contribute to python as much as I can so I will do anything to get this fixed that is necessary. Please let me know what you think. -- keywords: +patch Added file: http://bugs.python.org/file34218/issue19614.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19614 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules
Sean Rodman added the comment: I could try to create the patch for pydoc if you would like for me to. -- nosy: +sean.rodman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules
Sean Rodman added the comment: To display my ignorance, I have run the pydoc command listed in the original message but I can't actually see where it lists the url. Or even where it has a link. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Sean Rodman added the comment: I just realized that my two last updates on this ticket could be sort of confusing. So here is what I did for the 2.7 patch. First I copied the wording that I used for the 3.3/4 patch and then I created a relative link using the syntax `sequence collections.html`_ because I couldn't find a way to get the :ref: syntax to work correctly. I have applied this patch to the 2.7 branch and compiled the html documentation. When I tested it the link does work correctly. It goes to the collections page of the documentation. If you have time could you review the patch for 2.7 for me? (The patch is named DictReader_DictWriter_python2_NewWording.patch.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Sean Rodman added the comment: Great! Thank you for the reference name. I have changed the patch to use a ref link. Here is the new patch. -- Added file: http://bugs.python.org/file34155/DictReader_DictWriter_python2_ref.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Changes by Sean Rodman srodman7...@gmail.com: Removed file: http://bugs.python.org/file34141/DictReader_DictWriter_python2_NewWording.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Sean Rodman added the comment: Here is a patch for DictReader that adds a mod link to the sequence abstract as requested. Please review this if you could and let me know what you think. Note: This patch is for python 3 and if you like how I have done it on here I will go ahead and create a patch that covers python 2 as well. -- Added file: http://bugs.python.org/file34135/DictReader_python3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Changes by Sean Rodman srodman7...@gmail.com: Removed file: http://bugs.python.org/file34109/DictReader_DictWriter_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Changes by Sean Rodman srodman7...@gmail.com: Removed file: http://bugs.python.org/file34135/DictReader_python3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Sean Rodman added the comment: Ok, I have take the approach I used with the original patch and applied it to this one, listing that fieldnames is a sequence. Then, I added a link to the collections abstract on that instance of the word sequence. I did this for both DictReader and DictWriter as I did in the original patch. Would this be what you think is needed? -- Added file: http://bugs.python.org/file34136/DictReader_DictWriter_python3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Changes by Sean Rodman srodman7...@gmail.com: Removed file: http://bugs.python.org/file34136/DictReader_DictWriter_python3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Sean Rodman added the comment: What about if I put The *fieldnames* parameter is a :mod:`sequence collections.abc` whose elements are associated with the fields of the input data in order. These elements become the keys of the resulting dictionary. It contains all of the information that you have but it feels more to the point when you separate it as two sentences. The attached patch reflect these changes. -- Added file: http://bugs.python.org/file34139/DictReader_DictWriter_python3_NewWording.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Sean Rodman added the comment: Here is the equivalent 2.7 patch. I used a relative link with the format `sequence collections.html`_ in order to link to the collections page. I tried to use the reference syntax but I could find the subsection that I needed to reference in the documentation. If you would like for me to go that route I don't mind trying to figure it out, this is just the way I was able to get the documentation compiling and working correctly. -- Added file: http://bugs.python.org/file34141/DictReader_DictWriter_python2_NewWording.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Sean Rodman added the comment: That is supposed to say I couldn't find the subsection that I needed to reference in the documentation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Sean Rodman added the comment: It looks like you are right. I have updated the patch to reflect that it could be a list or a tuple. -- Added file: http://bugs.python.org/file34109/DictReader_DictWriter_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Changes by Sean Rodman srodman7...@gmail.com: Removed file: http://bugs.python.org/file34084/DictReader_DictWriter.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Sean Rodman added the comment: I am new to contributing to python, and I would like to take a shot a creating a patch for this. -- nosy: +sean.rodman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20628] csv.DictReader
Sean Rodman added the comment: I have created a patch for this documentation issue. Could you please review this for me and tell me what you think? -- keywords: +patch Added file: http://bugs.python.org/file34084/DictReader_DictWriter.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Module depositary
Hi All. I am aware that active state python has a commercial module depositary which you can get modules from. Under PERL you had CPAN. Is there anything like this for Python? Sean -- https://mail.python.org/mailman/listinfo/python-list