|
52 | 52 | JournalEntry,
|
53 | 53 | BlacklistedProject,
|
54 | 54 | )
|
55 |
| -from warehouse.utils import http, readme |
| 55 | +from warehouse.utils import http |
56 | 56 |
|
57 | 57 |
|
58 | 58 | MAX_FILESIZE = 60 * 1024 * 1024 # 60M
|
@@ -892,31 +892,34 @@ def file_upload(request):
|
892 | 892 | )
|
893 | 893 |
|
894 | 894 | # Uploading should prevent broken rendered descriptions.
|
895 |
| - if form.description.data: |
896 |
| - description_content_type = form.description_content_type.data |
897 |
| - if not description_content_type: |
898 |
| - description_content_type = "text/x-rst" |
899 |
| - rendered = readme.render( |
900 |
| - form.description.data, description_content_type, use_fallback=False |
901 |
| - ) |
902 |
| - if rendered is None: |
903 |
| - if form.description_content_type.data: |
904 |
| - message = ( |
905 |
| - "The description failed to render " |
906 |
| - "for '{description_content_type}'." |
907 |
| - ).format(description_content_type=description_content_type) |
908 |
| - else: |
909 |
| - message = ( |
910 |
| - "The description failed to render " |
911 |
| - "in the default format of reStructuredText." |
912 |
| - ) |
913 |
| - raise _exc_with_message( |
914 |
| - HTTPBadRequest, |
915 |
| - "{message} See {projecthelp} for more information.".format( |
916 |
| - message=message, |
917 |
| - projecthelp=request.help_url(_anchor="description-content-type"), |
918 |
| - ), |
919 |
| - ) from None |
| 895 | + # Temporarily disabled, see |
| 896 | + # https://github.com/pypa/warehouse/issues/4079 |
| 897 | + # if form.description.data: |
| 898 | + # description_content_type = form.description_content_type.data |
| 899 | + # if not description_content_type: |
| 900 | + # description_content_type = "text/x-rst" |
| 901 | + # rendered = readme.render( |
| 902 | + # form.description.data, description_content_type, use_fallback=False |
| 903 | + # ) |
| 904 | + |
| 905 | + # if rendered is None: |
| 906 | + # if form.description_content_type.data: |
| 907 | + # message = ( |
| 908 | + # "The description failed to render " |
| 909 | + # "for '{description_content_type}'." |
| 910 | + # ).format(description_content_type=description_content_type) |
| 911 | + # else: |
| 912 | + # message = ( |
| 913 | + # "The description failed to render " |
| 914 | + # "in the default format of reStructuredText." |
| 915 | + # ) |
| 916 | + # raise _exc_with_message( |
| 917 | + # HTTPBadRequest, |
| 918 | + # "{message} See {projecthelp} for more information.".format( |
| 919 | + # message=message, |
| 920 | + # projecthelp=request.help_url(_anchor="description-content-type"), |
| 921 | + # ), |
| 922 | + # ) from None |
920 | 923 |
|
921 | 924 | try:
|
922 | 925 | canonical_version = packaging.utils.canonicalize_version(form.version.data)
|
|
0 commit comments