[issue42004] Allow uploading files with SimpleHTTPRequestHandler

2020-10-12 Thread Javier Ayres
Javier Ayres added the comment: I see. To be honest I didn't know FieldStorage at all, it was the best way I found of dealing with file data in requests using just the standard library. If you think this feature makes sense and it could be included, I could look into removin

[issue42004] Allow uploading files with SimpleHTTPRequestHandler

2020-10-10 Thread Javier Ayres
New submission from Javier Ayres : Hello. I'm a big fan of the http.server module to quickly serve some files in a local network with `python3 -m http.server`. I regularly needed to get some files from other people too, but getting everyone to install/run python3 was not such a simple

[issue21622] ctypes.util incorrectly fails for libraries without DT_SONAME

2019-10-26 Thread Javier Castillo II
Change by Javier Castillo II : -- pull_requests: +16469 pull_request: https://github.com/python/cpython/pull/16940 ___ Python tracker <https://bugs.python.org/issue21

[issue21622] ctypes.util incorrectly fails for libraries without DT_SONAME

2018-11-29 Thread Javier Castillo II
Javier Castillo II added the comment: The PR 10460 ( for 3.8 ) patches the search attempts to leverage LD_LIBRARY_PATH for the Linux case and catches the case after SONAME, gcc and ldconfig behaviors fail. While this may not be set in all environments ( like the musl based Alpine docker

[issue21622] ctypes.util incorrectly fails for libraries without DT_SONAME

2018-11-11 Thread Javier Castillo II
Change by Javier Castillo II : -- pull_requests: +9736 ___ Python tracker <https://bugs.python.org/issue21622> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21622] ctypes.util incorrectly fails for libraries without DT_SONAME

2018-11-11 Thread Javier Castillo II
Change by Javier Castillo II : -- pull_requests: +9735 ___ Python tracker <https://bugs.python.org/issue21622> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21622] ctypes.util incorrectly fails for libraries without DT_SONAME

2018-11-11 Thread Javier Castillo II
Change by Javier Castillo II : -- pull_requests: +9734 ___ Python tracker <https://bugs.python.org/issue21622> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21622] ctypes.util incorrectly fails for libraries without DT_SONAME

2018-11-10 Thread Javier Castillo II
Change by Javier Castillo II : -- pull_requests: +9730 ___ Python tracker <https://bugs.python.org/issue21622> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34719] Deprecate set to frozenset conversion in set.__contains__

2018-09-18 Thread Javier Dehesa
New submission from Javier Dehesa : This comes from this SO question: https://stackoverflow.com/q/52382983/1782792 Currently, this works: > print({1, 2} in {frozenset({1, 2})) # True This is strange because set is unhashable. Apparently, it is a case-specific feature implemented b

[issue33214] join method for list and tuple

2018-04-03 Thread Javier Dehesa
Javier Dehesa added the comment: Thanks Christian. I thought of join precisely because it performs conceptually the same function as with str, so the parallel between ''.join(), [].join() and ().join() looked more obvious. Also there is os.path.join and PurePath.joinpath, so the v

[issue33214] join method for list and tuple

2018-04-03 Thread Javier Dehesa
New submission from Javier Dehesa : It is pretty trivial to concatenate a sequence of strings: ''.join([str1, str2, ...]) Concatenating a sequence of lists is for some reason significantly more convoluted. Some current options include: sum([lst1, lst2, ...], []) [x f

[issue30678] Widget variable binding does not work if mainloop is called from a different function

2017-06-16 Thread Javier Dehesa
Javier Dehesa added the comment: With the additional hint of garbage collection I have found now a number of examples of this behaviour (e.g. https://stackoverflow.com/questions/7439432/python-themed-tkinter-entry-variable-will-not-set). However, I haven't found actual documentation warni

[issue30678] Widget variable binding does not work if mainloop is called from a different function

2017-06-16 Thread Javier Dehesa
Javier Dehesa added the comment: I see what you mean. Looking at TkDocs (not sure if this is an "official" or "officially endorsed" source or not), one of the Python examples in the "Tk Concepts" section (http://www.tkdocs.com/tutorial/concepts.html) says: > W

[issue30678] Widget variable binding does not work if mainloop is called from a different function

2017-06-16 Thread Javier Dehesa
Javier Dehesa added the comment: Yeah is quite subtle, I should have pointed it out... The difference is that `root.mainloop()` is called inside `make_var_cb(root)` in the first example and under `if __name__ == '__main__'` in the second one. I have experience the problem on Windo

[issue30678] Widget variable binding does not work if mainloop is called from a different function

2017-06-16 Thread Javier Dehesa
Javier Dehesa added the comment: Note, this is not something specific to check buttons, the same happens with other widgets such as entries. -- ___ Python tracker <http://bugs.python.org/issue30

[issue30678] Widget variable binding does not work if mainloop is called from a different function

2017-06-15 Thread Javier Dehesa
New submission from Javier Dehesa: When you build a Tkinter interface with variables, if tkinter.Tk.mainloop is called from a different function that the one creating the variable objects, then in some cases the widgets associated with the variables will not be set to the right value. I have

[issue29558] Provide run_until_complete inside loop

2017-02-15 Thread Javier Domingo
Javier Domingo added the comment: Yes, indeed it is. Would it be possible to reconsider this functionality? It plays a key role when trying to rewrite full applications to async. Rewriting the full stack of libraries at once is impossible, but the patching can easily be done in many cases

[issue29558] Provide run_until_complete inside loop

2017-02-14 Thread Javier Domingo
New submission from Javier Domingo: The current architecture of asyncio makes it really hard to combine both async and sync code. When porting a Thread based application to asyncio, the first step is usually to start merging threads to the main loop, by using `run_coroutine_threadsafe`. This

[issue26467] Add async magic method support to unittest.mock.Mock

2016-12-19 Thread Javier Domingo
Javier Domingo added the comment: I found this while trying to test an async context manager. This is a critical feature to enable migrations to async code, as the impossibility to test something properly is not acceptable in many environments. Implementing it in a way that __call__ returns

[issue28525] Incorrect documented parameter for gc.collect

2016-10-24 Thread Javier Rey
Changes by Javier Rey : -- assignee: docs@python components: Documentation files: gc_collect_doc_fix.patch keywords: patch nosy: docs@python, vierja priority: normal severity: normal status: open title: Incorrect documented parameter for gc.collect versions: Python 3.3, Python 3.4

[issue15634] Add serialized decorator to the threading module

2013-10-27 Thread Juan Javier
Juan Javier added the comment: David, I think this doesn't deserve to be part of the library since it is trivial to write and it is just a particular use case. Adding it as an example in the threading module's documentation might be a good idea, what do

[issue13785] Make concurrent.futures.Future state public

2013-10-26 Thread Juan Javier
Changes by Juan Javier : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue13785> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue15634] Add serialized decorator to the threading module

2013-10-26 Thread Juan Javier
Juan Javier added the comment: It looks like this is not very interesting after all. -- status: open -> closed ___ Python tracker <http://bugs.python.org/issu

[issue13785] Make concurrent.futures.Future state public

2013-10-26 Thread Juan Javier
Juan Javier added the comment: Hi Brian, No, no progress on this. I think this is not an interesting feature after all. You can close this. Juan Javier -- ___ Python tracker <http://bugs.python.org/issue13

[issue16890] minidom error

2013-01-08 Thread Javier Domingo
Javier Domingo added the comment: Ok, sorry then. Javier Domingo 2013/1/8 Ezio Melotti > > Ezio Melotti added the comment: > > It happens with lists too: > >>> l = list(range(10)) > >>> for x in l: > ... l.r

[issue16890] minidom error

2013-01-08 Thread Javier Domingo
Javier Domingo added the comment: I know that is the problem, but that shouldn't happen! if you remove a item from a list, that doesn't happen. That is why I tagged the error as minidom's El 08/01/2013 04:24, "Ezio Melotti" escribió: > > Ezio Melotti added the c

[issue16890] minidom error

2013-01-07 Thread Javier Domingo
New submission from Javier Domingo: Hi I found something like a bug, I can't get this working: import xml.dom.minidom as minidom document=""" """ dom = minidom.parseString(document) dom.childNodes dom.childNodes[0].childN

[issue16798] DTD not checked

2012-12-28 Thread Javier Domingo
Javier Domingo added the comment: I am currently using a subprocess with a call to xmllint to make it create a temporal file that gets created on execution for xmllint use. I have seen about lxml, but I wondered if there is any place in the standard python to put xml validation

[issue16798] DTD not checked

2012-12-27 Thread Javier Domingo
New submission from Javier Domingo: Hi, I am trying to find any tip on how to use minidom or etree xml implementations to check the xml syntax. I just found that the only way to check xml syntax throught dtds is using lxml. Would it be possible to implement this in the minidom or ElementTree

[issue16473] Minor difference in decoding quoted-printable text

2012-11-14 Thread Alejandro Javier Peralta Frías
Alejandro Javier Peralta Frías added the comment: I think I can answer your last question. There are two quopri algorithms, > one where spaces are allowed (message body) and one where they aren't > (email headers). > > OK, thank

[issue16473] Minor difference in decoding quoted-printable text

2012-11-14 Thread Alejandro Javier Peralta Frías
Changes by Alejandro Javier Peralta Frías : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue16473> ___ ___ Python-bugs-list mailin

[issue16473] Minor difference in decoding quoted-printable text

2012-11-14 Thread Alejandro Javier Peralta Frías
New submission from Alejandro Javier Peralta Frías: New to python-dev; I grab a beginner tasks "increase test coverage" and I decided to add coverage to this bit of code in the quopri module: # quopri.py L138while n > 0 and line[n-1:n] in b" \t\r": L139

[issue15634] synchronized decorator for the threading module

2012-08-14 Thread Juan Javier
Juan Javier added the comment: What about this? def serialized(lock): def _serialized(func): def __serialized(*args, **kwds): with lock: return func(*args, **kwds) __serialized.__doc__ = func.__doc__ return __serialized return

[issue15634] synchronized decorator for the threading module

2012-08-13 Thread Juan Javier
Juan Javier added the comment: Ok, you are right, serialized is the right name. Also, passing the lock to the decorator will the correct option. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15634] synchronized decorator for the threading module

2012-08-13 Thread Juan Javier
New submission from Juan Javier: I think it will be useful to have a decorator like this one on the threading module: def synchronized(func): """A decorator to make a function execution synchronized. Examples: @synchronized def foo(): pass class F

[issue13785] Make concurrent.futures.Future state public

2012-07-18 Thread Juan Javier
Juan Javier added the comment: I totally agree, I'm going to take a look at the code and I'll write back with some comments. That will be next week, work is currently very demanding. -- status: languishing -> open versions: +Python 3.

[issue13785] Make concurrent.futures.Future state public

2012-07-18 Thread Juan Javier
Changes by Juan Javier : -- status: open -> languishing ___ Python tracker <http://bugs.python.org/issue13785> ___ ___ Python-bugs-list mailing list Unsubscri

[issue13785] Make concurrent.futures.Future state public

2012-03-09 Thread Juan Javier
Juan Javier added the comment: I'm writting an application where users can submit long running jobs and I want to disply a list of those jobs and the state of each one. My idea is to use an executor and use the futures to display information about the jobs: not started, cancelled, ru

[issue13785] Make concurrent.futures.Future state public

2012-02-29 Thread Juan Javier
Juan Javier added the comment: The use case is to know the state of a future without having to do something like this @property def state(self): if self.future.running(): return Process.States.Running elif self.future.cancelled(): return

[issue13978] OSError exception in multiprocessing module when using os.remove() on NFS

2012-02-09 Thread Javier Jardón
New submission from Javier Jardón : I have this little test case: import multiprocessing manager = multiprocessing.Manager() del manager and I get this: Traceback (most recent call last): File "/usr/lib/python2.7/multiprocessing/util.py", line 261, in _run_finalizers

[issue13785] Make concurrent.futures.Future state public

2012-01-15 Thread Juan Javier
Juan Javier added the comment: Hello, You're right, explaining the difference between CANCELLED and CANCELLED_AND_NOTIFIED is gong to be hard and might be confusing. I also agree that there is no precedent for storing the history of something, and I don't like either the idea o

[issue13785] Make concurrent.futures.Future state public

2012-01-14 Thread Juan Javier
New submission from Juan Javier : Hello, This is a proposal to make the state of Future objects public. The idea is to have access to the current state of the Future using a property instead of calling several methods (done, cancelled, etc.). Also, a history property that returns a list of

[issue6751] Default return value in ConfigParser

2010-08-07 Thread Juan Javier
Juan Javier added the comment: I would like the method to have the exact same behavior as before if the "default" argument is not present, and return the given default value when "deafult" argument is present. If you simply add a "default" keyword, it will alway

[issue9026] argparse subcommands not printed in the same order they were added

2010-07-23 Thread Javier Collado
Javier Collado added the comment: The hasattr expressions were added to TestHelpFormattingMetaclass because: - A new attribute (subparsers_signature) was added in test classes that wasn't used in the past. - The new test classes didn't make use of some of the already in place

[issue6751] Default return value in ConfigParser

2010-07-22 Thread Juan Javier
Changes by Juan Javier : Added file: http://bugs.python.org/file18123/test_cfgparser.py.diff ___ Python tracker <http://bugs.python.org/issue6751> ___ ___ Python-bug

[issue6751] Default return value in ConfigParser

2010-07-22 Thread Juan Javier
Juan Javier added the comment: I've applied the enhancement to the three parsers, actually I've made the change to RawconfigParser with a small change to ConfigParser. I've also created some unit tests. -- keywords: +patch Added file: http://bugs.pytho

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado
Javier Collado added the comment: Just for the record, please find attached an uglier patch for python < 2.7 that doesn't have the same problems as the first one I uploaded and passes all the test cases (tested with python 2.6). -- Added file: http://bugs.python.org/file177

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado
Javier Collado added the comment: Despite trunk.diff can be successfully applied to py3k branch, please find attached the patch generated from py3k branch. -- Added file: http://bugs.python.org/file17731/py3k.diff ___ Python tracker <h

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado
Changes by Javier Collado : Removed file: http://bugs.python.org/file17705/ordered_subcommands.diff ___ Python tracker <http://bugs.python.org/issue9026> ___ ___ Pytho

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado
Javier Collado added the comment: Finally I had to use an OrderedDict as suggested by R. David Murray because it wasn't safe to rely on _choices_actions in HelpFormatter class (i.e. previous patch wasn't valid): - _choices_actions attribute is only present in _SubParsersAction class

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado
Javier Collado added the comment: Working on it. -- ___ Python tracker <http://bugs.python.org/issue9026> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-18 Thread Javier
Javier added the comment: While the ordered dict is a nice option, the one-line patch that is attached to the report works in python < 2.7 without adding any external dependency. In my opininion, that's interesting for those using argparse with earlier versions o

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-18 Thread Javier
Javier added the comment: It contains a patch that worked for me to preserve the ordering used in the code. To make that possible it uses action._choices_actions (a list) instead of action.choices (a dictionary). -- keywords: +patch Added file: http://bugs.python.org/file17705

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-18 Thread Javier
New submission from Javier : What steps will reproduce the problem? 1. Run 'python subcommands.py -h' (attached file) 2. Check the ordering of the subcommands in the output: subcommands: {a,c,b,e,d} a a subcommand help b b subcommand help c

[issue6751] Default return value in ConfigParser

2009-08-21 Thread Juan Javier
New submission from Juan Javier : I think it is useful, at least for me, to add an argument, default, to [Safe,Raw]ConfigParser.get that, if present, will be returned if the methid fails to return the value. That is, instead of rasing an exception, return default, if present. It could be done

[issue6630] string.Template custom pattern not working

2009-08-03 Thread Javier
New submission from Javier : In the string.Template documentation (http://docs.python.org/library/string.html) it's explained that if a custom regular expression for pattern substitution is needed, it's possible to override idpattern class attribute (whose default value is [_a-

[issue3821] trace module bug when using --missing

2008-09-09 Thread Juan Javier
New submission from Juan Javier <[EMAIL PROTECTED]>: I get the following exception: $ /opt/python3.0b2/bin/python3.0 -m trace -c -m run.py Traceback (most recent call last): File "/opt/python3.0b2/lib/python3.0/runpy.py", line 121, in _run_module_as_main "__m

[issue1916] Add inspect.isgenerator

2008-02-17 Thread Javier Mansilla
Javier Mansilla added the comment: And now I'm attaching a new patch test_inspect.py.diff with a more complete test coverage. You didn't add isgenerator nor isgeneratorfunction tests. I did. Added file: http://bugs.python.org/file9447/test_inspe

[issue1916] Add inspect.isgenerator

2008-02-17 Thread Javier Mansilla
Javier Mansilla added the comment: My dear, what is wrong with my browser (or with me). Now, yes, the one with the typo. Added file: http://bugs.python.org/file9446/inspect.py.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1916] Add inspect.isgenerator

2008-02-17 Thread Javier Mansilla
Javier Mansilla added the comment: Sorry, I attached the wrong file The previous post saying "fixing typo" should attached inspect.py.diff. This is the one. Added file: http://bugs.python.org/file9445/test_inspect.py.diff __ Tracker <[EMAIL PROT

[issue1916] Add inspect.isgenerator

2008-02-17 Thread Javier Mansilla
Javier Mansilla added the comment: I merged my working copy with your patches and they look fine. I fixed a typo on the method doc ("is" instead of "i") so I'm attaching my inspect.py.diff patch -- nosy: +javimansilla Added file: http://bugs.python.org/file