To Update create_repo python script
anupammaurya6767 opened this issue · 6 comments
Changes Proposed:
- Replace the use of os.system for executing shell commands with the subprocess module, which provides more flexibility and better handling of command execution.
- Utilize the requests library instead of the http.client module for making HTTP requests, as it offers a more straightforward and user-friendly interface.
- Implement error handling for HTTP requests and responses to provide better feedback in case of failures.
- Improve code readability and adherence to PEP 8 style guidelines.
@sahil-sagwekar2652 I am a GSSOC contributor
I want to work on this issue
Please assign it to me
Changes Proposed:
- Replace the use of os.system for executing shell commands with the subprocess module, which provides more flexibility and better handling of command execution.
- Utilize the requests library instead of the http.client module for making HTTP requests, as it offers a more straightforward and user-friendly interface.
- Implement error handling for HTTP requests and responses to provide better feedback in case of failures.
- Improve code readability and adherence to PEP 8 style guidelines.
Hi @anupammaurya6767
I would like to discuss this issue just for information and to understand the workflow of the project.
As per my understanding, http.client is used as it is a built-in library whereas the requests module needs to be imported.
I'm thinking what could be the major advantages of using the requests library over the other.
- The requests library is compatible with both Python 2 and Python 3, providing a consistent API across different versions of Python. In contrast, http.client may have some differences and variations in its usage between Python 2 and 3, making it less consistent when working with multiple Python versions.
- Requests integrates well with other Python libraries and tools, making it convenient to use in conjunction with frameworks like Flask, Django, and testing frameworks like pytest. Many other libraries and tools in the Python ecosystem provide built-in support for requests, further enhancing its capabilities and usability.
http.client is a lower-level module and can offer more control and customization in certain scenarios, the requests library excels in providing a simpler, more intuitive, and feature-rich experience for most common HTTP request use cases.
@anupammaurya6767 Thank you for the detailed explanation.
Hey everyone, it's great to see that people are collaborating and helping each other. Keep up the spirit!
I am assigning this issue to @anupammaurya6767 .
hey, if this issue hasn't been closed, can i work on it then?