[issue46317] Pathlib.rename isn't robust

2022-01-17 Thread Oz Tiram
Change by Oz Tiram : -- keywords: +patch pull_requests: +28851 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30650 ___ Python tracker <https://bugs.python.org/issu

[issue46317] Pathlib.rename isn't robust

2022-01-15 Thread Oz Tiram
Oz Tiram added the comment: Thanks for the answer, it makes sense now. Yes, I would adopt this. Allowing users to use `copy2` (or any other functio ...) using a keyword. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46317] Pathlib.rename isn't robust

2022-01-14 Thread Oz Tiram
Oz Tiram added the comment: @barney, I am not sure that I understand your question. I think adding another method `Pathlib.Path` and `Pathlib._Accessor` is my preferred way. The would be something like: class _NormalAccessor(_Accessor): ... self.move = shutil.move

[issue46317] Pathlib.rename isn't robust

2022-01-09 Thread Oz Tiram
New submission from Oz Tiram : Pathlib.rename will fail across file system with: OSError: [Errno 18] Invalid cross-device link e.g: -> path_dict["current_path"].rename(path_dict["destination"]) (Pdb) n OSError: [Errno 18] Invalid cross-device link: '/tmp/pipenv-k1m0o

[issue39348] wrong rst syntax in socket.rst

2020-01-15 Thread Oz Tiram
Change by Oz Tiram : -- keywords: +patch pull_requests: +17413 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18018 ___ Python tracker <https://bugs.python.org/issu

[issue39348] wrong rst syntax in socket.rst

2020-01-15 Thread Oz Tiram
New submission from Oz Tiram : The code block for the isn't hightlighted: Changed in version 3.7: When SOCK_NONBLOCK or SOCK_CLOEXEC bit flags are applied to type they are cleared, and socket.type will not reflect them. They are still passed to the underlying system socket() call

[issue14102] argparse: add ability to create a man page

2018-06-15 Thread Oz Tiram
Oz Tiram added the comment: As already pointed out, it can get the parser somehow, you don't need an explicit extra option --man. That's the approach suggesed in: man-argparse and build_manpage.py attached here You can use it a make file like this: install: ./setup.py build_manpage

[issue33227] Cmd do_something only accepts one argument

2018-04-06 Thread Oz Tiram
Oz Tiram <nahu...@gmail.com> added the comment: I am disappointed you want to deprecate CMD. I knew about cmd2 and some other alternatives, but I think their execive use of decorators isn't so comfortable. That is why I wrote my own module. I'm also willing to adopt the module and ad

[issue33227] Cmd do_something only accepts one argument

2018-04-05 Thread Oz Tiram
Change by Oz Tiram <nahu...@gmail.com>: -- components: +Library (Lib) type: -> enhancement ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33227] Cmd do_something only accepts one argument

2018-04-05 Thread Oz Tiram
New submission from Oz Tiram <nahu...@gmail.com>: Considering that I want to build an CLI interactive program using cmd.Cmd, which has multiple functions that accept two or more arguments, I always have to do parsing of arg inside my do_methods for example: class Calc(cmd.Cmd): do_ad

[issue30095] HTMLCalendar allow custom classes

2017-06-01 Thread Oz Tiram
Oz Tiram added the comment: @Walter, I fixed the issues your raised, and also solved the merge conflict in What's New. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30095] HTMLCalendar allow custom classes

2017-05-03 Thread Oz Tiram
Oz Tiram added the comment: @Walter, I implemented your suggestions plus the obvious tasks of adding tests and documentation. Would be happy to hear your feedback. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30095] HTMLCalendar allow custom classes

2017-05-03 Thread Oz Tiram
Changes by Oz Tiram <nahu...@gmail.com>: -- pull_requests: +1537 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30095> ___ __

[issue30095] HTMLCalendar allow custom classes

2017-04-24 Thread Oz Tiram
Oz Tiram added the comment: Apparently, I forgot to push the second branch. It is now pushed. I renamed the class attribute names on the v1 branch. I still need to do the following: - Add docs - Fix existing tests and add new tests demonstrating the usage of the new attributes

[issue30095] HTMLCalendar allow custom classes

2017-04-24 Thread Oz Tiram
Oz Tiram added the comment: @Walter, I agree with you about consistent naming. Personally, I would prefer to name all the variables "styles". But I preferred not to break past compatibility too. So I guess we are stuck for a while with "classes". I will r

[issue30095] HTMLCalendar allow custom classes

2017-04-23 Thread Oz Tiram
Oz Tiram added the comment: @Walter, I implemented two possible solutions. Chronologically speaking V2 was implemented before V1, but it's a bit über-smart and might surprise it's users requiring the class attributes to be some kind of iterable. The first version is my current preferred

[issue30095] HTMLCalendar allow custom classes

2017-04-19 Thread Oz Tiram
Oz Tiram added the comment: ... Using class attributes would nice, also considering that the days CSS classes are defined as class attributes. I meant to write : Using class attributes would be nicer, also considering that the days CSS classes are defined as class attributes

[issue30095] HTMLCalendar allow custom classes

2017-04-19 Thread Oz Tiram
Oz Tiram added the comment: @doerwalter, exactly. I found myself overwriting the relevant methods too many times. I usually did something like this: class WorkCalendar(HTMLCalendar): def formatmonthname(self, theyear, themonth, withyear=True, style=r'class

[issue30095] HTMLCalendar allow custom classes

2017-04-18 Thread Oz Tiram
Oz Tiram added the comment: Of course I can, but I can't add multiple css classes, and I forced to have the same class for both the title of the month and the body of the month. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue30095] HTMLCalendar allow custom classes

2017-04-18 Thread Oz Tiram
New submission from Oz Tiram: At the moment methods like HTMLCalendar.formatmonthname and HTMLCalendar.formatmonth have hard coded name 'month'. This class is pretty helpful as a good start, but if you want to customize the styles it's not helpful. I think it would be helpful for others too

[issue14102] argparse: add ability to create a man page

2014-06-13 Thread Oz Tiram
Oz Tiram added the comment: @Raymond Hettinger, You don't have to wait anymore. I would be happy if you review the patch, and share your opinion. I might have posted my patch too early. I am still doing changes on the upstream, in my github posted earlier.So, please test the one upstream

[issue14102] argparse: add ability to create a man page

2014-06-11 Thread Oz Tiram
Oz Tiram added the comment: Hi, I have been wanting this feature for quite a long time. IMHO, binaries and scripts should always include a man page. The Debian developers require that. However, man pages have a 'bizarre' format. Long talk, short time. I did implement something. I tested